mgwdev-m365-components 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(P,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("react"),require("@fluentui/react-components")):typeof define=="function"&&define.amd?define(["exports","react","@fluentui/react-components"],U):(P=typeof globalThis<"u"?globalThis:P||self,U(P["mgwdev-m365-components"]={},P.React,P.FluentUIReactComponents))})(this,function(P,U,m){"use strict";function ur(s){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return r.default=s,Object.freeze(r)}const b=ur(U);var Qe={exports:{}},pe={};/**
1
+ (function(C,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react"),require("mgwdev-m365-helpers"),require("@fluentui/react-components"),require("mgwdev-m365-helpers/lib/dal/dataProviders/CopilotRetrievalDataProvider"),require("mgwdev-m365-helpers/lib/services/cache"),require("mgwdev-m365-helpers/lib/utils/FunctionUtils"),require("mgwdev-m365-helpers/lib/utils/DebounceHandler"),require("mgwdev-m365-helpers/lib/utils/queryBuilders/ODataQueryBuilder")):typeof define=="function"&&define.amd?define(["exports","react","mgwdev-m365-helpers","@fluentui/react-components","mgwdev-m365-helpers/lib/dal/dataProviders/CopilotRetrievalDataProvider","mgwdev-m365-helpers/lib/services/cache","mgwdev-m365-helpers/lib/utils/FunctionUtils","mgwdev-m365-helpers/lib/utils/DebounceHandler","mgwdev-m365-helpers/lib/utils/queryBuilders/ODataQueryBuilder"],G):(C=typeof globalThis<"u"?globalThis:C||self,G(C["mgwdev-m365-components"]={},C.React,C.mgwdevM365Helpers,C.FluentUIReactComponents,C.mgwdevM365Helpers,C.mgwdevM365Helpers,C.mgwdevM365Helpers,C.mgwdevM365Helpers,C.mgwdevM365Helpers))})(this,function(C,G,k,h,dn,fn,hn,gn,mn){"use strict";function vn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=vn(G);var Pe={exports:{}},ae={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Dt;function lr(){return Dt||(Dt=1,process.env.NODE_ENV!=="production"&&function(){var s=U,r=Symbol.for("react.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),n=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.iterator,x="@@iterator";function S(f){if(f===null||typeof f!="object")return null;var p=v&&f[v]||f[x];return typeof p=="function"?p:null}var C=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(f){{for(var p=arguments.length,w=new Array(p>1?p-1:0),R=1;R<p;R++)w[R-1]=arguments[R];D("error",f,w)}}function D(f,p,w){{var R=C.ReactDebugCurrentFrame,I=R.getStackAddendum();I!==""&&(p+="%s",w=w.concat([I]));var j=w.map(function(T){return String(T)});j.unshift("Warning: "+p),Function.prototype.apply.call(console[f],console,j)}}var F=!1,A=!1,G=!1,Z=!1,H=!1,k;k=Symbol.for("react.module.reference");function O(f){return!!(typeof f=="string"||typeof f=="function"||f===a||f===t||H||f===i||f===n||f===c||Z||f===y||F||A||G||typeof f=="object"&&f!==null&&(f.$$typeof===g||f.$$typeof===d||f.$$typeof===o||f.$$typeof===u||f.$$typeof===l||f.$$typeof===k||f.getModuleId!==void 0))}function N(f,p,w){var R=f.displayName;if(R)return R;var I=p.displayName||p.name||"";return I!==""?w+"("+I+")":w}function ge(f){return f.displayName||"Context"}function M(f){if(f==null)return null;if(typeof f.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case a:return"Fragment";case e:return"Portal";case t:return"Profiler";case i:return"StrictMode";case n:return"Suspense";case c:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case u:var p=f;return ge(p)+".Consumer";case o:var w=f;return ge(w._context)+".Provider";case l:return N(f,f.render,"ForwardRef");case d:var R=f.displayName||null;return R!==null?R:M(f.type)||"Memo";case g:{var I=f,j=I._payload,T=I._init;try{return M(T(j))}catch{return null}}}return null}var ie=Object.assign,Ee=0,Bn,Gn,Mn,Qn,Vn,Hn,Wn;function zn(){}zn.__reactDisabledLog=!0;function Oa(){{if(Ee===0){Bn=console.log,Gn=console.info,Mn=console.warn,Qn=console.error,Vn=console.group,Hn=console.groupCollapsed,Wn=console.groupEnd;var f={configurable:!0,enumerable:!0,value:zn,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}Ee++}}function ja(){{if(Ee--,Ee===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ie({},f,{value:Bn}),info:ie({},f,{value:Gn}),warn:ie({},f,{value:Mn}),error:ie({},f,{value:Qn}),group:ie({},f,{value:Vn}),groupCollapsed:ie({},f,{value:Hn}),groupEnd:ie({},f,{value:Wn})})}Ee<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Pt=C.ReactCurrentDispatcher,Ct;function qe(f,p,w){{if(Ct===void 0)try{throw Error()}catch(I){var R=I.stack.trim().match(/\n( *(at )?)/);Ct=R&&R[1]||""}return`
10
- `+Ct+f}}var _t=!1,Ue;{var Na=typeof WeakMap=="function"?WeakMap:Map;Ue=new Na}function Jn(f,p){if(!f||_t)return"";{var w=Ue.get(f);if(w!==void 0)return w}var R;_t=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=Pt.current,Pt.current=null,Oa();try{if(p){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(W){R=W}Reflect.construct(f,[],T)}else{try{T.call()}catch(W){R=W}f.call(T.prototype)}}else{try{throw Error()}catch(W){R=W}f()}}catch(W){if(W&&R&&typeof W.stack=="string"){for(var E=W.stack.split(`
11
- `),q=R.stack.split(`
12
- `),L=E.length-1,$=q.length-1;L>=1&&$>=0&&E[L]!==q[$];)$--;for(;L>=1&&$>=0;L--,$--)if(E[L]!==q[$]){if(L!==1||$!==1)do if(L--,$--,$<0||E[L]!==q[$]){var Q=`
13
- `+E[L].replace(" at new "," at ");return f.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",f.displayName)),typeof f=="function"&&Ue.set(f,Q),Q}while(L>=1&&$>=0);break}}}finally{_t=!1,Pt.current=j,ja(),Error.prepareStackTrace=I}var ve=f?f.displayName||f.name:"",cr=ve?qe(ve):"";return typeof f=="function"&&Ue.set(f,cr),cr}function Aa(f,p,w){return Jn(f,!1)}function Fa(f){var p=f.prototype;return!!(p&&p.isReactComponent)}function Be(f,p,w){if(f==null)return"";if(typeof f=="function")return Jn(f,Fa(f));if(typeof f=="string")return qe(f);switch(f){case n:return qe("Suspense");case c:return qe("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case l:return Aa(f.render);case d:return Be(f.type,p,w);case g:{var R=f,I=R._payload,j=R._init;try{return Be(j(I),p,w)}catch{}}}return""}var Ge=Object.prototype.hasOwnProperty,Kn={},Yn=C.ReactDebugCurrentFrame;function Me(f){if(f){var p=f._owner,w=Be(f.type,f._source,p?p.type:null);Yn.setExtraStackFrame(w)}else Yn.setExtraStackFrame(null)}function La(f,p,w,R,I){{var j=Function.call.bind(Ge);for(var T in f)if(j(f,T)){var E=void 0;try{if(typeof f[T]!="function"){var q=Error((R||"React class")+": "+w+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}E=f[T](p,T,R,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(L){E=L}E&&!(E instanceof Error)&&(Me(I),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",w,T,typeof E),Me(null)),E instanceof Error&&!(E.message in Kn)&&(Kn[E.message]=!0,Me(I),_("Failed %s type: %s",w,E.message),Me(null))}}}var $a=Array.isArray;function Rt(f){return $a(f)}function qa(f){{var p=typeof Symbol=="function"&&Symbol.toStringTag,w=p&&f[Symbol.toStringTag]||f.constructor.name||"Object";return w}}function Ua(f){try{return Xn(f),!1}catch{return!0}}function Xn(f){return""+f}function Zn(f){if(Ua(f))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qa(f)),Xn(f)}var Te=C.ReactCurrentOwner,Ba={key:!0,ref:!0,__self:!0,__source:!0},er,tr,kt;kt={};function Ga(f){if(Ge.call(f,"ref")){var p=Object.getOwnPropertyDescriptor(f,"ref").get;if(p&&p.isReactWarning)return!1}return f.ref!==void 0}function Ma(f){if(Ge.call(f,"key")){var p=Object.getOwnPropertyDescriptor(f,"key").get;if(p&&p.isReactWarning)return!1}return f.key!==void 0}function Qa(f,p){if(typeof f.ref=="string"&&Te.current&&p&&Te.current.stateNode!==p){var w=M(Te.current.type);kt[w]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Te.current.type),f.ref),kt[w]=!0)}}function Va(f,p){{var w=function(){er||(er=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};w.isReactWarning=!0,Object.defineProperty(f,"key",{get:w,configurable:!0})}}function Ha(f,p){{var w=function(){tr||(tr=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};w.isReactWarning=!0,Object.defineProperty(f,"ref",{get:w,configurable:!0})}}var Wa=function(f,p,w,R,I,j,T){var E={$$typeof:r,type:f,key:p,ref:w,props:T,_owner:j};return E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(E,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(E,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E};function za(f,p,w,R,I){{var j,T={},E=null,q=null;w!==void 0&&(Zn(w),E=""+w),Ma(p)&&(Zn(p.key),E=""+p.key),Ga(p)&&(q=p.ref,Qa(p,I));for(j in p)Ge.call(p,j)&&!Ba.hasOwnProperty(j)&&(T[j]=p[j]);if(f&&f.defaultProps){var L=f.defaultProps;for(j in L)T[j]===void 0&&(T[j]=L[j])}if(E||q){var $=typeof f=="function"?f.displayName||f.name||"Unknown":f;E&&Va(T,$),q&&Ha(T,$)}return Wa(f,E,q,I,R,Te.current,T)}}var Et=C.ReactCurrentOwner,nr=C.ReactDebugCurrentFrame;function ye(f){if(f){var p=f._owner,w=Be(f.type,f._source,p?p.type:null);nr.setExtraStackFrame(w)}else nr.setExtraStackFrame(null)}var Tt;Tt=!1;function It(f){return typeof f=="object"&&f!==null&&f.$$typeof===r}function rr(){{if(Et.current){var f=M(Et.current.type);if(f)return`
9
+ */var Je;function yn(){return Je||(Je=1,process.env.NODE_ENV!=="production"&&function(){var e=G,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),v=Symbol.iterator,w="@@iterator";function E(a){if(a===null||typeof a!="object")return null;var u=v&&a[v]||a[w];return typeof u=="function"?u:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(a){{for(var u=arguments.length,p=new Array(u>1?u-1:0),R=1;R<u;R++)p[R-1]=arguments[R];_("error",a,p)}}function _(a,u,p){{var R=O.ReactDebugCurrentFrame,I=R.getStackAddendum();I!==""&&(u+="%s",p=p.concat([I]));var N=p.map(function(j){return String(j)});N.unshift("Warning: "+u),Function.prototype.apply.call(console[a],console,N)}}var L=!1,A=!1,M=!1,X=!1,z=!1,P;P=Symbol.for("react.module.reference");function F(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===s||z||a===i||a===y||a===d||X||a===S||L||A||M||typeof a=="object"&&a!==null&&(a.$$typeof===m||a.$$typeof===b||a.$$typeof===l||a.$$typeof===c||a.$$typeof===f||a.$$typeof===P||a.getModuleId!==void 0))}function T(a,u,p){var R=a.displayName;if(R)return R;var I=u.displayName||u.name||"";return I!==""?p+"("+I+")":p}function te(a){return a.displayName||"Context"}function V(a){if(a==null)return null;if(typeof a.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case i:return"StrictMode";case y:return"Suspense";case d:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var u=a;return te(u)+".Consumer";case l:var p=a;return te(p._context)+".Provider";case f:return T(a,a.render,"ForwardRef");case b:var R=a.displayName||null;return R!==null?R:V(a.type)||"Memo";case m:{var I=a,N=I._payload,j=I._init;try{return V(j(N))}catch{return null}}}return null}var J=Object.assign,de=0,qt,Mt,Vt,Wt,Qt,zt,Ht;function Yt(){}Yt.__reactDisabledLog=!0;function fa(){{if(de===0){qt=console.log,Mt=console.info,Vt=console.warn,Wt=console.error,Qt=console.group,zt=console.groupCollapsed,Ht=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Yt,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}de++}}function ha(){{if(de--,de===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},a,{value:qt}),info:J({},a,{value:Mt}),warn:J({},a,{value:Vt}),error:J({},a,{value:Wt}),group:J({},a,{value:Qt}),groupCollapsed:J({},a,{value:zt}),groupEnd:J({},a,{value:Ht})})}de<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var We=O.ReactCurrentDispatcher,Qe;function Se(a,u,p){{if(Qe===void 0)try{throw Error()}catch(I){var R=I.stack.trim().match(/\n( *(at )?)/);Qe=R&&R[1]||""}return`
10
+ `+Qe+a}}var ze=!1,be;{var ga=typeof WeakMap=="function"?WeakMap:Map;be=new ga}function Kt(a,u){if(!a||ze)return"";{var p=be.get(a);if(p!==void 0)return p}var R;ze=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=We.current,We.current=null,fa();try{if(u){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(H){R=H}Reflect.construct(a,[],j)}else{try{j.call()}catch(H){R=H}a.call(j.prototype)}}else{try{throw Error()}catch(H){R=H}a()}}catch(H){if(H&&R&&typeof H.stack=="string"){for(var D=H.stack.split(`
11
+ `),U=R.stack.split(`
12
+ `),$=D.length-1,B=U.length-1;$>=1&&B>=0&&D[$]!==U[B];)B--;for(;$>=1&&B>=0;$--,B--)if(D[$]!==U[B]){if($!==1||B!==1)do if($--,B--,B<0||D[$]!==U[B]){var W=`
13
+ `+D[$].replace(" at new "," at ");return a.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",a.displayName)),typeof a=="function"&&be.set(a,W),W}while($>=1&&B>=0);break}}}finally{ze=!1,We.current=N,ha(),Error.prepareStackTrace=I}var re=a?a.displayName||a.name:"",un=re?Se(re):"";return typeof a=="function"&&be.set(a,un),un}function ma(a,u,p){return Kt(a,!1)}function va(a){var u=a.prototype;return!!(u&&u.isReactComponent)}function Ce(a,u,p){if(a==null)return"";if(typeof a=="function")return Kt(a,va(a));if(typeof a=="string")return Se(a);switch(a){case y:return Se("Suspense");case d:return Se("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case f:return ma(a.render);case b:return Ce(a.type,u,p);case m:{var R=a,I=R._payload,N=R._init;try{return Ce(N(I),u,p)}catch{}}}return""}var xe=Object.prototype.hasOwnProperty,Xt={},Zt=O.ReactDebugCurrentFrame;function Re(a){if(a){var u=a._owner,p=Ce(a.type,a._source,u?u.type:null);Zt.setExtraStackFrame(p)}else Zt.setExtraStackFrame(null)}function ya(a,u,p,R,I){{var N=Function.call.bind(xe);for(var j in a)if(N(a,j)){var D=void 0;try{if(typeof a[j]!="function"){var U=Error((R||"React class")+": "+p+" type `"+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[j]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}D=a[j](u,j,R,p,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){D=$}D&&!(D instanceof Error)&&(Re(I),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",p,j,typeof D),Re(null)),D instanceof Error&&!(D.message in Xt)&&(Xt[D.message]=!0,Re(I),x("Failed %s type: %s",p,D.message),Re(null))}}}var pa=Array.isArray;function He(a){return pa(a)}function Sa(a){{var u=typeof Symbol=="function"&&Symbol.toStringTag,p=u&&a[Symbol.toStringTag]||a.constructor.name||"Object";return p}}function ba(a){try{return Jt(a),!1}catch{return!0}}function Jt(a){return""+a}function en(a){if(ba(a))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Sa(a)),Jt(a)}var fe=O.ReactCurrentOwner,Ca={key:!0,ref:!0,__self:!0,__source:!0},tn,nn,Ye;Ye={};function xa(a){if(xe.call(a,"ref")){var u=Object.getOwnPropertyDescriptor(a,"ref").get;if(u&&u.isReactWarning)return!1}return a.ref!==void 0}function Ra(a){if(xe.call(a,"key")){var u=Object.getOwnPropertyDescriptor(a,"key").get;if(u&&u.isReactWarning)return!1}return a.key!==void 0}function Pa(a,u){if(typeof a.ref=="string"&&fe.current&&u&&fe.current.stateNode!==u){var p=V(fe.current.type);Ye[p]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V(fe.current.type),a.ref),Ye[p]=!0)}}function wa(a,u){{var p=function(){tn||(tn=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};p.isReactWarning=!0,Object.defineProperty(a,"key",{get:p,configurable:!0})}}function Ea(a,u){{var p=function(){nn||(nn=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u))};p.isReactWarning=!0,Object.defineProperty(a,"ref",{get:p,configurable:!0})}}var Da=function(a,u,p,R,I,N,j){var D={$$typeof:t,type:a,key:u,ref:p,props:j,_owner:N};return D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(D,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(D,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D};function ja(a,u,p,R,I){{var N,j={},D=null,U=null;p!==void 0&&(en(p),D=""+p),Ra(u)&&(en(u.key),D=""+u.key),xa(u)&&(U=u.ref,Pa(u,I));for(N in u)xe.call(u,N)&&!Ca.hasOwnProperty(N)&&(j[N]=u[N]);if(a&&a.defaultProps){var $=a.defaultProps;for(N in $)j[N]===void 0&&(j[N]=$[N])}if(D||U){var B=typeof a=="function"?a.displayName||a.name||"Unknown":a;D&&wa(j,B),U&&Ea(j,B)}return Da(a,D,U,I,R,fe.current,j)}}var Ke=O.ReactCurrentOwner,rn=O.ReactDebugCurrentFrame;function ne(a){if(a){var u=a._owner,p=Ce(a.type,a._source,u?u.type:null);rn.setExtraStackFrame(p)}else rn.setExtraStackFrame(null)}var Xe;Xe=!1;function Ze(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function an(){{if(Ke.current){var a=V(Ke.current.type);if(a)return`
14
14
 
15
- Check the render method of \``+f+"`."}return""}}function Ja(f){{if(f!==void 0){var p=f.fileName.replace(/^.*[\\\/]/,""),w=f.lineNumber;return`
15
+ Check the render method of \``+a+"`."}return""}}function Ia(a){{if(a!==void 0){var u=a.fileName.replace(/^.*[\\\/]/,""),p=a.lineNumber;return`
16
16
 
17
- Check your code at `+p+":"+w+"."}return""}}var ir={};function Ka(f){{var p=rr();if(!p){var w=typeof f=="string"?f:f.displayName||f.name;w&&(p=`
17
+ Check your code at `+u+":"+p+"."}return""}}var sn={};function Oa(a){{var u=an();if(!u){var p=typeof a=="string"?a:a.displayName||a.name;p&&(u=`
18
18
 
19
- Check the top-level render call using <`+w+">.")}return p}}function ar(f,p){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var w=Ka(p);if(ir[w])return;ir[w]=!0;var R="";f&&f._owner&&f._owner!==Et.current&&(R=" It was passed a child from "+M(f._owner.type)+"."),ye(f),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,R),ye(null)}}function sr(f,p){{if(typeof f!="object")return;if(Rt(f))for(var w=0;w<f.length;w++){var R=f[w];It(R)&&ar(R,p)}else if(It(f))f._store&&(f._store.validated=!0);else if(f){var I=S(f);if(typeof I=="function"&&I!==f.entries)for(var j=I.call(f),T;!(T=j.next()).done;)It(T.value)&&ar(T.value,p)}}}function Ya(f){{var p=f.type;if(p==null||typeof p=="string")return;var w;if(typeof p=="function")w=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===l||p.$$typeof===d))w=p.propTypes;else return;if(w){var R=M(p);La(w,f.props,"prop",R,f)}else if(p.PropTypes!==void 0&&!Tt){Tt=!0;var I=M(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xa(f){{for(var p=Object.keys(f.props),w=0;w<p.length;w++){var R=p[w];if(R!=="children"&&R!=="key"){ye(f),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),ye(null);break}}f.ref!==null&&(ye(f),_("Invalid attribute `ref` supplied to `React.Fragment`."),ye(null))}}function or(f,p,w,R,I,j){{var T=O(f);if(!T){var E="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(E+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var q=Ja(I);q?E+=q:E+=rr();var L;f===null?L="null":Rt(f)?L="array":f!==void 0&&f.$$typeof===r?(L="<"+(M(f.type)||"Unknown")+" />",E=" Did you accidentally export a JSX literal instead of a component?"):L=typeof f,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,E)}var $=za(f,p,w,I,j);if($==null)return $;if(T){var Q=p.children;if(Q!==void 0)if(R)if(Rt(Q)){for(var ve=0;ve<Q.length;ve++)sr(Q[ve],f);Object.freeze&&Object.freeze(Q)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else sr(Q,f)}return f===a?Xa($):Ya($),$}}function Za(f,p,w){return or(f,p,w,!0)}function es(f,p,w){return or(f,p,w,!1)}var ts=es,ns=Za;pe.Fragment=a,pe.jsx=ts,pe.jsxs=ns}()),pe}var me={};/**
19
+ Check the top-level render call using <`+p+">.")}return u}}function on(a,u){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var p=Oa(u);if(sn[p])return;sn[p]=!0;var R="";a&&a._owner&&a._owner!==Ke.current&&(R=" It was passed a child from "+V(a._owner.type)+"."),ne(a),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',p,R),ne(null)}}function ln(a,u){{if(typeof a!="object")return;if(He(a))for(var p=0;p<a.length;p++){var R=a[p];Ze(R)&&on(R,u)}else if(Ze(a))a._store&&(a._store.validated=!0);else if(a){var I=E(a);if(typeof I=="function"&&I!==a.entries)for(var N=I.call(a),j;!(j=N.next()).done;)Ze(j.value)&&on(j.value,u)}}}function _a(a){{var u=a.type;if(u==null||typeof u=="string")return;var p;if(typeof u=="function")p=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===f||u.$$typeof===b))p=u.propTypes;else return;if(p){var R=V(u);ya(p,a.props,"prop",R,a)}else if(u.PropTypes!==void 0&&!Xe){Xe=!0;var I=V(u);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ka(a){{for(var u=Object.keys(a.props),p=0;p<u.length;p++){var R=u[p];if(R!=="children"&&R!=="key"){ne(a),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),ne(null);break}}a.ref!==null&&(ne(a),x("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}}function cn(a,u,p,R,I,N){{var j=F(a);if(!j){var D="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=Ia(I);U?D+=U:D+=an();var $;a===null?$="null":He(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(V(a.type)||"Unknown")+" />",D=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,D)}var B=ja(a,u,p,I,N);if(B==null)return B;if(j){var W=u.children;if(W!==void 0)if(R)if(He(W)){for(var re=0;re<W.length;re++)ln(W[re],a);Object.freeze&&Object.freeze(W)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ln(W,a)}return a===r?ka(B):_a(B),B}}function Fa(a,u,p){return cn(a,u,p,!0)}function Na(a,u,p){return cn(a,u,p,!1)}var Ta=Na,Aa=Fa;ae.Fragment=r,ae.jsx=Ta,ae.jsxs=Aa}()),ae}var ie={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,27 +24,6 @@ Check the top-level render call using <`+w+">.")}return p}}function ar(f,p){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var Ot;function fr(){if(Ot)return me;Ot=1;var s=U,r=Symbol.for("react.element"),e=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,t={key:!0,ref:!0,__self:!0,__source:!0};function o(u,l,n){var c,d={},g=null,y=null;n!==void 0&&(g=""+n),l.key!==void 0&&(g=""+l.key),l.ref!==void 0&&(y=l.ref);for(c in l)a.call(l,c)&&!t.hasOwnProperty(c)&&(d[c]=l[c]);if(u&&u.defaultProps)for(c in l=u.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:r,type:u,key:g,ref:y,props:d,_owner:i.current}}return me.Fragment=e,me.jsx=o,me.jsxs=o,me}process.env.NODE_ENV==="production"?Qe.exports=fr():Qe.exports=lr();var h=Qe.exports;const Ve=b.createContext({authProvider:{getAccessToken:async()=>{throw new Error("No auth provider available")},isAuthenticated:async()=>!1,clearCache:async()=>{throw new Error("No auth provider available")},logout:async()=>{throw new Error("No auth provider available")}}}),Ie=()=>b.useContext(Ve),dr=s=>h.jsx(Ve.Provider,{value:{authProvider:s.authProvider},children:s.children});var De=function(){function s(){}return s.splitToMaxLength=function(r,e){for(var a=[],i=0;i<r.length;)a.push(r.slice(i,i+e)),i+=e;return a},s.getSubMap=function(r,e){var a=new Map;return e.forEach(function(i){return a.set(i,r.get(i))}),a},s}(),hr=function(){function s(){this.query=""}return s.prototype.withQuery=function(r,e){return e===void 0&&(e="And"),this.query?this.query="<".concat(e,">").concat(this.query).concat(r,"</").concat(e,">"):this.query=r,this},s.prototype.withFieldQuery=function(r,e){if(e===void 0&&(e="And"),!r.name)throw new Error("Field name is required");if(!r.type)throw new Error("Field type is required");r.comparer||(r.comparer="Eq");var a="";switch(r.comparer){case"IsNull":case"IsNotNull":a="<".concat(r.comparer,"><FieldRef Name='").concat(r.name,"' /></").concat(r.comparer,">");break;case"CurrentUserGroups":a=`<Or>
28
- <Membership Type="CurrentUserGroups">
29
- <FieldRef Name="`.concat(r.name,`"/>
30
- </Membership>
31
- <Eq>
32
- <FieldRef Name="`).concat(r.name,`"></FieldRef>
33
- <Value Type="Integer">
34
- <UserID/>
35
- </Value>
36
- </Eq>
37
- </Or>`);break;case"IDEq":a="<Eq><FieldRef Name='".concat(r.name,"' LookupId='True' /><Value Type='").concat(r.type,"'>").concat(r.value,"</Value></Eq>");break;default:a="<".concat(r.comparer,"><FieldRef Name='").concat(r.name,"' /><Value ").concat(r.includeTimeValue!=null?"IncludeTimeValue='".concat(r.includeTimeValue?"TRUE":"FALSE","' "):"","Type='").concat(r.type,"'>").concat(r.value,"</Value></").concat(r.comparer,">");break}return this.query?this.query="<".concat(e,">").concat(this.query).concat(a,"</").concat(e,">"):this.query=a,this},s.prototype.build=function(){return this.query},s}(),jt=function(){function s(){this.query="",this.oDataSupportedComparers=["BeginsWith","Contains","Eq","IDEq","Geq","Gt","IsNotNull","IsNull","Leq","Lt","Neq"]}return s.prototype.withQuery=function(r,e){return e===void 0&&(e="And"),this.query?this.query="(".concat(this.query,") ").concat(e.toLocaleLowerCase()," (").concat(r,")"):this.query=r,this},s.prototype.withFieldQuery=function(r,e){if(e===void 0&&(e="And"),!r.name)throw new Error("Field name is required");if(!r.type)throw new Error("Field type is required");r.comparer||(r.comparer="Eq");var a="";switch(r.comparer){case"IsNull":a="".concat(r.name," eq null");break;case"IsNotNull":a="".concat(r.name," ne null");break;case"CurrentUserGroups":throw new Error("Not supported!");case"IDEq":a="".concat(r.name,"/Id eq ").concat(r.value);break;default:if(this.oDataSupportedComparers.indexOf(r.comparer)>=0)if(r.comparer==="Contains"){a="substringof('".concat(r.value,"', ").concat(r.name,")");break}else if(r.comparer==="BeginsWith"){a="startswith(".concat(r.name,", '").concat(r.value,"')");break}else{a="".concat(r.name," ").concat(r.comparer.toLocaleLowerCase().replace("geq","ge").replace("leq","le").replace("neq","ne")," "),r.type&&(r.type==="Number"||r.type==="Counter"||r.type==="Integer"||r.type==="Boolean")?a+=r.value:r.type&&r.type==="Guid"?a+="guid'".concat(r.value,"'"):r.type&&(r.type==="Date"||r.type==="DateTime")?a+="datetime'".concat(r.value,"'"):a+="'".concat(r.value,"'");break}else throw new Error("Unsupported comparer")}return this.query?this.query="(".concat(this.query,") ").concat(e.toLocaleLowerCase()," (").concat(a,")"):this.query=a,this},s.prototype.build=function(){return this.query},s}(),gr=function(){var s=function(r,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(a[t]=i[t])},s(r,e)};return function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(r,e);function a(){this.constructor=r}r.prototype=e===null?Object.create(e):(a.prototype=e.prototype,new a)}}(),He=function(s){gr(r,s);function r(){return s!==null&&s.apply(this,arguments)||this}return r.prototype.withFieldQuery=function(e,a){var i="";return e.type&&(e.type==="Date"||e.type==="DateTime")?(i=e.name,i+=" ",i+=e.comparer.toLocaleLowerCase().replace("geq","ge").replace("leq","le"),i+=" ",i+=e.value,this.query?this.query="(".concat(this.query,") ").concat(a.toLocaleLowerCase()," (").concat(i,")"):this.query=i,this):e.comparer==="Contains"?(i="contains(".concat(e.name,", '").concat(e.value,"')"),this.query?this.query="(".concat(this.query,") ").concat(a.toLocaleLowerCase()," (").concat(i,")"):this.query=i,this):s.prototype.withFieldQuery.call(this,e,a)},r}(jt),We=function(){function s(){}return s.prototype.get=function(r){return JSON.parse(localStorage.getItem(r))},s.prototype.set=function(r,e){localStorage.setItem(r,JSON.stringify(e))},s.prototype.remove=function(r){localStorage.removeItem(r)},s}();function yr(s,r){for(var e=s,a=0;a<r.length;a++)e=e.replace("{".concat(a,"}"),r[a]);return e}function ze(s){var r=[],e=new Map;return function(a,i,t){var o=t.value;t.value=function(){for(var u=this,l=[],n=0;n<arguments.length;n++)l[n-0]=arguments[n];var c=yr(s,l);return new Promise(function(d,g){var y=e.get(c);if(!y)y=o.apply(u,l).then(function(x){return d(x),r.length===0&&e.delete(c),x}).catch(function(x){g(x),r.length===0&&e.delete(c)}),e.set(c,y);else{var v=new Promise(function(x,S){y.then(function(C){d(C),x(C),r.splice(r.indexOf(v),1),r.length===0&&e.delete(c)}).catch(function(C){g(C),S(C)})});r.push(v)}})}}}var Je=function(){function s(){}return s.getTokenInfo=function(r){var e=atob(r.split(".")[1]);return JSON.parse(e)},s.isExpValid=function(r){return!!r&&r>new Date().getTime()/1e3},s.isTokenValid=function(r){var e=s.getTokenInfo(r);return s.isExpValid(e.exp)},s}(),Ke=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Ye=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Xe=function(){function s(){}return s.debounce=function(r,e,a){return a===void 0&&(a=100),Ke(this,void 0,void 0,function(){var i=this;return Ye(this,function(t){return s.registeredTimeouts.has(r)&&window.clearTimeout(s.registeredTimeouts.get(r)),[2,new Promise(function(o,u){return Ke(i,void 0,void 0,function(){var l,n=this;return Ye(this,function(c){return l=setTimeout(function(){return Ke(n,void 0,void 0,function(){var d,g;return Ye(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),[4,e()];case 1:return d=y.sent(),s.registeredTimeouts.delete(r),o(d),[3,3];case 2:return g=y.sent(),s.registeredTimeouts.delete(r),u(g),[3,3];case 3:return[2]}})})},a),s.registeredTimeouts.set(r,l),[2]})})})]})})},s.registeredTimeouts=new Map,s}(),vr=function(){function s(){}return s.clearStorageKeys=function(r){for(var e=0,a=[localStorage,sessionStorage];e<a.length;e++)for(var i=a[e],t=Object.keys(i),o=0,u=t;o<u.length;o++){var l=u[o];(l.startsWith("msal.".concat(r,"."))||l.includes(r))&&i.removeItem(l)}},s}(),ae=function(){return ae=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},ae.apply(this,arguments)},Nt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},At=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Ft=function(){function s(r,e,a,i){i===void 0&&(i=0);var t=this;this.baseClient=r,this.registeredPromises=e,this.batch=a,this.retries=i,this.requestBatch=function(o,u){return u===void 0&&(u="beta"),Nt(t,void 0,void 0,function(){var l,n,c;return At(this,function(d){switch(d.label){case 0:return l={headers:{Accept:"application/json",ConsistencyLevel:"eventual","Content-Type":"application/json"},body:o},[4,this.baseClient.post("https://graph.microsoft.com/".concat(u,"/$batch"),l)];case 1:return n=d.sent(),n.ok?[4,n.json()]:[3,3];case 2:return c=d.sent(),[2,c];case 3:return[2]}})})}}return s.prototype.executeBatch=function(){return Nt(this,void 0,void 0,function(){var r,e,a,i,t,o,u;return At(this,function(l){switch(l.label){case 0:return r=this.batch.filter(function(n){return n.url.indexOf("v1.0/")<0}),e=this.batch.filter(function(n){return n.url.indexOf("v1.0/")>=0}),a=JSON.stringify({requests:r.map(function(n){return ae(ae({},n),{url:n.url.replace("beta/","")})})}),i=JSON.stringify({requests:e.map(function(n){return ae(ae({},n),{url:n.url.replace("v1.0/","")})})}),t=[],r.length>0?[4,this.requestBatch(a)]:[3,2];case 1:o=l.sent(),t.push.apply(t,o.responses),l.label=2;case 2:return e.length>0?[4,this.requestBatch(i,"v1.0")]:[3,4];case 3:u=l.sent(),t.push.apply(t,u.responses),l.label=4;case 4:return this.processBatchResponse(t),this.batch.length>0&&this.retries>0&&(this.retries--,this.executeBatch()),[2]}})})},s.prototype.processBatchResponse=function(r){var e=this,a=[],i=new Map;this.registeredPromises.forEach(function(t,o){var u=r.filter(function(l){return l.id===o})[0];u&&u.status===429&&e.retries>0?(a.push({url:o,id:o,method:"GET"}),i.set(o,t)):e.handleSingleResponse(u,t)}),a.length>0?(this.registeredPromises=i,this.batch=a):(this.batch=[],this.registeredPromises.clear())},s.prototype.handleSingleResponse=function(r,e){r?e.forEach(function(a){a.resolve({json:function(){return Promise.resolve(r.body)},ok:r.status===200,status:r.status,text:function(){return Promise.resolve(JSON.stringify(r.body))},headers:r.headers})}):e.forEach(function(a){a.error({json:function(){return Promise.resolve(r)},ok:!1,text:function(){return Promise.resolve(JSON.stringify(r))}})})},s.maxRetries=5,s}(),Ze=function(){return Ze=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},Ze.apply(this,arguments)},pr=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},mr=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},br=function(s,r,e){if(e||arguments.length===2)for(var a=0,i=r.length,t;a<i;a++)(t||!(a in r))&&(t||(t=Array.prototype.slice.call(r,0,a)),t[a]=r[a]);return s.concat(t||Array.prototype.slice.call(r))},wr=function(){function s(r,e,a){e===void 0&&(e=500),a===void 0&&(a=15);var i=this;this.baseClient=r,this.batchWaitTime=e,this.batchSplitThreshold=a,this.batch=[],this.getRequestId=function(t,o){return o==="GET"?encodeURIComponent(t):Math.random().toString(36).substring(7)},this.registeredPromises=new Map,this.generateBatch=function(){return pr(i,void 0,void 0,function(){var t,o,u,l,n,c,d,g;return mr(this,function(y){switch(y.label){case 0:t=br([],this.batch,!0),this.batch=[],o=new Map(this.registeredPromises),this.registeredPromises.clear(),u=De.splitToMaxLength(t,this.batchSplitThreshold),l=0,n=u,y.label=1;case 1:return l<n.length?(c=n[l],d=De.getSubMap(o,c.map(function(v){return v.id})),g=new Ft(this.baseClient,d,c,Ft.maxRetries),[4,g.executeBatch()]):[3,4];case 2:y.sent(),y.label=3;case 3:return l++,[3,1];case 4:return[2]}})})},this.createGetBatchRequest=function(t,o,u,l){i.batch.length===0&&setTimeout(i.generateBatch,i.batchWaitTime);var n=i.getRequestId(t,o),c=new URL(t,"https://graph.microsoft.com"),d=c.pathname+c.search;i.batch.filter(function(g){return g.id===n})[0]?i.registeredPromises.get(n).push(l):(i.batch.push({url:d,id:n,method:o,body:u&&u.body?JSON.parse(u.body):null,headers:Ze({ConsistencyLevel:"eventual"},u?u.headers:{})}),i.registeredPromises.set(n,[l]))}}return s.prototype.get=function(r,e){var a=this;return new Promise(function(i,t){a.createGetBatchRequest(r,"GET",e,{resolve:i,error:t})})},s.prototype.post=function(r,e){var a=this;return r.toLocaleLowerCase().endsWith("/batch")||r.toLocaleLowerCase().endsWith("/chatoverstream")?this.baseClient.post(r,e):new Promise(function(i,t){a.createGetBatchRequest(r,"POST",e,{resolve:i,error:t})})},s.prototype.patch=function(r,e){return this.baseClient.patch(r,e)},s.prototype.put=function(r,e){return this.baseClient.put(r,e)},s.prototype.delete=function(r,e){return this.baseClient.delete(r,e)},s}(),se=function(){return se=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},se.apply(this,arguments)},ee=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},te=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},et=function(){function s(r,e){this.authService=r,this.baseClient=e,this.resourceUri="https://graph.microsoft.com"}return s.prototype.get=function(r,e){return ee(this,void 0,void 0,function(){var a;return te(this,function(i){switch(i.label){case 0:return[4,this.prepareRequest(e)];case 1:return a=i.sent(),[2,this.baseClient.get(r,a)]}})})},s.prototype.post=function(r,e){return ee(this,void 0,void 0,function(){var a;return te(this,function(i){switch(i.label){case 0:return[4,this.prepareRequest(e)];case 1:return a=i.sent(),[2,this.baseClient.post(r,a)]}})})},s.prototype.patch=function(r,e){return ee(this,void 0,void 0,function(){var a;return te(this,function(i){switch(i.label){case 0:return[4,this.prepareRequest(e)];case 1:return a=i.sent(),[2,this.baseClient.patch(r,a)]}})})},s.prototype.put=function(r,e){return ee(this,void 0,void 0,function(){var a;return te(this,function(i){switch(i.label){case 0:return[4,this.prepareRequest(e)];case 1:return a=i.sent(),[2,this.baseClient.put(r,a)]}})})},s.prototype.delete=function(r,e){return ee(this,void 0,void 0,function(){var a;return te(this,function(i){switch(i.label){case 0:return[4,this.prepareRequest({})];case 1:return a=i.sent(),[2,this.baseClient.delete(r,a)]}})})},s.prototype.prepareRequest=function(r){return ee(this,void 0,void 0,function(){var e,a,i,t;return te(this,function(o){switch(o.label){case 0:return e=[se({},r)],i={},a=[se({},r==null?void 0:r.headers)],t={},[4,this.getAuthHeader()];case 1:return[2,se.apply(void 0,e.concat([(i.headers=se.apply(void 0,a.concat([(t.Authorization=o.sent(),t)])),i)]))]}})})},s.prototype.getAuthHeader=function(){return ee(this,void 0,void 0,function(){var r;return te(this,function(e){switch(e.label){case 0:return[4,this.authService.getAccessToken(this.resourceUri)];case 1:return r=e.sent(),[2,"Bearer ".concat(r)]}})})},s}(),ne=function(){return ne=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},ne.apply(this,arguments)},oe=function(){function s(r){this.baseUrl=r}return s.prototype.buildUrl=function(r){return r.startsWith("http")||!this.baseUrl?r:this.baseUrl+r},s.prototype.get=function(r,e){return fetch(this.buildUrl(r),ne({method:"GET"},e))},s.prototype.post=function(r,e){return fetch(this.buildUrl(r),ne({method:"POST"},e))},s.prototype.patch=function(r,e){return fetch(this.buildUrl(r),ne({method:"PATCH"},e))},s.prototype.put=function(r,e){return fetch(this.buildUrl(r),ne({method:"PUT"},e))},s.prototype.delete=function(r,e){return fetch(this.buildUrl(r),ne({method:"DELETE"},e))},s}(),xr=function(){function s(){this.lastUsedId=0}return s.prototype.getNextId=function(){return this.lastUsedId++,this.lastUsedId.toString()},s.prototype.reset=function(){this.lastUsedId=0},s}(),Sr=function(){var s=function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)};return"".concat(s()).concat(s(),"-").concat(s(),"-").concat(s(),"-").concat(s(),"-").concat(s()).concat(s()).concat(s())},Lt=function(s){for(var r="",e=0;e<s;e++){var a=Math.floor(Math.random()*26)+(Math.random()<.5?65:97);r+=String.fromCharCode(a)}return r},$t=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},qt=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Ut=function(){function s(r,e,a,i,t,o){o===void 0&&(o=0);var u=this;this.baseClient=r,this.dataverseEnvUri=e,this.apiPath=a,this.registeredPromises=i,this.batch=t,this.retries=o,this.batchSeparator="batch-mgwdev-m365-helpers",this.requestBatch=function(l){return $t(u,void 0,void 0,function(){var n,c,d,g;return qt(this,function(y){switch(y.label){case 0:return n={headers:{Accept:"application/json","OData-Version":"4.0","content-type":"multipart/mixed; boundary=".concat(this.batchSeparator)},body:l},[4,this.baseClient.post("".concat(this.dataverseEnvUri).concat(this.apiPath,"/$batch"),n)];case 1:return c=y.sent(),c.ok?[4,c.text()]:[3,3];case 2:return d=y.sent(),g=c.headers.get("content-type").split("boundary=")[1],[2,d.split(g)];case 3:return[2]}})})}}return s.prototype.executeBatch=function(){return $t(this,void 0,void 0,function(){var r,e,a;return qt(this,function(i){switch(i.label){case 0:return r=this.buildBatchBody(),e=[],this.batch.length>0?[4,this.requestBatch(r)]:[3,2];case 1:a=i.sent(),e.push.apply(e,a),i.label=2;case 2:return this.processBatchResponse(e),this.batch.length>0&&this.retries>0&&(this.retries--,this.executeBatch()),[2]}})})},s.prototype.buildBatchBody=function(){var r=this,e="";return this.batch.forEach(function(a){if(e+="--".concat(r.batchSeparator,`
38
- Content-type: application/http
39
- Content-Transfer-Encoding: binary
40
-
41
- `),e+="".concat(a.method," ").concat(a.url,` HTTP/1.1
42
- `),a.headers)for(var i in a.headers)e+="".concat(i,": ").concat(a.headers[i],`
43
- `);if(a.body){var t=new TextEncoder,o=t.encode(a.body),u=o.length;e+="Content-Length: ".concat(u,`
44
- `),e+=`
45
- `,e+="".concat(a.body)}e+=`
46
-
47
-
48
- `}),e+="--".concat(this.batchSeparator,"--"),e},s.prototype.extractJSONFromBody=function(r){var e=r.indexOf("{");if(e!==-1){var a=r.substring(e),i=a.lastIndexOf("}")+1;if(i!==-1){var t=a.substring(0,i);try{return JSON.parse(t),t}catch(o){return console.error("Error parsing JSON:",o),null}}else return console.error("End of JSON data not found in the input text."),null}else return console.error("JSON data not found in the input text."),null},s.prototype.processBatchResponse=function(r){var e=this,a=[],i=new Map;this.registeredPromises.forEach(function(t,o){var u=r[o],l=e.extractJSONFromBody(u);e.handleSingleResponse(l,t)}),a.length>0?(this.registeredPromises=i,this.batch=a):(this.batch=[],this.registeredPromises.clear())},s.prototype.handleSingleResponse=function(r,e){var a=r;r?e.resolve({json:function(){return Promise.resolve(JSON.parse(a))},ok:!0,text:function(){return Promise.resolve(a)}}):e.error({json:function(){return Promise.resolve(JSON.parse(a))},ok:!1,text:function(){return Promise.resolve(a)}})},s.maxRetries=5,s}(),Bt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Gt=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Pr=function(){function s(r,e,a,i,t){a===void 0&&(a="/api/data/v9.2"),i===void 0&&(i=500),t===void 0&&(t=15);var o=this;this.baseClient=r,this.dataverseEnvUri=e,this.apiPath=a,this.batchWaitTime=i,this.batchSplitThreshold=t,this.promiseIdGenerator=new xr,this.registeredPromises=new Map,this.batch=[],this.generateBatch=function(){return Bt(o,void 0,void 0,function(){var u,l,n,c,d,g;return Gt(this,function(y){switch(y.label){case 0:u=De.splitToMaxLength(this.batch,this.batchSplitThreshold),l=0,n=u,y.label=1;case 1:return l<n.length?(c=n[l],d=De.getSubMap(this.registeredPromises,c.map(function(v){return v.id})),g=new Ut(this.baseClient,this.dataverseEnvUri,this.apiPath,d,c,Ut.maxRetries),this.batch=[],this.promiseIdGenerator.reset(),this.registeredPromises.clear(),[4,g.executeBatch()]):[3,4];case 2:y.sent(),y.label=3;case 3:return l++,[3,1];case 4:return[2]}})})}}return s.prototype.get=function(r,e){return Bt(this,void 0,void 0,function(){var a,i,t=this;return Gt(this,function(o){return a=this.promiseIdGenerator.getNextId(),i=new Promise(function(u,l){t.batch.length===0&&setTimeout(t.generateBatch,t.batchWaitTime),t.registeredPromises.set(a,{resolve:u,error:l}),t.batch.push({url:r,id:a,method:"GET",headers:e==null?void 0:e.headers})}),[2,i]})})},s.prototype.post=function(r,e){var a=this,i=this.promiseIdGenerator.getNextId(),t=new Promise(function(o,u){a.batch.length===0&&setTimeout(a.generateBatch,a.batchWaitTime),a.registeredPromises.set(i,{resolve:o,error:u}),a.batch.push({url:r,id:i,method:"POST",body:e==null?void 0:e.body,headers:e==null?void 0:e.headers})});return t},s.prototype.patch=function(r,e){return this.baseClient.patch(r,e)},s.prototype.put=function(r,e){return this.baseClient.put(r,e)},s.prototype.delete=function(r){return this.baseClient.delete(r)},s}(),ce=function(){return ce=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},ce.apply(this,arguments)},ue=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},le=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Mt={headers:{"content-type":"application/json;odata=nometadata",accept:"application/json;odata=nometadata"}},Cr=function(){function s(r,e,a,i,t){i===void 0&&(i=[]),this.spHttpClient=r,this.siteUrl=e,this.listId=a,this.selectedFields=i,this.mapMethod=t,this.pageSize=25,this.orderBy="ID",this.orderDir="DESC",this.lastValue="",this.previousPages=[],this.previousPageIndex=-1,this.currentLink="",this.query="",this.lastId=0,this.lastRow=0,this.allItemsCount=0,this.recursive=!0}return s.prototype.getData=function(){return ue(this,void 0,void 0,function(){var r;return le(this,function(e){switch(e.label){case 0:return this.previousPageIndex=-1,this.previousPages=[],this.currentLink="".concat(this.siteUrl,"/_api/web/lists('").concat(this.listId,"')/RenderListDataAsStream?TryNewExperienceSingle=TRUE&Paged=TRUE"),[4,Promise.all([this.getDataWithAPI(this.currentLink),this.getAllItemsCount()])];case 1:return r=e.sent()[0],[2,r]}})})},s.prototype.getAllItemsCount=function(){return ue(this,void 0,void 0,function(){var a,r,e,a,i;return le(this,function(t){switch(t.label){case 0:return this.query?[3,4]:[4,this.spHttpClient.get("".concat(this.siteUrl,"/_api/web/lists('").concat(this.listId,"')?$select=itemCount"),{headers:{accept:"application/json","content-type":"application/json;odata=verbose"}})];case 1:return a=t.sent(),a.ok?[4,this.getResponse(a)]:[3,3];case 2:r=t.sent(),this.allItemsCount=r.ItemCount,t.label=3;case 3:return[3,7];case 4:return e='<View Scope="RecursiveAll"><Query><Where>'.concat(this.query,"</Where><ViewFields><FieldRef Name='ID' /></ViewFields></Query></View>"),[4,this.spHttpClient.post("".concat(this.siteUrl,"/_api/web/lists('").concat(this.listId,"')/RenderListDataAsStream"),ce(ce({},Mt),{body:JSON.stringify(this.buildPostBody(e))}))];case 5:return a=t.sent(),a.ok?(i=this,[4,this.getResponse(a)]):[3,7];case 6:i.allItemsCount=t.sent().Row.length,t.label=7;case 7:return[2,this.allItemsCount]}})})},s.prototype.setOrder=function(r,e){this.orderBy=r,this.orderDir=e},s.prototype.getCamlQuery=function(){return!this.query&&!this.orderBy?"":"<Query>".concat(this.query?"<Where>".concat(this.query,"</Where>"):"",'<OrderBy><FieldRef Name="').concat(this.orderBy,'" Ascending="').concat(this.orderDir==="ASC"?"TRUE":"FALSE",'"/></OrderBy><ViewFields>').concat(this.selectedFields.map(function(r){return"<FieldRef Name='".concat(r,"' />")}).join(""),"</ViewFields></Query>")},s.prototype.buildPostBody=function(r){return{parameters:{RenderOptions:2,ViewXml:r}}},s.prototype.getQuery=function(){return this.query},s.prototype.getCurrentPage=function(){return this.previousPageIndex+1},s.prototype.getResponse=function(r){return ue(this,void 0,void 0,function(){return le(this,function(e){switch(e.label){case 0:return[4,r.json()];case 1:return[2,e.sent()]}})})},s.prototype.getDataWithAPI=function(r){return ue(this,void 0,void 0,function(){var e,a,i;return le(this,function(t){switch(t.label){case 0:return[4,this.spHttpClient.post(r,ce(ce({},Mt),{body:JSON.stringify(this.buildPostBody("<View".concat(this.recursive?' Scope="RecursiveAll"':"",">").concat(this.getCamlQuery(),"<RowLimit>").concat(this.pageSize,"</RowLimit></View>")))}))];case 1:return e=t.sent(),e.ok?[4,this.getResponse(e)]:[3,3];case 2:return a=t.sent(),a.Row.length>0&&(this.lastValue=a.Row[a.Row.length-1][this.orderBy],this.lastValue=this.getLastFieldValue(a.Row),this.lastId=a.Row[a.Row.length-1].ID,this.lastRow=a.LastRow),this.mapMethod?[2,a.Row.map(this.mapMethod)]:[2,a.Row];case 3:return i=Error.bind,[4,e.text()];case 4:throw new(i.apply(Error,[void 0,t.sent()]))}})})},s.prototype.getLastFieldValue=function(r){return r[r.length-1][this.orderBy]},s.prototype.setQuery=function(r){this.query=r},s.prototype.getNextPage=function(){return ue(this,void 0,void 0,function(){var r=this;return le(this,function(e){return this.previousPages.find(function(a){return a===r.currentLink})?this.previousPageIndex=this.previousPages.findIndex(function(a){return a===r.currentLink}):(this.previousPages.push(this.currentLink),this.previousPageIndex=this.previousPages.length-1),this.currentLink="".concat(this.siteUrl,"/_api/web/lists('").concat(this.listId,"')/RenderListDataAsStream?TryNewExperienceSingle=TRUE&Paged=TRUE&p_").concat(this.orderBy,"=").concat(encodeURIComponent(this.lastValue).toLocaleLowerCase(),"&p_ID=").concat(this.lastId,"&SortField=").concat(this.orderBy,"&SortDir=").concat(this.orderDir==="ASC"?"Asc":"Desc","&PageFirstRow=").concat(this.lastRow+1),[2,this.getDataWithAPI(this.currentLink)]})})},s.prototype.isNextPageAvailable=function(){return this.previousPageIndex+2<=Math.floor(this.allItemsCount/this.pageSize)},s.prototype.getPreviousPage=function(){return ue(this,void 0,void 0,function(){return le(this,function(r){return this.currentLink=this.previousPages[this.previousPageIndex],this.previousPageIndex--,[2,this.getDataWithAPI(this.currentLink)]})})},s.prototype.isPreviousPageAvailable=function(){return this.previousPageIndex>=0},s}(),be=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},we=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},_r=function(){function s(r,e,a){a===void 0&&(a=!1),this.graphClient=r,this.resourceQuery=e,this.skipCountCheck=a,this.filterQuery="",this.orderQuery="",this.nextPageLink="",this.previousPages=[],this.previousPageIndex=-1,this.pageSize=25,this.allItemsCount=-1}return s.prototype.getAllItemsCount=function(){return be(this,void 0,void 0,function(){var r,e,a,i;return we(this,function(t){switch(t.label){case 0:return this.skipCountCheck?[2,-1]:(r=this.getQuery(),e="".concat(this.resourceQuery,"/$count"),this.getQuery()&&(e+="?$filter=".concat(r)),[4,this.graphClient.get(e)]);case 1:return a=t.sent(),a.ok?(i=parseInt,[4,a.text()]):[3,3];case 2:return[2,i.apply(void 0,[t.sent(),10])];case 3:return[2]}})})},s.prototype.getData=function(){return be(this,void 0,void 0,function(){var r,e,a;return we(this,function(i){switch(i.label){case 0:return[4,Promise.all([this.callGraphAPI(this.buildInitialQuery()),this.getAllItemsCount()])];case 1:return r=i.sent(),e=r[0],a=r[1],this.allItemsCount=a,[2,e]}})})},s.prototype.buildInitialQuery=function(){var r=this.getQuery(),e="".concat(this.resourceQuery,"?$top=").concat(this.pageSize);return this.orderQuery&&(e+="&$orderBy=".concat(this.orderQuery)),r&&(e+="&$filter=".concat(r)),e},s.prototype.callGraphAPI=function(r){return be(this,void 0,void 0,function(){var e,a,i,t;return we(this,function(o){switch(o.label){case 0:return[4,this.graphClient.get(r)];case 1:return e=o.sent(),e.ok?[4,e.json()]:[3,3];case 2:return a=o.sent(),i=a.value,this.nextPageLink=a["@odata.nextLink"],[2,i];case 3:return t=Error.bind,[4,e.text()];case 4:throw new(t.apply(Error,[void 0,o.sent()]))}})})},s.prototype.setQuery=function(r){this.filterQuery=r},s.prototype.getQuery=function(){return this.filterQuery},s.prototype.setOrder=function(r,e){this.orderQuery="".concat(r," ").concat(e.toLocaleLowerCase())},s.prototype.getNextPage=function(){return be(this,void 0,void 0,function(){return we(this,function(r){return this.isNextPageAvailable()?(this.previousPageIndex++,this.previousPages.push(this.nextPageLink),[2,this.callGraphAPI(this.nextPageLink)]):[2,[]]})})},s.prototype.isNextPageAvailable=function(){return!!this.nextPageLink},s.prototype.getPreviousPage=function(){return be(this,void 0,void 0,function(){var r,e;return we(this,function(a){switch(a.label){case 0:return this.isPreviousPageAvailable()?(r=this.previousPages[this.previousPageIndex],[4,this.callGraphAPI(r)]):[2,[]];case 1:return e=a.sent(),this.previousPageIndex--,[2,e]}})})},s.prototype.isPreviousPageAvailable=function(){return this.previousPageIndex>=0&&!!this.previousPages[this.previousPageIndex]},s.prototype.getCurrentPage=function(){return this.previousPageIndex+1},s}(),z=function(){return z=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},z.apply(this,arguments)},Oe=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},je=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},tt=function(){function s(r,e,a){e===void 0&&(e=["listItem"]),a===void 0&&(a=["id","title","url"]),this.graphClient=r,this.entityTypes=e,this.selectFields=a,this.currentPage=0,this.pageSize=25,this.allItemsCount=-1,this.graphSearchEndpoint="https://graph.microsoft.com/beta/search/query"}return s.prototype.setRefiners=function(r){this.requestedRefiners=r||[]},s.prototype.applyRefiners=function(r){this.filters=r||void 0},s.prototype.buildSearchRequest=function(){var r,e={requests:[{entityTypes:this.entityTypes,from:this.currentPage*this.pageSize,to:(this.currentPage+1)*this.pageSize,query:null,sortProperties:null,fields:null,aggregations:this.requestedRefiners,aggregationFilters:((r=this.filters)===null||r===void 0?void 0:r.map(function(a){return"".concat(a.field,":").concat(a.filterValue)}))||void 0,size:this.pageSize}]};return this.getQuery()?(e.requests[0].query={queryString:this.getQuery()},this.queryTemplate&&(e.requests[0].query.queryTemplate=this.queryTemplate)):(e.requests[0].query={queryString:"*"},this.queryTemplate&&(e.requests[0].query.queryTemplate=this.queryTemplate)),this.orderColumn&&(e.requests[0].sortProperties=[{name:this.orderColumn,isDescending:this.isDescending}]),this.selectFields&&this.selectFields.length>0&&(e.requests[0].fields=this.selectFields),e},s.prototype.callForData=function(){return Oe(this,void 0,void 0,function(){var r,e,a,i;return je(this,function(t){switch(t.label){case 0:return[4,this.graphClient.post(this.graphSearchEndpoint,{body:JSON.stringify(this.buildSearchRequest()),headers:{accept:"application/json","content-type":"application/json"}})];case 1:return r=t.sent(),r.ok?[4,r.json()]:[3,3];case 2:return e=t.sent(),a=e.value[0].hitsContainers[0],this.allItemsCount=a.total,this.parseAggregations(a),this.allItemsCount>0?[2,a.hits.map(function(o){return z(z({},o.resource),{type:o.resource["@odata.type"],hitResourceIdId:o.resource.id,hitId:o.hitId,hitRank:o.rank,hitHighlights:o.highlights,hitSummary:o.summary})})]:[2,[]];case 3:return i=Error.bind,[4,r.text()];case 4:throw new(i.apply(Error,[void 0,t.sent()]))}})})},s.prototype.getData=function(){return Oe(this,void 0,void 0,function(){return je(this,function(r){return this.currentPage=0,[2,this.callForData()]})})},s.prototype.parseAggregations=function(r){try{this.currentAggregations=r.aggregations.map(function(e){return z(z({},e),{buckets:e.buckets.map(function(a){return z(z({},a),{value:a.value,count:a.count})})})})}catch{this.currentAggregations=[]}},s.prototype.setQuery=function(r){this.query=r},s.prototype.getQuery=function(){return this.query},s.prototype.setOrder=function(r,e){this.orderColumn=r,this.isDescending=e==="DESC"},s.prototype.getNextPage=function(){return Oe(this,void 0,void 0,function(){return je(this,function(r){return this.isNextPageAvailable()?(this.currentPage++,[2,this.callForData()]):[2,[]]})})},s.prototype.isNextPageAvailable=function(){return(this.currentPage+1)*this.pageSize<this.allItemsCount},s.prototype.getPreviousPage=function(){return Oe(this,void 0,void 0,function(){return je(this,function(r){return this.isPreviousPageAvailable()?(this.currentPage--,[2,this.callForData()]):[2,[]]})})},s.prototype.isPreviousPageAvailable=function(){return this.currentPage>0},s.prototype.getCurrentPage=function(){return this.currentPage},s.prototype.jumpToAPage=function(r){return this.currentPage=r,this.callForData()},s}(),Rr=function(){var s=function(r,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(a[t]=i[t])},s(r,e)};return function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(r,e);function a(){this.constructor=r}r.prototype=e===null?Object.create(e):(a.prototype=e.prototype,new a)}}(),nt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},rt=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},kr=function(s){Rr(r,s);function r(e,a,i){a===void 0&&(a=!0),i===void 0&&(i=!0);var t=s.call(this,e,"https://graph.microsoft.com/v1.0/me/people",!0)||this;return t.loadPresence=a,t.loadPhoto=i,t.personTypeClass="Person",t.pageSize=7,t}return r.prototype.callGraphAPI=function(e){return nt(this,void 0,void 0,function(){var a,i;return rt(this,function(t){switch(t.label){case 0:return[4,s.prototype.callGraphAPI.call(this,e)];case 1:return a=t.sent(),i=[],this.loadPresence&&i.push.apply(i,a.map(this.appendPresence.bind(this))),this.loadPhoto&&i.push.apply(i,a.map(this.appendPhoto.bind(this))),i.length>0?[4,Promise.all(i)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2,a]}})})},r.prototype.appendPresence=function(e){return nt(this,void 0,void 0,function(){var a,i;return rt(this,function(t){switch(t.label){case 0:return[4,this.graphClient.get("v1.0/users/".concat(e.id,"/presence"))];case 1:return a=t.sent(),a.ok?(i=e,[4,a.json()]):[3,3];case 2:i.presence=t.sent(),t.label=3;case 3:return[2]}})})},r.prototype.appendPhoto=function(e){return nt(this,void 0,void 0,function(){var a,i;return rt(this,function(t){switch(t.label){case 0:return[4,this.graphClient.get("/v1.0/users/".concat(e.id,"/photo/$value"))];case 1:return a=t.sent(),a.ok?(i=e,[4,a.text()]):[3,3];case 2:i.photo=t.sent(),t.label=3;case 3:return[2]}})})},r.prototype.buildInitialQuery=function(){var e=this.getQuery(),a="".concat(this.resourceQuery,"?$top=").concat(this.pageSize);return this.orderQuery&&(a+="&$orderBy=".concat(this.orderQuery)),e&&(a+="&$search=".concat(e)),this.personTypeClass&&(a+="&$filter=personType/class eq '".concat(this.personTypeClass,"'")),a},r}(_r),xe=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Se=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Qt=function(){function s(r,e,a,i,t){a===void 0&&(a=!1),i===void 0&&(i=""),t===void 0&&(t=""),this.apiClient=r,this.resourceQuery=e,this.skipCountCheck=a,this.expandQuery=i,this.selectQuery=t,this.filterQuery="",this.orderQuery="",this.previousPages=new Map,this.currentPage=0,this.pageSize=25,this.allItemsCount=-1}return s.prototype.getAllItemsCount=function(){return xe(this,void 0,void 0,function(){var r,e,a,i;return Se(this,function(t){switch(t.label){case 0:return this.skipCountCheck?[2,1/0]:(r=this.getQuery(),e="".concat(this.resourceQuery,"/$count"),this.getQuery()&&(e+="?$filter=".concat(r)),[4,this.apiClient.get(e)]);case 1:return a=t.sent(),a.ok?(i=parseInt,[4,a.text()]):[3,3];case 2:return[2,i.apply(void 0,[t.sent(),10])];case 3:return[2]}})})},s.prototype.getData=function(){return xe(this,void 0,void 0,function(){var r,e,a;return Se(this,function(i){switch(i.label){case 0:return[4,Promise.all([this.callGraphAPI(this.buildInitialQuery()),this.getAllItemsCount()])];case 1:return r=i.sent(),e=r[0],a=r[1],this.allItemsCount=a,[2,e]}})})},s.prototype.buildInitialQuery=function(){var r=this.getQuery(),e="".concat(this.resourceQuery,"?$top=").concat(this.pageSize);return this.orderQuery&&(e+="&$orderby=".concat(this.orderQuery)),r&&(e+="&$filter=".concat(r)),this.expandQuery&&(e+="&$expand=".concat(this.expandQuery)),this.selectQuery&&(e+="&$select=".concat(this.selectQuery)),e},s.prototype.callGraphAPI=function(r){return xe(this,void 0,void 0,function(){var e,a,i,t;return Se(this,function(o){switch(o.label){case 0:return[4,this.apiClient.get(r)];case 1:return e=o.sent(),e.ok?[4,e.json()]:[3,3];case 2:return a=o.sent(),i=a.value,this.previousPages.set(this.currentPage+1,a["@odata.nextLink"]),[2,i];case 3:return t=Error.bind,[4,e.text()];case 4:throw new(t.apply(Error,[void 0,o.sent()]))}})})},s.prototype.setQuery=function(r){this.filterQuery=r},s.prototype.getQuery=function(){return this.filterQuery},s.prototype.setOrder=function(r,e){this.orderQuery="".concat(r," ").concat(e.toLocaleLowerCase())},s.prototype.getNextPage=function(){return xe(this,void 0,void 0,function(){var r;return Se(this,function(e){return this.isNextPageAvailable()?(this.currentPage++,r=this.previousPages.get(this.currentPage),r||(r=this.buildInitialQuery(),r+="&$skip="+this.currentPage*this.pageSize),[2,this.callGraphAPI(r)]):[2,[]]})})},s.prototype.isNextPageAvailable=function(){return!!this.previousPages.get(this.currentPage+1)||(this.currentPage+1)*this.pageSize<this.allItemsCount},s.prototype.getPreviousPage=function(){return xe(this,void 0,void 0,function(){var r,e;return Se(this,function(a){switch(a.label){case 0:return this.isPreviousPageAvailable()?(this.currentPage--,r=this.previousPages.get(this.currentPage),r||(r=this.buildInitialQuery(),this.currentPage*this.pageSize>0&&(r+="&$skip="+this.currentPage*this.pageSize)),[4,this.callGraphAPI(r)]):[2,[]];case 1:return e=a.sent(),[2,e]}})})},s.prototype.isPreviousPageAvailable=function(){return this.currentPage>0},s.prototype.getCurrentPage=function(){return this.currentPage},s}(),Er=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Tr=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Ir=function(){function s(r,e,a,i,t){i===void 0&&(i=""),t===void 0&&(t=12),this.graphClient=r,this.dataSource=e,this.resourceMetadata=a,this.filterExpresssion=i,this.maximumNumberOfResults=t}return s.prototype.getData=function(r){return Er(this,void 0,void 0,function(){var e,a;return Tr(this,function(i){switch(i.label){case 0:return[4,this.graphClient.post("https://graph.microsoft.com/beta/copilot/retrieval",{headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({queryString:r,dataSource:this.dataSource,resourceMetadata:this.resourceMetadata,maximumNumberOfResults:this.maximumNumberOfResults,filterExpresssion:this.filterExpresssion})})];case 1:if(e=i.sent(),!e.ok)throw new Error(e.statusText);return[4,e.json()];case 2:return a=i.sent(),[2,a.retrievalHits]}})})},s}(),Dr=function(){var s=function(r,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(a[t]=i[t])},s(r,e)};return function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");s(r,e);function a(){this.constructor=r}r.prototype=e===null?Object.create(e):(a.prototype=e.prototype,new a)}}(),Vt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Ht=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},Or=function(s){Dr(r,s);function r(e,a,i,t,o){t===void 0&&(t=""),o===void 0&&(o="");var u=s.call(this,e,"".concat(a,"/api/data/v9.0/").concat(i),!1,t,o)||this;return u.dataverseEnv=a,u.tableName=i,u}return r.prototype.getData=function(){return Vt(this,void 0,void 0,function(){var e;return Ht(this,function(a){switch(a.label){case 0:return[4,this.callGraphAPI(this.buildInitialQuery())];case 1:return e=a.sent(),[2,e]}})})},r.prototype.buildInitialQuery=function(){var e=this.getQuery(),a=new URL(this.resourceQuery);return this.orderQuery&&a.searchParams.set("$orderby",this.orderQuery),e&&a.searchParams.set("$filter",e),this.expandQuery&&a.searchParams.set("$expand",this.expandQuery),this.selectQuery&&a.searchParams.set("$select",this.selectQuery),a.searchParams.set("$count","true"),a.toString()},r.prototype.callGraphAPI=function(e){return Vt(this,void 0,void 0,function(){var a,i,t,o;return Ht(this,function(u){switch(u.label){case 0:return[4,this.apiClient.get(e,{headers:{Prefer:"odata.maxpagesize=".concat(this.pageSize,",odata.include-annotations=*"),"OData-MaxVersion":"4.0","OData-Version":"4.0",accept:"application/json"}})];case 1:return a=u.sent(),a.ok?[4,a.json()]:[3,3];case 2:return i=u.sent(),t=i.value,this.previousPages.set(this.currentPage+1,i["@odata.nextLink"]),this.allItemsCount=i["@odata.count"],[2,t];case 3:return o=Error.bind,[4,a.text()];case 4:throw new(o.apply(Error,[void 0,u.sent()]))}})})},r}(Qt),Wt=function(){return Wt=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},Wt.apply(this,arguments)},jr=function(s,r,e,a){var i=arguments.length,t=i<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,r,e,a);else for(var u=s.length-1;u>=0;u--)(o=s[u])&&(t=(i<3?o(t):i>3?o(r,e,t):o(r,e))||t);return i>3&&t&&Object.defineProperty(r,e,t),t},J=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},K=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}};(function(){function s(r,e){e===void 0&&(e=!0);var a=this;this.config=r,this.usePopup=e,this.resourceTokenMap=new Map,this.resourceScopeMap=new Map,this.cacheService=new We,this.getCodeFromLoginWindow=function(i,t){try{var o=new URLSearchParams(i==null?void 0:i.location.search),u=o.get("code");u?(t(u),i.close()):i&&setTimeout(function(){return a.getCodeFromLoginWindow(i,t)})}catch{i&&setTimeout(function(){return a.getCodeFromLoginWindow(i,t)},1e3)}},this.config.tenantId=r.tenantId||"common",this.config.redirectUri=r.redirectUri||window.location.origin,this.getCodeVerifier(),this.state=Lt(108)}return s.prototype.getCodeVerifier=function(){this.cacheService.get("msal.codeVerifier")?this.codeVerifier=this.cacheService.get("msal.codeVerifier"):this.codeVerifier=Lt(43)},s.prototype.buildLoginUrl=function(r){var e=new URL("https://login.microsoftonline.com/".concat(this.config.tenantId||"common","/oauth2/v2.0/authorize"));return e.searchParams.append("client_id",this.config.clientId),e.searchParams.append("scope","".concat(r,"/.default openid profile offline_access")),e.searchParams.append("redirect_uri",this.config.redirectUri),e.searchParams.append("client-request-id",Sr()),e.searchParams.append("response_mode","query"),e.searchParams.append("response_type","code"),e.searchParams.append("code_challenge",this.codeVerifier),e.searchParams.append("code_challenge_method","plain"),e.searchParams.append("prompt","select_account"),e.searchParams.append("client_info","1"),e.searchParams.append("nonce","8a9afd0b-47f6-4678-9289-1b1bf5bfa20f"),e.searchParams.append("state",this.state),e.toString()},s.prototype.loginUser=function(r){return J(this,void 0,void 0,function(){var e,a,i,t,o,u,l,n=this;return K(this,function(c){switch(c.label){case 0:return e=this.buildLoginUrl(r),a="",this.usePopup?(i=window.open(e,"login","width=600,height=600"),i?[4,new Promise(function(d,g){return n.getCodeFromLoginWindow(i,function(y){a=y,d()})})]:[3,2]):[3,3];case 1:c.sent(),c.label=2;case 2:return[3,4];case 3:if(t=new URLSearchParams(window.location.search),o=t.get("code"),u=t.get("error"),o)return this.cacheService.remove("msal.codeVerifier"),a=o,l=new URL(window.location.href),l.searchParams.delete("code"),l.searchParams.delete("state"),l.searchParams.delete("error"),l.searchParams.delete("client_info"),l.searchParams.delete("expires_in"),l.searchParams.delete("ext_expires_in"),l.searchParams.delete("session_state"),window.history.replaceState({},"",l.toString()),[2,a];if(u)throw l.searchParams.delete("error"),new Error(u);this.cacheService.set("msal.codeVerifier",this.codeVerifier),window.location.href=e,c.label=4;case 4:return[2,a]}})})},s.prototype.getAccessTokenFromCode=function(r,e){return J(this,void 0,void 0,function(){var a,i,t,o,u;return K(this,function(l){switch(l.label){case 0:return[4,fetch("https://login.microsoftonline.com/".concat(this.config.tenantId||"common","/oauth2/v2.0/token"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",accept:"application/json"},body:new URLSearchParams({client_id:this.config.clientId,scope:"".concat(r,"/.default openid profile offline_access"),redirect_uri:this.config.redirectUri,grant_type:"authorization_code",code:e,code_verifier:this.codeVerifier})})];case 1:return a=l.sent(),a.ok?[4,a.json()]:[3,3];case 2:return i=l.sent(),[2,i];case 3:return o=(t=console).log,u=["Unable to get access token from code",a.status,a.statusText],[4,a.text()];case 4:throw o.apply(t,u.concat([l.sent()])),new Error("Unable to get access token from code")}})})},s.prototype.getAccessTokenFromRefreshToken=function(r,e){return J(this,void 0,void 0,function(){var a,i,t,o;return K(this,function(u){switch(u.label){case 0:return[4,fetch("https://login.microsoftonline.com/".concat(this.config.tenantId||"common","/oauth2/v2.0/token"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",accept:"application/json"},body:new URLSearchParams({client_id:this.config.clientId,scope:"".concat(r,"/.default openid profile offline_access"),grant_type:"refresh_token",refresh_token:e})})];case 1:return a=u.sent(),a.ok?[4,a.json()]:[3,3];case 2:return i=u.sent(),[2,i];case 3:return u.trys.push([3,5,,7]),[4,a.json()];case 4:return t=u.sent(),t.error_codes&&t.error_codes.length>0&&t.error_codes[0]===700084&&(this.cacheService.remove("msal.".concat(this.config.clientId,".").concat(r,".authResult")),this.resourceTokenMap.has(r)&&this.resourceTokenMap.delete(r)),[2,this.getAuthResult(r)];case 5:return u.sent(),[4,a.text()];case 6:throw o=u.sent(),new Error(o);case 7:return[2]}})})},s.prototype.getAuthResult=function(r){return J(this,void 0,void 0,function(){var e,a;return K(this,function(i){switch(i.label){case 0:if(e=this.cacheService.get("msal.".concat(this.config.clientId,".").concat(r,".authResult")),!e)return[3,2];try{if(Je.isTokenValid(e.access_token))return[2,e]}catch{console.log("Unable to verify token validity")}return e.refresh_token?[4,this.getAccessTokenFromRefreshToken(r,e.refresh_token)]:[3,2];case 1:return e=i.sent(),this.resourceTokenMap.set(r,e.access_token),this.cacheService.set("msal.".concat(this.config.clientId,".").concat(r,".authResult"),e),[2,e];case 2:return[4,this.loginUser(r)];case 3:return a=i.sent(),[4,this.getAccessTokenFromCode(r,a)];case 4:return e=i.sent(),this.cacheService.set("msal.".concat(this.config.clientId,".").concat(r,".authResult"),e),this.resourceTokenMap.set(r,e.access_token),[2,e]}})})},s.prototype.isAuthenticated=function(){return J(this,void 0,void 0,function(){var r,e,a=this;return K(this,function(i){return r=Object.keys(localStorage).find(function(t){return t.startsWith("msal.".concat(a.config.clientId,"."))&&t.endsWith(".authResult")}),r?(e=this.cacheService.get(r),[2,!!(e!=null&&e.id_token)&&Je.isTokenValid(e.id_token)]):[2,!1]})})},s.prototype.logout=function(){return J(this,void 0,void 0,function(){var r,e,a,i;return K(this,function(t){for(this.resourceTokenMap.clear(),r=Object.keys(localStorage),e=0,a=r;e<a.length;e++)i=a[e],i.startsWith("msal.".concat(this.config.clientId,"."))&&this.cacheService.remove(i);return[2]})})},s.prototype.clearCache=function(){return J(this,void 0,void 0,function(){return K(this,function(r){return this.resourceTokenMap.clear(),vr.clearStorageKeys(this.config.clientId),[2]})})},s.prototype.getAccessToken=function(r){return J(this,void 0,void 0,function(){var e,a;return K(this,function(i){switch(i.label){case 0:return e=this.resourceTokenMap.get(r),e&&Je.isTokenValid(e)?[2,e]:[4,this.getAuthResult(r)];case 1:return a=i.sent(),[2,a.access_token]}})})},jr([ze("msal-access-token-{0}")],s.prototype,"getAccessToken",null),s})();var zt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Jt=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},fe={emptyMask:0,viewListItems:1,addListItems:2,editListItems:3,deleteListItems:4,approveItems:5,openItems:6,viewVersions:7,deleteVersions:8,cancelCheckout:9,managePersonalViews:10,manageLists:12,viewFormPages:13,anonymousSearchAccessList:14,open:17,viewPages:18,addAndCustomizePages:19,applyThemeAndBorder:20,applyStyleSheets:21,viewUsageData:22,createSSCSite:23,manageSubwebs:24,createGroups:25,managePermissions:26,browseDirectories:27,browseUserInfo:28,addDelPrivateWebParts:29,updatePersonalWebParts:30,manageWeb:31,anonymousSearchAccessWebLists:32,useClientIntegration:37,useRemoteAPIs:38,manageAlerts:39,createAlerts:40,editMyUserInfo:41,enumeratePermissions:63,fullMask:65},Nr=function(){function s(r,e){this.spHttpClient=r,this.siteUrl=e}return s.hasPermission=function(r,e){if(e===65)return(r.High&32767)===32767&&r.Low===65535;var a=e-1,i=1;return a>0&&a<32?(i=i<<a,(r.Low&i)!==0):a>=32&&a<64?(i=i<<a-32,(r.High&i)!==0):!1},s.prototype.checkUserPermissions=function(r,e){return zt(this,void 0,void 0,function(){var a,i,t,o,u,l;return Jt(this,function(n){switch(n.label){case 0:return a="".concat(this.siteUrl,"/_api/web").concat(e||"","/getUserEffectivePermissions('").concat(encodeURIComponent("i:0#.f|membership|"+r),"')"),[4,this.spHttpClient.get(a,{headers:{accept:"application/json"}})];case 1:return i=n.sent(),[4,i.json()];case 2:t=n.sent(),o=[];for(u in fe)l=s.hasPermission(t,fe[u]),l&&o.push(u);return[2,o]}})})},s.prototype.checkCurrentUserPermissions=function(r){return zt(this,void 0,void 0,function(){var e,a,i,t,o,u;return Jt(this,function(l){switch(l.label){case 0:return e="".concat(this.siteUrl,"/_api/web/").concat(r,"/EffectiveBasePermission"),[4,this.spHttpClient.get(e,{headers:{accept:"application/json"}})];case 1:return a=l.sent(),[4,a.json()];case 2:i=l.sent(),t=[];for(o in fe)u=s.hasPermission(i,fe[o]),u&&t.push(o);return[2,t]}})})},s}(),de=function(){return de=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},de.apply(this,arguments)},Ar=function(s,r,e,a){var i=arguments.length,t=i<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,e):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(s,r,e,a);else for(var u=s.length-1;u>=0;u--)(o=s[u])&&(t=(i<3?o(t):i>3?o(r,e,t):o(r,e))||t);return i>3&&t&&Object.defineProperty(r,e,t),t},Fr=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Lr=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}};(function(){function s(r,e){this.graphClient=r,this.updatePresence=e,this.key="persona-cache-",this.cacheExpiration=1e3*60*60*4,this.storageService=new We}return s.prototype.getUser=function(r,e){return e===void 0&&(e="48x48"),Fr(this,void 0,void 0,function(){var a,i,t,y,o,u,l,n,c,d,x,g,y,v,S,x,S;return Lr(this,function(C){switch(C.label){case 0:return a=r,r&&r.indexOf("@")>-1?(i="/users/".concat(r,"?$select=id"),[4,this.graphClient.get(i)]):[3,3];case 1:return t=C.sent(),t.status===404?[2,null]:[4,t.json()];case 2:y=C.sent(),a=y.id,C.label=3;case 3:return o=this.storageService.get(this.key+r),u=o==null?void 0:o.data,l=a?"/users/".concat(a):"/me",!u||o.expiration<new Date().getTime()?[4,Promise.all([this.graphClient.get(l+"?$select=id,displayName,mail,jobTitle,department,officeLocation,mobilePhone,businessPhones,userPrincipalName,usageLocation"),this.graphClient.get(l+"/photos/".concat(e,"/$value")),this.graphClient.get(l+"/presence")])]:[3,6];case 4:return n=C.sent(),c=n[0],d=n[1],x=n[2],[4,Promise.all([c.json(),d.text(),x.json()])];case 5:return g=C.sent(),y=g[0],v=g[1],S=g[2],u=de(de({},y),{photo:"data:image/png;base64,".concat(v.replace('"',"").replace('"',"")),presence:S}),this.storageService.set(this.key+r,{data:u,expiration:new Date().getTime()+this.cacheExpiration}),[3,9];case 6:return this.updatePresence?[4,this.graphClient.get(l+"/presence")]:[3,9];case 7:return x=C.sent(),[4,x.json()];case 8:S=C.sent(),u=de(de({},u),{presence:S}),this.storageService.set(this.key+r,{data:u,expiration:new Date().getTime()+this.cacheExpiration}),C.label=9;case 9:return[2,u]}})})},Ar([ze("getUser-{0}")],s.prototype,"getUser",null),s})();var Kt=function(s,r,e,a){function i(t){return t instanceof e?t:new e(function(o){o(t)})}return new(e||(e=Promise))(function(t,o){function u(c){try{n(a.next(c))}catch(d){o(d)}}function l(c){try{n(a.throw(c))}catch(d){o(d)}}function n(c){c.done?t(c.value):i(c.value).then(u,l)}n((a=a.apply(s,r||[])).next())})},Yt=function(s,r){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},a,i,t,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(n){return function(c){return l([n,c])}}function l(n){if(a)throw new TypeError("Generator is already executing.");for(;e;)try{if(a=1,i&&(t=n[0]&2?i.return:n[0]?i.throw||((t=i.return)&&t.call(i),0):i.next)&&!(t=t.call(i,n[1])).done)return t;switch(i=0,t&&(n=[n[0]&2,t.value]),n[0]){case 0:case 1:t=n;break;case 4:return e.label++,{value:n[1],done:!1};case 5:e.label++,i=n[1],n=[0];continue;case 7:n=e.ops.pop(),e.trys.pop();continue;default:if(t=e.trys,!(t=t.length>0&&t[t.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!t||n[1]>t[0]&&n[1]<t[3])){e.label=n[1];break}if(n[0]===6&&e.label<t[1]){e.label=t[1],t=n;break}if(t&&e.label<t[2]){e.label=t[2],e.ops.push(n);break}t[2]&&e.ops.pop(),e.trys.pop();continue}n=r.call(s,e)}catch(c){n=[6,c],i=0}finally{a=t=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}},$r=function(){function s(r,e){this.searchClient=r,this.managedProperties=e,this.comparers=[":","=","<",">","<=",">="],this.queryTemplate=""}return s.prototype.getSuggestions=function(r){var e;return Kt(this,void 0,void 0,function(){var a,i,t,o,l,u,l,n,c,d,g,y,v;return Yt(this,function(x){switch(x.label){case 0:return a=r.split(" "),i=a[a.length-1],t=this.comparers.find(function(S){return i.indexOf(S)>0}),o=!0,t&&(l=i.split(t),i=l[l.length-1],o=!1),o?(u=this.managedProperties.filter(function(S){return S.toLocaleLowerCase().indexOf(i.toLowerCase())>=0}),[2,{value:u,areSuggestionsProps:!0}]):[3,1];case 1:return i=a[a.length-1],this.searchClient.pageSize=10,l=i.split(t),n=l[0],this.searchClient.selectFields=[n],this.searchClient.setRefiners([{field:"ManagedProperties",size:1,bucketDefinition:{sortBy:"count",isDescending:!0,minimumCount:1e3}}]),this.searchClient.setQuery(r+"*"),[4,this.searchClient.getData()];case 2:if(c=x.sent(),d=(e=c[0])===null||e===void 0?void 0:e.fields,d){g=n;for(y in d)y.toLocaleLowerCase()===n.toLocaleLowerCase()&&(g=y);return v=c.map(function(S){return S.fields[g]}),[2,{value:v.filter(function(S,C){return v.indexOf(S)===C}),areSuggestionsProps:!1}]}return[2,{value:[],areSuggestionsProps:!1}]}})})},s}(),qr=function(){function s(r){this.graphClient=r}return s.prototype.withClient=function(r){return this.graphClient=r,this},s.prototype.withManagedPropertiesRelatedQuery=function(r){return this.query=r,this},s.prototype.build=function(){return Kt(this,void 0,void 0,function(){var r,e,a;return Yt(this,function(i){switch(i.label){case 0:return this.searchClient||(this.searchClient=new tt(this.graphClient,["listItem"],["ID"])),this.searchClient.setRefiners([{field:"ManagedProperties",size:1e3,bucketDefinition:{sortBy:"count",isDescending:!0,minimumCount:1}}]),this.searchClient.setQuery(this.query||"*"),this.searchClient.pageSize=1,[4,this.searchClient.getData()];case 1:return i.sent(),r=this.searchClient.currentAggregations.find(function(t){return t.field==="ManagedProperties"}),e=r.buckets.map(function(t){return t.key}),a=new $r(this.searchClient,e),this.query&&(a.queryTemplate="{searchTerms} AND ".concat(this.query)),[2,a]}})})},s}(),Xt=function(){return Xt=Object.assign||function(s){for(var r,e=1,a=arguments.length;e<a;e++){r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])}return s},Xt.apply(this,arguments)};const it=b.createContext({graphClient:new oe}),B=()=>b.useContext(it),Ur=s=>{const{authProvider:r}=Ie(),e=()=>{if(s.graphClient)return s.graphClient;if(r)return new wr(new et(r,new oe))},[a,i]=b.useState(e());return b.useEffect(()=>{i(e())},[s.graphClient,r]),a&&h.jsx(it.Provider,{value:{graphClient:a},children:s.children})},at=b.createContext({spClient:new oe,siteUrl:""}),st=()=>b.useContext(at),Br=s=>{const{authProvider:r}=Ie(),e=()=>{if(s.spClient)return s.spClient;if(r){let t=new et(r,new oe);return t.resourceUri=new URL(s.siteUrl).origin,t}},[a,i]=b.useState(e());return b.useEffect(()=>{i(e())},[s.spClient,r]),a&&h.jsx(at.Provider,{value:{spClient:a,siteUrl:s.siteUrl},children:s.children})},ot=b.createContext({dataverseClient:new oe}),Zt=()=>b.useContext(ot),Gr=s=>{const{authProvider:r}=Ie(),e=()=>{if(s.dataverseClient)return s.dataverseClient;if(r){let t=new et(r,new oe);return t.resourceUri=s.dataverseResource,s.autoBatch&&(t=new Pr(t,s.dataverseResource,s.apiPath,500)),t}},[a,i]=b.useState(e());return b.useEffect(()=>{i(e())},[s.dataverseClient,r]),a&&h.jsx(ot.Provider,{value:{dataverseClient:a,dataverseResource:s.dataverseResource},children:s.children})},ct=typeof window>"u"?global:window,ut="@griffel/";function en(s,r){return ct[Symbol.for(ut+s)]||(ct[Symbol.for(ut+s)]=r),ct[Symbol.for(ut+s)]}const lt=en("DEBUG_RESET_CLASSES",{}),Pe=en("DEFINITION_LOOKUP_TABLE",{}),Ce="data-make-styles-bucket",tn="data-priority",ft="data-container",Mr="r",_e=7,V="___",nn="_",rn=process.env.NODE_ENV==="production"?V.length+_e:V.length+_e+nn.length+_e,Qr=0,an=1;function dt(s){for(var r=0,e,a=0,i=s.length;i>=4;++a,i-=4)e=s.charCodeAt(a)&255|(s.charCodeAt(++a)&255)<<8|(s.charCodeAt(++a)&255)<<16|(s.charCodeAt(++a)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,r=(e&65535)*1540483477+((e>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(i){case 3:r^=(s.charCodeAt(a+2)&255)<<16;case 2:r^=(s.charCodeAt(a+1)&255)<<8;case 1:r^=s.charCodeAt(a)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}function ht(s){const r=s.length;if(r===_e)return s;for(let e=r;e<_e;e++)s+="0";return s}function sn(s,r,e=[]){return process.env.NODE_ENV==="production"?V+ht(dt(s+r)):V+ht(dt(s+r))+nn+ht(dt(e.join("")))}function on(s,r){let e="",a="";for(const i in s){const t=s[i];if(t===0){a+=i+" ";continue}const o=Array.isArray(t),u=r==="rtl"?(o?t[1]:t)+" ":(o?t[0]:t)+" ";e+=u,a+=u}return[e.slice(0,-1),a.slice(0,-1)]}function cn(s,r){const e={};for(const a in s){const[i,t]=on(s[a],r);if(t===""){e[a]="";continue}const o=sn(t,r),u=o+(i===""?"":" "+i);Pe[o]=[s[a],r],e[a]=u}return e}const Ne={};function un(){let s=null,r="",e="";const a=new Array(arguments.length);let i="";for(let g=0;g<arguments.length;g++){const y=arguments[g];if(typeof y=="string"&&y!==""){const v=y.indexOf(V);if(v===-1)process.env.NODE_ENV!=="production"&&y.split(" ").forEach(x=>{x.startsWith(Mr)&&lt[x]&&(i?console.error(`mergeClasses(): a passed string contains multiple classes produced by makeResetStyles (${y} & ${r}, this will lead to non-deterministic behavior. Learn more:https://griffel.js.org/react/api/make-reset-styles#limitations
49
- Source string: ${y}`):i=x)}),r+=y+" ";else{const x=y.substr(v,rn);v>0&&(r+=y.slice(0,v)),e+=x,a[g]=x}process.env.NODE_ENV!=="production"&&y.indexOf(V,v+1)!==-1&&console.error(`mergeClasses(): a passed string contains multiple identifiers of atomic classes (classes that start with "${V}"), it's possible that passed classes were concatenated in a wrong way. Source string: ${y}`)}}if(e==="")return r.slice(0,-1);const t=Ne[e];if(t!==void 0)return r+t;const o=[];for(let g=0;g<arguments.length;g++){const y=a[g];if(y){const v=Pe[y];v?(o.push(v[Qr]),process.env.NODE_ENV!=="production"&&s!==null&&s!==v[an]&&console.error(`mergeClasses(): a passed string contains an identifier (${y}) that has different direction (dir="${v[1]?"rtl":"ltr"}") setting than other classes. This is not supported. Source string: ${arguments[g]}`),s=v[an]):process.env.NODE_ENV!=="production"&&console.error(`mergeClasses(): a passed string contains an identifier (${y}) that does not match any entry in cache. Source string: ${arguments[g]}`)}}const u=Object.assign.apply(Object,[{}].concat(o)),[l,n]=on(u,s),c=sn(n,s,a),d=c+" "+l;return Ne[e]=d,Pe[c]=[u,s],r+d}const ln={},fn=new Set,he={getChildrenSequences:s=>{const r=Object.keys(Ne).find(e=>Ne[e].startsWith(s));return r?r.split(V).filter(e=>e.length).map(e=>V+e):[]},addCSSRule:s=>{fn.add(s)},addSequenceDetails:(s,r)=>{Object.entries(s).forEach(([e,a])=>{ln[a.substring(0,rn)]={slotName:e,sourceURL:r}})},getCSSRules:()=>Array.from(fn),getSequenceDetails:s=>ln[s]};function dn(s,r){return Array.isArray(s)?r==="rtl"?s[1]:s[0]:s||""}function Vr(s,r,e,a){const i=s[0],t=s[1];return Object.entries(i).map(([o,u])=>{const l=dn(u,t);let n;if(e&&r){const c=e.find(({className:d})=>d===l);!c&&r[0][o]?n=dn(r[0][o],r[1]):c&&r[0][o]?n=(a?a.filter(({debugClassNames:g})=>g.filter(({className:y})=>y===l).length>0).length>0:!1)?c.className:c.overriddenBy:(!c&&!r[0][o]||c&&!r[0][o])&&(n=void 0)}return{className:l,overriddenBy:n}})}function hn(s,r){const e=Pe[s];if(e===void 0)return;const a=r?Pe[r.sequenceHash]:void 0,i=Vr(e,a,r==null?void 0:r.debugClassNames,r==null?void 0:r.children),t={sequenceHash:s,direction:e[1],children:[],debugClassNames:i};return he.getChildrenSequences(t.sequenceHash).reverse().forEach(u=>{const l=hn(u,t);l&&t.children.push(l)}),t.children.length||(t.rules={},t.debugClassNames.forEach(({className:u})=>{const l=he.getSequenceDetails(s);l&&(t.slot=l.slotName,t.sourceURL=l.sourceURL);const n=he.getCSSRules().find(c=>c.includes(u));t.rules[u]=n})),t}function Hr(s){if(lt[s]===void 0)return;const a={sequenceHash:s,direction:"ltr",children:[],debugClassNames:[{className:s}]};a.rules={},a.slot="makeResetStyles()";const[{className:i}]=a.debugClassNames,t=he.getCSSRules().filter(o=>o.includes(`.${i}`));return a.rules[i]=t.join(""),a}function Wr(s,r){const e=s?hn(s):void 0,a=r?Hr(r):void 0;return!e&&!a?void 0:e?a?{sequenceHash:e.sequenceHash+a.sequenceHash,direction:e.direction,children:[e,a],debugClassNames:[...e.debugClassNames,...a.debugClassNames]}:e:a}function zr(s){const r=s.defaultView;if(!r||r.__GRIFFEL_DEVTOOLS__)return;const e={getInfo:a=>{let i,t;for(const o of a.classList)o.startsWith(V)&&(i=o),lt[o]&&(t=o);return Wr(i,t)}};Object.defineProperty(r,"__GRIFFEL_DEVTOOLS__",{configurable:!1,enumerable:!1,get(){return e}})}const Ae=(()=>{var s;try{return!!(typeof window<"u"&&(!((s=window.sessionStorage)===null||s===void 0)&&s.getItem("__GRIFFEL_DEVTOOLS__")))}catch{return!1}})(),gt="<unknown>";function Jr(s){return Zr(s)||ni(s)||ii(s)}const Kr=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)?\)?\s*$/i,Yr=/^\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)\s*$/i,Xr=/\((\S*)\)/;function Zr(s){const r=Kr.exec(s)||Yr.exec(s);if(!r)return null;let e=r[2];const a=e&&e.indexOf("native")===0,i=e&&e.indexOf("eval")===0,t=Xr.exec(e);return i&&t!==null&&(e=t[1]),{loc:a?null:r[2],name:r[1]||gt}}const ei=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)\s*$/i,ti=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ni(s){const r=ei.exec(s);if(!r)return null;let e=r[3];const a=e&&e.indexOf(" > eval")>-1,i=ti.exec(e);return a&&i!==null&&(e=i[1]),{loc:r[3],name:r[1]||gt}}const ri=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?)\s*$/i;function ii(s){const r=ri.exec(s);return r?{loc:r[3],name:r[1]||gt}:null}function ai(){const s=String(new Error().stack).split(`
50
- `),r=si(s);if(r===void 0)return;const e=Jr(r);return e==null?void 0:e.loc}function si(s){for(let r=s.length-1;r>=0;--r)if(s[r].includes("at getSourceURLfromError"))return s[r+3]}function oi(s){if(!Array.isArray(s))return[s];if(process.env.NODE_ENV!=="production"&&s.length>2)throw new Error("CSS Bucket contains an entry with greater than 2 items, please report this to https://github.com/microsoft/griffel/issues");return s}function ci(s,r,e,a){const i=[];if(a[Ce]=r,a[tn]=String(e),s)for(const o in a)s.setAttribute(o,a[o]);function t(o){return s!=null&&s.sheet?s.sheet.insertRule(o,s.sheet.cssRules.length):i.push(o)}return{elementAttributes:a,insertRule:t,element:s,bucketName:r,cssRules(){return s!=null&&s.sheet?Array.from(s.sheet.cssRules).map(o=>o.cssText):i}}}const gn=["r","d","l","v","w","f","i","h","a","s","k","t","m","c","x"].reduce((s,r,e)=>(s[r]=e,s),{});function ui(s,r,e){return s==="m"||s==="x"?s+r+e:s+e}function li(s,r,e,a,i={}){var t,o;const u=s==="m",l=s==="x",n=i.m,c=i.x,d=(t=i.p)!==null&&t!==void 0?t:0,g=ui(s,(o=c??n)!==null&&o!==void 0?o:"0",d);if(!a.stylesheets[g]){const y=r&&r.createElement("style"),v=ci(y,s,d,{...a.styleElementAttributes,...u&&{media:n},...l&&{[ft]:c}});a.stylesheets[g]=v,r!=null&&r.head&&y&&r.head.insertBefore(y,di(r,e,s,a,i))}return a.stylesheets[g]}function fi(s,r,e){return s.getAttribute(Ce)===r?r==="m"?e.m===s.media:r==="x"?e.x===s.getAttribute(ft):!0:!1}function di(s,r,e,a,i={}){var t,o,u;const l=gn[e],n=(t=i.m)!==null&&t!==void 0?t:"",c=(o=i.x)!==null&&o!==void 0?o:"",d=(u=i.p)!==null&&u!==void 0?u:0;let g=C=>l-gn[C.getAttribute(Ce)],y=s.head.querySelectorAll(`[${Ce}]`);if(e==="m"||e==="x"){const C=s.head.querySelectorAll(`[${Ce}="${e}"]`);C.length&&(y=C,g=e==="m"?_=>a.compareMediaQueries(n,_.media):_=>{var D;return a.compareContainerQueries(c,(D=_.getAttribute(ft))!==null&&D!==void 0?D:"")})}const v=C=>fi(C,e,i)?d-Number(C.getAttribute(tn)):g(C),x=y.length;let S=x-1;for(;S>=0;){const C=y.item(S);if(v(C)>0)return C.nextSibling;S--}return x>0?y.item(0):r?r.nextSibling:null}const hi=["-moz-placeholder","-moz-focus-inner","-moz-focusring","-ms-input-placeholder","-moz-read-write","-moz-read-only"].join("|"),gi=new RegExp(`:(${hi})`);function yn(s,r){try{s.insertRule(r)}catch(e){process.env.NODE_ENV!=="production"&&!gi.test(r)&&console.error(`There was a problem inserting the following rule: "${r}"`,e)}}let yi=0;const vi=(s,r)=>s<r?-1:s>r?1:0;function pi(s=typeof document>"u"?void 0:document,r={}){const{classNameHashSalt:e,unstable_filterCSSRule:a,insertionPoint:i,styleElementAttributes:t,compareMediaQueries:o=vi,compareContainerQueries:u=o}=r,l={classNameHashSalt:e,insertionCache:{},stylesheets:{},styleElementAttributes:Object.freeze(t),compareMediaQueries:o,compareContainerQueries:u,id:`d${yi++}`,insertCSSRules(n){for(const c in n){const d=n[c];for(let g=0,y=d.length;g<y;g++){const[v,x]=oi(d[g]),S=li(c,s,i||null,l,x);l.insertionCache[v]||(l.insertionCache[v]=c,process.env.NODE_ENV!=="production"&&Ae&&he.addCSSRule(v),a?a(v)&&yn(S,v):yn(S,v))}}}};return s&&process.env.NODE_ENV!=="production"&&Ae&&zr(s),l}const mi=()=>{const s={};return function(e,a){s[e.id]===void 0&&(e.insertCSSRules(a),s[e.id]=!0)}};function bi(s,r,e=mi){const a=e();let i=null,t=null,o;process.env.NODE_ENV!=="production"&&Ae&&(o=ai());function u(l){const{dir:n,renderer:c}=l,d=n==="ltr";d?i===null&&(i=cn(s,n)):t===null&&(t=cn(s,n)),a(c,r);const g=d?i:t;return process.env.NODE_ENV!=="production"&&Ae&&he.addSequenceDetails(g,o),g}return u}function wi(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const vn=U.useInsertionEffect?U.useInsertionEffect:void 0,xi=()=>{const s={};return function(e,a){if(vn&&wi()){vn(()=>{e.insertCSSRules(a)},[e,a]);return}s[e.id]===void 0&&(e.insertCSSRules(a),s[e.id]=!0)}},Si=U.createContext(pi());function Pi(){return U.useContext(Si)}const Ci=U.createContext("ltr");function _i(){return U.useContext(Ci)}function pn(s,r){const e=bi(s,r,xi);return function(){const i=_i(),t=Pi();return e({dir:i,renderer:t})}}const Ri=pn({root:{mc9l5x:"f1w7gpdv",Bg96gwp:"fez10in"},rtl:{Bz10aip:"f13rod7r"}},{d:[".f1w7gpdv{display:inline;}",".fez10in{line-height:0;}",".f13rod7r{transform:scaleX(-1);}"]}),mn=b.createContext(void 0),ki={};mn.Provider;const Ei=()=>{const s=b.useContext(mn);return s??ki},Ti="fui-Icon",Ii="data-fui-icon",Di=(s,r)=>{const{filled:e,idPrefix:a,title:i,primaryFill:t="currentColor",...o}=s,u={...o,fill:t},l=Ei(),n=!!(r!=null&&r.flipInRtl&&(l==null?void 0:l.textDirection)==="rtl");return i&&(u["aria-label"]=i),!u["aria-label"]&&!u["aria-labelledby"]?u["aria-hidden"]=!0:u.role="img",u[Ii]="",{state:u,isRtlFlip:n}},Oi=(s,r)=>{const e=Ri(),{state:a,isRtlFlip:i}=Di(s,r);return a.className=un(e.root,i&&e.rtl,a.className),a},ji=pn({root:{B8gzw0y:"f1dd5bof"}},{m:[["@media (forced-colors: active){.f1dd5bof{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}]]}),yt="url(#",bn=(s,r,e)=>{const[a,i,...t]=s;let o=i;if(e&&i){const u={};for(const l in i){const n=i[l];if(typeof n!="string")u[l]=n;else if(l==="id")u[l]=e+n;else{const c=n.indexOf(yt);u[l]=c<0?n:n.slice(0,c+yt.length)+e+n.slice(c+yt.length)}}o=u}return b.createElement(a,{...o,key:r},...t.map((u,l)=>bn(u,l,e)))},Ni=s=>s==="1em"?"20":s,wn=(s,r,e)=>typeof s!="string"&&(r!=null&&r.color||Array.isArray(s[0]))?s.map((a,i)=>bn(a,i,e)):void 0,Ai=()=>{},Fi=(s,r)=>{const e=wn(s,r);return e?function(i){return b.useMemo(()=>i?wn(s,r,i):e,[i])}:Ai},Li=(s,r,e)=>typeof r=="string"?b.createElement("svg",{...s,dangerouslySetInnerHTML:{__html:r}}):e?b.createElement("svg",s,...e):b.createElement("svg",s,...r.map(a=>b.createElement("path",{d:a,fill:s.fill}))),Y=(s,r,e,a)=>{const i=Ni(r),t=Fi(e,a),o=b.forwardRef((u,l)=>{const n=ji(),c=Oi(u,{flipInRtl:a==null?void 0:a.flipInRtl}),d=t(u.idPrefix),g={...c,className:un(Ti,c.className,n.root),ref:l,width:r,height:r,viewBox:`0 0 ${i} ${i}`,xmlns:"http://www.w3.org/2000/svg"};return Li(g,e,d)});return o.displayName=s,o},$i=Y("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0}),qi=Y("FilterRegular","1em",["M7.5 13h5a.5.5 0 0 1 .09 1H7.5a.5.5 0 0 1-.09-1h5.09-5Zm-2-4h9a.5.5 0 0 1 .09 1H5.5a.5.5 0 0 1-.09-1h9.09-9Zm-2-4h13a.5.5 0 0 1 .09 1H3.5a.5.5 0 0 1-.09-1H16.5h-13Z"]),Ui=Y("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"]),xn=Y("Search20Regular","20",["M13.73 14.44a6.5 6.5 0 1 1 .7-.7l3.42 3.4a.5.5 0 0 1-.63.77l-.07-.06-3.42-3.41Zm-.71-.71A5.54 5.54 0 0 0 15 9.5a5.5 5.5 0 1 0-1.98 4.23Z"]),Bi=Y("Open16Regular","16",["M4.5 3C3.67 3 3 3.67 3 4.5v7c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5V9.27a.5.5 0 0 1 1 0v2.23a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 11.5v-7A2.5 2.5 0 0 1 4.5 2h2.23a.5.5 0 0 1 0 1H4.5Zm4.27-.5c0-.28.22-.5.5-.5h4.23c.28 0 .5.22.5.5v4.23a.5.5 0 0 1-1 0V3.71L9.62 7.08a.5.5 0 1 1-.7-.7L12.29 3H9.27a.5.5 0 0 1-.5-.5Z"]),Gi=Y("ChevronLeft16Regular","16",["M10.35 3.15c.2.2.2.5 0 .7L6.21 8l4.14 4.15a.5.5 0 0 1-.7.7l-4.5-4.5a.5.5 0 0 1 0-.7l4.5-4.5c.2-.2.5-.2.7 0Z"]),Mi=Y("ChevronRight16Regular","16",["M5.65 3.15a.5.5 0 0 0 0 .7L9.79 8l-4.14 4.15a.5.5 0 0 0 .7.7l4.5-4.5a.5.5 0 0 0 0-.7l-4.5-4.5a.5.5 0 0 0-.7 0Z"]),Qi=Y("Dismiss24Regular","24",["m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"]),vt=["title","path","description","listItemId","identityListItemId","identityListId","identitySiteCollectionId","identityWebId","lastModifiedTime","viewsLifeTime","viewsRecent","owstaxidmetadataalltagsinfo","driveId","author","authorOwsUser"],Sn="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xlsx.png",Pn="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/docx.png",Cn="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pptx.png",_n="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/mpp.png",Re="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/photo.png",Vi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pdf.png",Hi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/txt.png",Rn="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/email.png",Wi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/csv.png",zi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pub.png",Ji="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/accdb.png",pt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/zip.png",mt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/genericfile.png",kn="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/code.png",Ki="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/html.png",Yi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xml.png",Xi="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/spo.png",ke="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/video.png",$e=class $e{static getFileImageUrl(r){if(!r)return mt;let e=mt;const a=r.split("."),i=a[a.length-1];if(!i)return e;switch(i.toLowerCase()){case"xlsx":e=Sn;break;case"xls":e=Sn;break;case"docx":e=Pn;break;case"doc":e=Pn;break;case"pptx":e=Cn;break;case"ppt":e=Cn;break;case"mppx":e=_n;break;case"mpp":e=_n;break;case"csv":e=Wi;break;case"pdf":e=Vi;break;case"txt":e=Hi;break;case"jpg":e=Re;break;case"msg":e=Rn;break;case"jpeg":e=Re;break;case"png":e=Re;break;case"ico":e=Re;break;case"tiff":e=Re;break;case"eml":e=Rn;break;case"pub":e=zi;break;case"accdb":e=Ji;break;case"zip":e=pt;break;case"7z":e=pt;break;case"tar":e=pt;break;case"js":e=kn;break;case"json":e=kn;break;case"html":e=Ki;break;case"xml":e=Yi;break;case"aspx":e=Xi;break;case"mp4":e=ke;break;case"mov":e=ke;break;case"wmv":e=ke;break;case"ogg":e=ke;break;case"webm":e=ke;break;default:e=mt;break}return e}};$e.getShortName=r=>{if(!r)return"";const e=r.split("."),a=e[0].substring(0,25),i=e[e.length-1];return`${a}...${i}`},$e.isOndrive=async r=>r?r.indexOf("my.sharepoint.com")>-1:!1;let Fe=$e;const re=class re{};re.getThumbnailUrl=(r,e="medium")=>`https://graph.microsoft.com/v1.0/sites/${r.identitySiteCollectionId}/sites/${r.identityWebId}/lists/${r.identityListId}/items/${r.listItemId}/microsoft.graph.listitem/driveItem/thumbnails/0/${e}/content`,re.getThumbnailImageFromGraphApiCall=async(r,e)=>{const a=await r.get(e);if(a.headers["content-type"]==="application/json")return"data:image/png;base64,"+(await a.text()).replace('"',"").replace('"',"");if(a.status===302)return a.headers.Location;if(a.status===404)return"";const i=await a.arrayBuffer();return`data:image/jpeg;base64,${Buffer.from(new Uint8Array(i).reduce((o,u)=>o+String.fromCharCode(u),"")).toString("base64")}`},re.getThumbnailImageFromGraph=async(r,e,a="medium")=>{const i=re.getThumbnailUrl(r,a);return await re.getThumbnailImageFromGraphApiCall(e,i)};let bt=re;function Zi(s){let r=0;for(let e=0;e<s.length;e++){const a=s.charCodeAt(e);r=(r<<5)-r+a,r|=0}return r}const ea=m.makeStyles({title:{...m.shorthands.margin(0,0,"12px")},description:{...m.shorthands.margin(0,0,"12px")},card:{width:"20rem",maxWidth:"100%",height:"fit-content"},image:{width:"20rem",height:"7rem"},text:{...m.shorthands.margin(0)},imageIconWrapper:{width:"20rem!important",height:"7rem!important",display:"flex!important",justifyContent:"center",alignItems:"center",backgroundColor:m.tokens.colorNeutralBackground3}}),En=s=>{const{graphClient:r}=B(),e=ea(),[a,i]=b.useState(void 0);return b.useEffect(()=>{bt.getThumbnailImageFromGraph(s.document.fields,r).then(t=>{i(t)}).catch(t=>{console.error(t)})},[]),h.jsxs(m.Card,{className:e.card,children:[h.jsx(m.CardPreview,{children:a?h.jsx("img",{src:a,alt:s.document.fields.title,className:e.image}):h.jsx("div",{className:e.imageIconWrapper,children:h.jsx("div",{children:h.jsx("img",{src:Fe.getFileImageUrl(s.document.fields.path),width:"32px",height:"32px",alt:s.document.fields.title})})})}),h.jsx(m.CardHeader,{image:h.jsx("img",{src:Fe.getFileImageUrl(s.document.fields.path),width:"32px",height:"32px",alt:s.document.fields.title}),header:h.jsx(m.Body1,{children:h.jsx("b",{children:s.document.fields.title})}),description:h.jsx(m.Caption1,{children:s.document.fields.author}),action:h.jsx(m.Button,{appearance:"transparent","aria-label":"More options"})}),h.jsx("p",{className:e.text,children:s.document.fields.description}),h.jsx(m.CardFooter,{children:h.jsx(m.Button,{as:"a",href:s.document.fields.path,appearance:"primary",icon:h.jsx(Bi,{}),children:"Open"})})]})},ta=m.makeStyles({wrapper:{},searchInput:{},searchResults:{display:"flex",flexWrap:"wrap",flexDirection:"row",...m.shorthands.gap(m.tokens.spacingHorizontalL,m.tokens.spacingVerticalL)}}),na=s=>{var y;const{graphClient:r}=B(),e=ta(),a=b.useMemo(()=>{var x,S,C,_,D,F,A;var v=new tt(r,[((x=s.dataProviderProps)==null?void 0:x.entityType)??"listItem"],((S=s.dataProviderProps)==null?void 0:S.selectFields)||vt);return v.queryTemplate=(C=s.dataProviderProps)==null?void 0:C.queryTemplate,v.pageSize=(_=s.dataProviderProps)==null?void 0:_.pageSize,(D=s.dataProviderProps)!=null&&D.aggregations&&v.setRefiners((F=s.dataProviderProps)==null?void 0:F.aggregations),v.setQuery(((A=s.dataProviderProps)==null?void 0:A.initialQuery)??""),v},[r,s.dataProviderProps]),[i,t]=b.useState(!0),[o,u]=b.useState(((y=s.dataProviderProps)==null?void 0:y.initialQuery)??""),[l,n]=b.useState([]),[c,d]=b.useState(void 0);b.useEffect(()=>{a.setQuery(o),t(!0),a.getData().then(v=>{n(v),d(void 0)}).catch(v=>{d(v.message)}).finally(()=>{t(!1)})},[o]);const g=()=>s!=null&&s.searchInputComponent?h.jsx(s.searchInputComponent,{onSearch:v=>{u(v)}}):h.jsx(m.Input,{contentBefore:h.jsx(xn,{}),placeholder:"Search",value:o,onChange:v=>{u(v.target.value)}});return h.jsxs("div",{children:[h.jsx("div",{children:g()}),h.jsxs("div",{children:[i&&h.jsx(m.Spinner,{label:"Loading..."}),!i&&c&&h.jsxs("div",{children:["Error: ",c]})]}),h.jsx("div",{className:e.searchResults,children:l.map((v,x)=>h.jsx("div",{children:s!=null&&s.onResultRendering?s.onResultRendering(v):h.jsx(En,{document:v})},x))})]})},ra=m.makeStyles({wrapper:{},searchInput:{},searchResults:{display:"flex",flexWrap:"wrap",flexDirection:"row",...m.shorthands.gap(m.tokens.spacingHorizontalL,m.tokens.spacingVerticalL)}}),ia=s=>{var y;const{graphClient:r}=B(),e=ra(),a=b.useMemo(()=>{var x,S;var v=new Ir(r,"sharePoint",((x=s.dataProviderProps)==null?void 0:x.selectFields)||vt,(S=s.dataProviderProps)==null?void 0:S.queryTemplate);return v},[r,s.dataProviderProps]),[i,t]=b.useState(!0),[o,u]=b.useState(((y=s.dataProviderProps)==null?void 0:y.initialQuery)??""),[l,n]=b.useState([]),[c,d]=b.useState(void 0);b.useEffect(()=>{Xe.debounce("copilot-search",async()=>{t(!0),a.getData(o).then(v=>{n(v),d(void 0)}).catch(v=>{d(v.message)}).finally(()=>{t(!1)})},1e3)},[o]);const g=()=>s!=null&&s.searchInputComponent?h.jsx(s.searchInputComponent,{onSearch:v=>{u(v)}}):h.jsx(m.Input,{style:{width:"500px"},contentBefore:h.jsx(xn,{}),placeholder:"Search",value:o,onChange:v=>{u(v.target.value)}});return h.jsxs("div",{children:[h.jsx("div",{children:g()}),h.jsxs("div",{children:[i&&h.jsx(m.Spinner,{label:"Loading..."}),!i&&c&&h.jsxs("div",{children:["Error: ",c]})]}),h.jsx("div",{className:e.searchResults,children:l.map((v,x)=>h.jsx("div",{children:s!=null&&s.onResultRendering?s.onResultRendering(v):h.jsx(En,{document:{fields:v.resourceMetadata,...v}})},x))})]})},aa=m.makeStyles({root:{paddingBottom:m.tokens.spacingVerticalM,position:"relative"},searchInput:{minWidth:"800px"},suggestionsSurface:{position:"absolute",top:"100%",marginTop:"0rem",zIndex:2,backgroundColor:m.tokens.colorNeutralBackgroundAlpha2,width:"800px",transform:"scaleY(0)",transformOrigin:"top",transitionProperty:"all",transitionTimingFunction:m.tokens.curveDecelerateMid,transitionDuration:m.tokens.durationSlow},suggestionsSurfaceVisible:{transform:"scaleY(1)"},suggestionsWrapper:{display:"flex",flexDirection:"column",rowGap:m.tokens.spacingVerticalM,maxHeight:"15rem",overflowY:"auto",alignItems:"flex-start"},suggestionsList:{listStyleType:"none",paddingLeft:"0px"},suggestionButton:{"&:focus":{...m.shorthands.borderColor(m.tokens.colorBrandBackground)}}}),sa=[":","=","<",">","<=",">="];function oa(s){const r=aa(),{graphClient:e}=B(),[a,i]=b.useState(!1),[t,o]=b.useState([]),[u,l]=b.useState(!0),[n,c]=b.useState(""),[d,g]=b.useState(!0),[y,v]=b.useState(),x=b.useRef(),S=b.useRef(),C=b.useRef(new qr(e));return b.useEffect(()=>{s.query&&C.current.withManagedPropertiesRelatedQuery(s.query),C.current.build().then(_=>{v(_),g(!1)})},[]),h.jsxs("div",{className:r.root,children:[h.jsx(m.Input,{ref:x,className:r.searchInput,contentAfter:d?h.jsx(m.Spinner,{size:"tiny"}):h.jsx(m.Button,{appearance:"transparent",title:"Search",onClick:()=>{s.onSearch(n)},icon:h.jsx($i,{})}),value:n,onChange:(_,D)=>{c(D.value),Xe.debounce("search-input",async()=>{g(!0);const F=await y.getSuggestions(D.value);o(F.value),l(F.areSuggestionsProps),F.value&&F.value.length>0&&i(!0),g(!1)},500)},onKeyDown:_=>{var D;if(_.key==="Enter"&&s.onSearch(n),_.key==="ArrowDown"){const F=(D=S.current)==null?void 0:D.firstChild;if(F){const A=F.firstChild;if(A){A.focus(),_.preventDefault();return}}}_.key==="Escape"&&i(!1)}}),h.jsxs("div",{className:m.mergeClasses(r.suggestionsSurface,a&&r.suggestionsSurfaceVisible),onBlur:()=>{},children:[h.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"},children:h.jsx(m.Button,{tabIndex:-1,appearance:"subtle",onClick:()=>{i(!1)},title:"Close",icon:h.jsx(Ui,{})})}),h.jsx("div",{className:r.suggestionsWrapper,children:h.jsxs("ul",{className:r.suggestionsList,ref:S,onKeyDown:_=>{var G;const D=S==null?void 0:S.current.querySelectorAll("button"),F=_.target;let A=null;if(D.forEach((Z,H)=>{Z===F&&(A=H)}),_.key==="ArrowUp")if(A===0){(G=x.current)==null||G.focus(),_.preventDefault();return}else{D.item(A-1).focus(),_.preventDefault();return}if(_.key==="ArrowDown")if(A===D.length-1){D.item(0).focus(),_.preventDefault();return}else{D.item(A+1).focus(),_.preventDefault();return}},children:[u&&t.map(_=>h.jsx("li",{children:h.jsx(m.Button,{className:r.suggestionButton,appearance:"transparent",onClick:()=>{var G;const D=n.split(u?" ":":"),F=D[D.length-1],A=n.replace(F,_+":");c(A),i(!1),l(!1),(G=x.current)==null||G.focus()},children:_},_)})),!u&&t.map((_,D)=>h.jsx("li",{children:h.jsx(m.Button,{className:r.suggestionButton,appearance:"transparent",onClick:()=>{var H;const F=n.split(" ");let A=F[F.length-1],G=sa.find(k=>A.indexOf(k)>0);G&&(A=A.split(G)[1]);const Z=n.replace(A,_.replace(/ /g,"+"));c(Z),i(!1),l(!0),(H=x.current)==null||H.focus(),s.onSearch(Z)},children:_},D)}))]})})]})]})}var ca=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,la=(s,r,e,a)=>{for(var i=a>1?void 0:a?ua(r,e):r,t=s.length-1,o;t>=0;t--)(o=s[t])&&(i=(a?o(r,e,i):o(i))||i);return a&&i&&ca(r,e,i),i};class wt{constructor(r,e){this.graphClient=r,this.updatePresence=e,this.key="persona-cache-",this.cacheExpiration=1e3*60*60*4,this.storageService=new We}async getUser(r,e="48x48"){let a=r;if(r&&r.indexOf("@")>-1){const u=`/users/${r}?$select=id`,l=await this.graphClient.get(u);if(l.status===404)return null;a=(await l.json()).id}let i=this.storageService.get(this.key+r),t=i==null?void 0:i.data;const o=a?`/users/${a}`:"/me";if(!t||i.expiration<new Date().getTime()){const[u,l,n]=await Promise.all([this.graphClient.get(o+"?$select=id,displayName,mail,jobTitle,department,officeLocation,mobilePhone,businessPhones,userPrincipalName,usageLocation"),this.graphClient.get(o+`/photos/${e}/$value`),this.graphClient.get(o+"/presence")]),[c,d,g]=await Promise.all([u.json(),l.text(),n.json()]);t={...c,photo:`data:image/png;base64,${d.replace('"',"").replace('"',"")}`,presence:g},this.storageService.set(this.key+r,{data:t,expiration:new Date().getTime()+this.cacheExpiration})}else if(this.updatePresence){const l=await(await this.graphClient.get(o+"/presence")).json();t={...t,presence:l},this.storageService.set(this.key+r,{data:t,expiration:new Date().getTime()+this.cacheExpiration})}return t}}la([ze("getUser-{0}")],wt.prototype,"getUser",1);function Le(s){var d,g,y,v,x;const{id:r}=s;let e=s.graphClient;const a=S=>{switch(S){case"":return"offline";case"Available":return"available";case"Busy":return"busy";case"Away":return"away";case"DoNotDisturb":return"do-not-disturb";case"Offline":return"offline";case"PresenceUnknown":return"unknown";case"OutOfOffice":return"out-of-office";case"Blocked":return"blocked";case"BeRightBack":return"away";case"BusyIdle":return"busy";case"AvailableIdle":return"available";default:return S==null?void 0:S.toLowerCase()}},i=b.useRef(new wt(e,s.showPresence)),[t,o]=b.useState(!s.user),[u,l]=b.useState(s.user),n=async()=>{const S=await i.current.getUser(r);l({...s.user,...S}),o(!1)};if(b.useEffect(()=>{s.user||n()},[r]),t)return h.jsx(m.Spinner,{});const c=(u==null?void 0:u.displayName)||s.name||s.title||s.id;return h.jsx(m.Persona,{primaryText:c,secondaryText:u==null?void 0:u.jobTitle,avatar:{image:{src:u==null?void 0:u.photo},initials:((d=u==null?void 0:u.displayName)==null?void 0:d.split(" ").map(S=>S[0]).join(""))||((g=s.name)==null?void 0:g.split(" ").map(S=>S[0]).join(""))},presence:s.showPresence?{status:a((y=u==null?void 0:u.presence)==null?void 0:y.availability),outOfOffice:(x=(v=u==null?void 0:u.presence)==null?void 0:v.outOfOfficeSettings)==null?void 0:x.isOutOfOffice}:void 0,...s})}function fa(s){const{graphClient:r}=B();return h.jsx(Le,{...s,graphClient:r})}function X(s){const[r,e]=b.useState(s.value||[]),[a,i]=b.useState(!1),[t,o]=b.useState(""),[u,l]=b.useState(s.value||[]),n=c=>Xe.debounce(`entityPicker-${s.additionalKey}`,async()=>{i(!0);try{const d=await s.onDataRequested(c);e([...d,...u].reduce((g,y)=>g.find(x=>x.id===y.id)?g:g.concat([y]),[])),i(!1)}catch(d){console.error(d),i(!1)}},500);return b.useEffect(()=>{n(t)},[t,s.additionalKey]),s.renderOverride?h.jsx(h.Fragment,{children:s.renderOverride(r,a,n)}):h.jsxs(m.Field,{label:s.label,hint:s.description,children:[h.jsx(m.Combobox,{value:t,multiselect:s.multiSelect,freeform:!0,onChange:c=>{o(c.target.value)},size:s.size,disabled:s.disabled,onOptionSelect:(c,d)=>{let g=[];const y=r.find(v=>v.id===d.optionValue);u.some(v=>v.id===d.optionValue)?g=u.filter(v=>v.id!==d.optionValue):s.multiSelect?g=[...u,y]:g=[y],g=g.filter(v=>!!v),s.onEntitySelected&&s.onEntitySelected(g),l(g),o(g.map(v=>v.displayName).join(", "))},defaultSelectedOptions:u.map(c=>c.id),children:r.map(c=>h.jsx(m.Option,{text:c.displayName,value:c.id,children:s.onSuggestionRendering?s.onSuggestionRendering(c):c.displayName},encodeURIComponent(c.id)))}),a&&h.jsx(m.ProgressBar,{})]})}function da(s){const{graphClient:r}=B();return h.jsx(Tn,{...s,graphClient:r})}function Tn(s){const r=async()=>(await(await s.graphClient.get(`/teams/${s.teamId}/channels?$select=id,displayName`)).json()).value;b.useEffect(()=>{r()},[s.teamId]);const e=async a=>await r();return h.jsx(X,{additionalKey:`team-${s.teamId}-channels`,...s,onDataRequested:e})}function ha(s){const{graphClient:r}=B();return h.jsx(In,{...s,graphClient:r,siteId:s.siteId})}function In(s){const r=async e=>{let a=s.siteId?`/sites/${s.siteId}/drives?$select=id,name`:"/me/drives?$select=id,name";return e&&(a+=`&$filter=startswith(name, '${e}')`),(await(await s.graphClient.get(a)).json()).value.map(o=>({id:o.id,displayName:o.name}))};return h.jsx(X,{additionalKey:`drive-picker-${s.siteId}`,...s,onDataRequested:r})}function ga(s){const{graphClient:r}=B();return h.jsx(Dn,{...s,graphClient:r})}function Dn(s){const r=async e=>{let a="/teams?$select=id,displayName&$top=8";return e&&(a+=`&$filter=startswith(displayName, '${e}')`),(await(await s.graphClient.get(a)).json()).value};return h.jsx(X,{additionalKey:"team-site-picker",...s,onDataRequested:r})}function ya(s){const{graphClient:r}=B();return h.jsx(On,{...s,graphClient:r})}function On(s){const r=new kr(s.graphClient,!0,!0),e=async a=>(r.setQuery(a),await r.getData());return h.jsx(X,{...s,additionalKey:"people-picker",onDataRequested:e,onSuggestionRendering:a=>(a.photo&&(a.photo=`data:image/png;base64,${a.photo.replace('"',"").replace('"',"")}`),h.jsx(Le,{showPresence:!0,user:a,graphClient:s.graphClient}))})}function va(s){const{graphClient:r}=B();return h.jsx(jn,{...s,graphClient:r})}function jn(s){const r=b.useRef(new tt(s.graphClient,["site"],["id","displayName"])),e=async a=>(r.current.setQuery(a||"*"),await r.current.getData());return h.jsx(X,{...s,onDataRequested:e})}function Nn(s){const[r,e]=b.useState(s.initialRender),[a,i]=b.useState(!0);return b.useEffect(()=>{s.permissionCheck().then(t=>{e(t)}).finally(()=>i(!1))},[]),a&&s.placeholder?h.jsx(h.Fragment,{children:s.placeholder}):r?h.jsx(h.Fragment,{children:s.children}):h.jsx(h.Fragment,{})}function pa(s){const{spClient:r,siteUrl:e}=st();return h.jsx(An,{...s,siteUrl:e,spClient:r})}function An(s){return h.jsx(Nn,{placeholder:s.placeholder,permissionCheck:async()=>{var r=`${s.siteUrl}/_api/web/EffectiveBasePermissions`,e=await s.spClient.get(r,{headers:{accept:"application/json"}}),a=await e.json(),i=[];for(var t in fe){var o=Nr.hasPermission(a,fe[t]);o&&i.push(t)}return i.indexOf(s.role)>=0},children:s.children},`${s.role}-${s.siteUrl}`)}function Fn(s){return h.jsx(Nn,{placeholder:s.placeholder,permissionCheck:async()=>{const r=`/me/transitiveMemberOf/${s.groupId}?$select=id`;return(await s.graphClient.get(r)).ok},children:s.children},s.groupId)}function ma(s){const{graphClient:r}=B();return h.jsx(Fn,{...s,graphClient:r})}class Ln{constructor(r,e,a){this.dataverseClient=r,this.dataverseEnv=e,this.tableName=a,this.dataFields=[],this.getFieldSuggestions=async(i,t)=>{if(i.type==="User"){let n=`${this.dataverseEnv}/api/data/v9.0/systemusers?`;if(t&&t.length>0){const g=new He;for(const y of t)y.type||(y.type="Text"),y.name=i.expandFields[0],g.withFieldQuery(y);n+=`$filter=${g.build()}&`}return n+=`$select=${i.expandFields.join(",")}`,(await(await this.dataverseClient.get(n,{headers:{prefer:"odata.include-annotations=*"}})).json()).value.map(g=>({id:g[i.relatedId],displayName:g[i.expandFields[0]]}))}let o=`${this.dataverseEnv}/api/data/v9.0/${this.tableName}?`;if(t&&t.length>0){const n=new He;for(const c of t)c.type||(c.type="Text"),n.withFieldQuery(c,c.joinBy||"And");o+=`$filter=${n.build()}&`}i.type==="Lookup"?o+=`$apply=groupby((${i.name}/${i.relatedId||i.name+"_id"},${i.name}/${i.expandFields[0]}))`:i.type=="DateTime"?o+=`$apply=aggregate(${i.name} with min as ${i.name})`:o+=`$apply=groupby((${i.name}))`;const l=await(await this.dataverseClient.get(o,{headers:{prefer:"odata.include-annotations=*"}})).json();if(i.type==="Lookup"||i.type==="User"){if(l.value.length===0)return[];let n="",c="";const d=l.value[0];for(const g in d)g.indexOf(i.relatedId)>=0&&(n=g),g.indexOf(i.expandFields[0])>=0&&(c=g);return l.value.map(g=>({id:g[n],displayName:g[c]}))}return l.value.map(n=>({id:n[i.name],displayName:n[`${i.name}@OData.Community.Display.V1.FormattedValue`]?n[`${i.name}@OData.Community.Display.V1.FormattedValue`]:n[i.name]}))},this.dataProvider=new Or(r,e,a),this.dataProvider.pageSize=25}getTotalRows(){return this.dataProvider.allItemsCount}mapToExpand(r){return r.expandFields?`${r.name}($select=${r.expandFields.join(",")})`:r.name}setFields(r){this.dataProvider.selectQuery=r.filter(e=>e.type!=="Lookup").map(e=>e.name).join(","),this.dataProvider.expandQuery=r.filter(e=>e.type==="Lookup"||e.type==="User").map(e=>this.mapToExpand(e)).join(","),this.dataFields=r}getData(r,e,a){if(r&&r.length>0){const i=new He;for(const o of r)o.type||(o.type="Text"),i.withFieldQuery(o,o.joinBy||"And");const t=i.build();this.dataProvider.setQuery(t)}else this.dataProvider.setQuery("");if(e){let i=e,t=this.dataFields.find(o=>o.name===i);t&&t.type==="Lookup"?i=`${t.name}/${t.expandFields[0]}`:t&&t.type==="User"&&(i=`${t.name}/fullname`),this.dataProvider.setOrder(i,a||"ASC")}return this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}}class xt{isRendererApplicable(r){return r.type==="DateTime"}renderField(r,e,a){if(!e)return h.jsx("span",{children:"-"});const i=new Date(String(e));return isNaN(i.getTime())?h.jsx("span",{children:"-"}):h.jsx("span",{children:i.toLocaleDateString()})}}class ba{constructor(){this.renderers=[new xt]}registerRenderer(r){this.renderers.unshift(r)}isRendererApplicable(r){return!!this.renderers.find(e=>e.isRendererApplicable(r))}renderField(r,e,a){const i=this.renderers.find(t=>t.isRendererApplicable(r));return i?i.renderField(r,e,a):typeof e=="string"?h.jsx("div",{children:e}):h.jsx("div",{children:JSON.stringify(e)})}}const wa=m.makeStyles({root:{display:"flex",justifyContent:"end",gap:m.tokens.spacingHorizontalS},button:{},activeFilterButton:{backgroundColor:m.tokens.colorBrandBackground,color:m.tokens.colorNeutralForegroundOnBrand}});function xa(s){const[r,e]=b.useState(!1),a=wa(),i=s.initialQueryFields&&s.initialQueryFields.length>0;return h.jsxs("div",{className:a.root,children:[i&&s.onClearFilters&&h.jsx(m.Button,{"aria-label":"Clear all filters",appearance:"subtle",onClick:s.onClearFilters,children:"Clear filters"}),h.jsx(m.Button,{"aria-label":"Open filter pane",icon:h.jsx(qi,{}),className:i?a.activeFilterButton:void 0,onClick:()=>{e(!0)}}),h.jsxs(m.Drawer,{type:"overlay",separator:!0,open:r,onOpenChange:(t,{open:o})=>e(o),position:"end",children:[h.jsx(m.DrawerHeader,{children:h.jsx(m.DrawerHeaderTitle,{action:h.jsx(m.Button,{appearance:"subtle","aria-label":"Close",icon:h.jsx(Qi,{}),onClick:()=>e(!1)}),children:"Filter"})}),h.jsx(m.DrawerBody,{children:s.filterFields.map(t=>h.jsx(m.Field,{label:t.label||t.name,children:s.renderFilter(t,s.onFilterSet,s.initialQueryFields)},t.name))}),i&&s.onClearFilters&&h.jsx(m.DrawerFooter,{children:h.jsx(m.Button,{appearance:"secondary",onClick:()=>{var t;(t=s.onClearFilters)==null||t.call(s),e(!1)},children:"Clear all filters"})})]})]})}const Sa=m.makeStyles({root:{position:"relative"},loadingWrapper:{position:"absolute",width:"100%",height:"min-content",paddingTop:m.tokens.spacingVerticalM,paddingBottom:m.tokens.spacingHorizontalM,backgroundColor:m.tokens.colorNeutralBackgroundAlpha,zIndex:9999},errorWrapper:{marginBottom:m.tokens.spacingVerticalM},pagination:{display:"flex",width:"100%",justifyContent:"center",gap:m.tokens.spacingHorizontalL,marginTop:m.tokens.spacingVerticalM}});function St(s){var H;const r=Sa(),e=b.useMemo(()=>{const k=new ba;if(s.customRenderers)for(const O of s.customRenderers)k.registerRenderer(O);return k},[s.customRenderers]),a=b.useMemo(()=>s.fieldsToRender.map(k=>m.createTableColumn({columnId:k.name,renderHeaderCell:()=>h.jsx(m.Text,{weight:"semibold",children:k.label||k.name}),renderCell:O=>e.renderField(k,O[k.name],O),compare:(O,N)=>O[k.name]-N[k.name]})),[s.fieldsToRender]),[i,t]=b.useState({sortColumn:(H=s.fieldsToRender.find(k=>!k.disableSorting))==null?void 0:H.name,sortDirection:"ascending"}),o=(k,O)=>{t(O)},[u,l]=b.useState([]),[n,c]=b.useState(!0),[d,g]=b.useState(null),[y,v]=b.useState([]),[x,S]=b.useState(new Set),C=b.useMemo(()=>s.dataService.isNextPageAvailable(),[s.dataService,u]),_=b.useMemo(()=>s.dataService.isPreviousPageAvailable(),[s.dataService,u]),D=b.useCallback((k,O)=>{if(s.getRowId)return s.getRowId(k);const N=k;return N.id?String(N.id):N.Id?String(N.Id):N.ID?String(N.ID):O},[s.getRowId]),F=b.useMemo(()=>{const k=new Map;return u.forEach((O,N)=>{k.set(D(O,N),O)}),k},[u,D]),A=(k,O)=>{if(S(O.selectedItems),s.onSelectionChange){const N=[];O.selectedItems.forEach(ge=>{const M=F.get(ge);M&&N.push(M)}),s.onSelectionChange(N)}},G=b.useMemo(()=>s.fieldsToRender.filter(k=>!k.disableFiltering),[s.fieldsToRender]),Z=b.useCallback(()=>{v([])},[]);return b.useEffect(()=>{var O;c(!0),g(null),s.dataService.setFields(s.fieldsToRender);const k=[];s.systemFilter&&s.systemFilter.length>0&&k.push(...s.systemFilter),y&&y.length>0&&k.push(...y),s.dataService.getData(k,(O=i==null?void 0:i.sortColumn)==null?void 0:O.toString(),(i==null?void 0:i.sortDirection)=="ascending"?"ASC":"DESC").then(N=>{l(N),s.onDataFetched&&s.onDataFetched([],s.dataService.getTotalRows())}).catch(N=>{g((N==null?void 0:N.message)||"An error occurred while loading data"),l([])}).finally(()=>c(!1))},[s.systemFilter,i,y]),h.jsxs("div",{className:r.root,children:[n&&h.jsx("div",{className:r.loadingWrapper,children:h.jsx(m.Spinner,{size:"huge"})}),d&&h.jsx("div",{className:r.errorWrapper,children:h.jsx(m.MessageBar,{intent:"error",children:h.jsxs(m.MessageBarBody,{children:[h.jsx(m.MessageBarTitle,{children:"Error"}),d]})})}),s.renderFilter&&h.jsx(xa,{filterFields:G,initialQueryFields:y,onFilterSet:(k,O)=>{const N=[...y.filter(ge=>ge.name!==k.name)];O&&O.length>0&&N.push(...O),v(N)},onClearFilters:Z,renderFilter:s.renderFilter}),h.jsxs(m.DataGrid,{items:u,columns:a,sortable:!0,sortState:i,onSortChange:o,selectionMode:s.selectionMode,selectedItems:x,onSelectionChange:A,getRowId:k=>D(k,u.indexOf(k)),children:[h.jsx(m.DataGridHeader,{children:h.jsx(m.DataGridRow,{selectionCell:s.selectionMode==="multiselect"?{checkboxIndicator:{"aria-label":"Select all rows"}}:void 0,children:({renderHeaderCell:k})=>h.jsx(m.DataGridHeaderCell,{children:k()})})}),h.jsx(m.DataGridBody,{children:({item:k,rowId:O})=>h.jsx(m.DataGridRow,{selectionCell:s.selectionMode?{checkboxIndicator:{"aria-label":"Select row"},radioIndicator:{"aria-label":"Select row"}}:void 0,children:({renderCell:N})=>h.jsx(m.DataGridCell,{children:N(k)})},O)})]}),h.jsxs("div",{className:r.pagination,children:[h.jsx(m.Button,{icon:h.jsx(Gi,{}),disabled:!_,onClick:()=>{s.dataService.getPreviousPage().then(k=>l(k)).finally(()=>c(!1))},"aria-label":"Previous page","data-testid":"datagrid-prev-page"}),h.jsx(m.Button,{icon:h.jsx(Mi,{}),disabled:!C,onClick:()=>{s.dataService.getNextPage().then(k=>l(k)).finally(()=>c(!1))},"aria-label":"Next page","data-testid":"datagrid-next-page"})]})]})}class Pa{constructor(r){this.graphClient=r}isRendererApplicable(r){return r.type==="User"}renderField(r,e,a){if(!e||typeof e!="object")return h.jsx("span",{children:"-"});const i=e,t=i.azureactivedirectoryobjectid;if(!t){const o=i.fullname;return h.jsx("span",{children:o?String(o):"-"})}return h.jsx(Le,{graphClient:this.graphClient,id:String(t)})}}class Ca{isRendererApplicable(r){return r.type==="Lookup"}renderField(r,e,a){if(!e||typeof e!="object")return h.jsx("span",{children:"-"});const i=e;if(r.expandFields&&r.expandFields[0]){const t=i[r.expandFields[0]];return h.jsx("span",{children:t!=null?String(t):"-"})}return h.jsx("span",{children:JSON.stringify(e)})}}function _a(s){const r=async e=>{const a=[];return s.additionalFilters&&a.push(...s.additionalFilters),e&&a.push({name:s.column.type==="Lookup"?`${s.column.name}/${s.column.expandFields[0]}`:s.column.name,type:s.column.type,value:e,comparer:"Contains"}),s.getFieldSuggestions(s.column,a)};return h.jsx(X,{additionalKey:`${s.table}-${s.column.name}`,...s,onDataRequested:r})}class Ra{isRendererApplicable(r){return r.type==="Choice"}renderField(r,e,a){return e?h.jsx("span",{children:a[r.name+"@OData.Community.Display.V1.FormattedValue"]}):h.jsx("span",{children:"-"})}}function ka(s){const{dataverseClient:r,dataverseResource:e}=Zt(),{graphClient:a}=B(),i=b.useMemo(()=>{const t=[new Pa(a)];return s.customRenderers&&t.push(...s.customRenderers),t},[a,s.customRenderers]);return h.jsx($n,{...s,dataverseClient:r,dataverseEnv:e,customRenderers:i})}function $n(s){const r=b.useMemo(()=>{let a=[new Ca,new xt,new Ra];return s.customRenderers&&a.push(...s.customRenderers),a},[s.customRenderers]),e=b.useMemo(()=>new Ln(s.dataverseClient,s.dataverseEnv,s.tableName),[s.dataverseEnv,s.tableName]);return h.jsx(St,{dataService:e,fieldsToRender:s.fieldsToRender,customRenderers:r,selectionMode:s.selectionMode,systemFilter:s.systemFilter,getRowId:s.getRowId,onSelectionChange:s.onSelectionChange,onDataFetched:s.onDataFetched,renderFilter:(a,i,t)=>s.filterComponents&&s.filterComponents.find(o=>o.fieldName===a.name)?s.filterComponents.find(o=>o.fieldName===a.name).filterComponent(a,i,t):h.jsx(_a,{additionalFilters:t,onEntitySelected:o=>{if(o){const u=o.map(l=>({name:a.type=="Lookup"||a.type=="User"?`${a.name}/${a.relatedId}`:a.name,type:a.type,label:a.label,value:l.id,comparer:"Eq"}));i({...a,name:a.type=="Lookup"||a.type=="User"?`${a.name}/${a.relatedId}`:a.name},u)}},table:s.tableName,column:a,getFieldSuggestions:(o,u)=>e.getFieldSuggestions(o,s.systemFilter)})})}class qn{constructor(r,e,a,i=25){this.spHttpClient=r,this.siteUrl=e,this.listId=a,this.rowLimit=i,this.getFieldSuggestions=async(t,o)=>{let u=`${this.siteUrl}/_api/web/lists('${this.listId}')/RenderListFilterData?FieldInternalName='${t.name}'`;if(o&&o.length>0){let v="";for(let x=0;x<o.length;x++){const S=o[x],C=x+1;v+=`&FilterField${C}=${S.name}&FilterValue${C}=${encodeURIComponent(S.value)}&FilterType${C}=${S.type||"Text"}`}u+=v}const l=await this.spHttpClient.post(u,{headers:{accept:"application/json"}}),n=new DOMParser,c=await l.text(),g=n.parseFromString(c==null?void 0:c.replace("SELECTED",""),"application/xml").getElementsByTagName("OPTION"),y=[];for(let v=0;v<g.length;v++){const x=g.item(v);y.push({id:x.getAttribute("Value"),displayName:x.innerHTML})}return y},this.dataProvider=new Cr(r,e,a),this.dataProvider.pageSize=i}setFields(r){this.dataProvider.selectedFields=r.map(e=>e.name)}getTotalRows(){return this.dataProvider.allItemsCount}async getData(r,e,a){const i=new hr;return r&&r.length>0&&(r.forEach(t=>i.withFieldQuery(t)),this.dataProvider.setQuery(i.build())),e&&this.dataProvider.setOrder(e,a),this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}}function Ea(s){const r=async e=>{const a=[];return s.additionalFilters&&a.push(...s.additionalFilters),e&&a.push({name:s.column.name,type:s.column.type,value:e,comparer:"Contains"}),s.getFieldSuggestions(s.column,a)};return h.jsx(X,{additionalKey:`${s.listId}-${s.column.name}-${Zi(s.additionalFilters?s.additionalFilters.map(e=>e.name+e.value).join(";"):"")}`,...s,onDataRequested:r})}class Ta{isRendererApplicable(r){return r.type==="User"}renderField(r,e,a){if(!e||!Array.isArray(e)||e.length===0)return h.jsx("span",{children:"-"});const i=e;return h.jsx("span",{children:i.map((t,o)=>h.jsxs("span",{children:[t.title||t.email||"Unknown",o<i.length-1?", ":""]},o))})}}function Ia(s){const{spClient:r,siteUrl:e}=st();return h.jsx(Un,{...s,siteUrl:e,spClient:r})}function Un(s){const r=b.useMemo(()=>{let a=[];return a.push(new Ta,new xt),s.customRenderers&&a.push(...s.customRenderers),a},[s.customRenderers]),e=b.useMemo(()=>new qn(s.spClient,s.siteUrl,s.listId,s.rowLimit),[s.spClient,s.listId,s.siteUrl]);return h.jsx(St,{dataService:e,fieldsToRender:s.fieldsToRender,customRenderers:r,selectionMode:s.selectionMode,rowLimit:s.rowLimit,getRowId:s.getRowId,onSelectionChange:s.onSelectionChange,renderFilter:(a,i,t)=>h.jsx(Ea,{additionalFilters:t,onEntitySelected:o=>{if(o){const u=o.map(l=>({name:a.name,type:a.type,label:a.label,value:l.id,comparer:"Eq"}));i({...a,name:a.name},u)}},listId:s.listId,column:a,getFieldSuggestions:e.getFieldSuggestions})})}class Da{constructor(r,e){this.graphClient=r,this.entityEndpoint=e,this.dataProvider=new Qt(r,e,!0)}getTotalRows(){return this.dataProvider.allItemsCount}mapToExpand(r){return r.expandFields?`${r.name}($select=${r.expandFields.join(",")})`:r.name}setFields(r){this.dataProvider.selectQuery=r.filter(e=>e.type!=="Lookup").map(e=>e.name).join(","),this.dataProvider.expandQuery=r.filter(e=>e.type==="Lookup"||e.type==="User").map(e=>this.mapToExpand(e)).join(",")}getData(r,e,a){if(r){const i=new jt;for(const o of r)i.withFieldQuery(o);const t=i.build();this.dataProvider.setQuery(t)}return e&&this.dataProvider.setOrder(e,a||"ASC"),this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}async getFieldSuggestions(r,e){return[]}}P.AbstractGraphEntityPicker=X,P.AuthenticationContext=Ve,P.AuthenticationContextProvider=dr,P.ChannelPicker=da,P.ChannelPickerStandalone=Tn,P.DataverseContext=ot,P.DataverseContextProvider=Gr,P.DataverseTableDataGridService=Ln,P.DataverseTableGrid=ka,P.DataverseTableGridStandalone=$n,P.DrivePicker=ha,P.DrivePickerStandalone=In,P.GenericDataGrid=St,P.GraphContext=it,P.GraphContextProvider=Ur,P.GraphEntityDataGridService=Da,P.GraphGroupMembershipTrimmedComponent=ma,P.GraphGroupMembershipTrimmedComponentStandalone=Fn,P.GraphPersona=fa,P.GraphPersonaStandalone=Le,P.M365CopilotSearch=ia,P.M365Search=na,P.PeoplePicker=ya,P.PeoplePickerStandalone=On,P.PersonaService=wt,P.SPContext=at,P.SPContextProvider=Br,P.SPListDataGrid=Ia,P.SPListDataGridService=qn,P.SPListDataGridStandalone=Un,P.SPPermissionTrimmedComponent=pa,P.SPPermissionTrimmedComponentStandalone=An,P.SearchInputWithSuggestions=oa,P.SitePicker=va,P.SitePickerStandalone=jn,P.TeamPicker=ga,P.TeamPickerStandalone=Dn,P.defaultSelectFields=vt,P.useAuthentication=Ie,P.useDataverse=Zt,P.useGraph=B,P.useSP=st,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
27
+ */var et;function pn(){if(et)return ie;et=1;var e=G,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,y){var d,b={},m=null,S=null;y!==void 0&&(m=""+y),f.key!==void 0&&(m=""+f.key),f.ref!==void 0&&(S=f.ref);for(d in f)r.call(f,d)&&!s.hasOwnProperty(d)&&(b[d]=f[d]);if(c&&c.defaultProps)for(d in f=c.defaultProps,f)b[d]===void 0&&(b[d]=f[d]);return{$$typeof:t,type:c,key:m,ref:S,props:b,_owner:i.current}}return ie.Fragment=n,ie.jsx=l,ie.jsxs=l,ie}process.env.NODE_ENV==="production"?Pe.exports=pn():Pe.exports=yn();var o=Pe.exports;const we=g.createContext({authProvider:{getAccessToken:async()=>{throw new Error("No auth provider available")},isAuthenticated:async()=>!1,clearCache:async()=>{throw new Error("No auth provider available")},logout:async()=>{throw new Error("No auth provider available")}}}),he=()=>g.useContext(we),Sn=e=>o.jsx(we.Provider,{value:{authProvider:e.authProvider},children:e.children}),Ee=g.createContext({graphClient:new k.FetchHttpClient}),q=()=>g.useContext(Ee),bn=e=>{const{authProvider:t}=he(),n=()=>{if(e.graphClient)return e.graphClient;if(t)return new k.BatchGraphClient(new k.AuthHttpClient(t,new k.FetchHttpClient))},[r,i]=g.useState(n());return g.useEffect(()=>{i(n())},[e.graphClient,t]),r&&o.jsx(Ee.Provider,{value:{graphClient:r},children:e.children})},De=g.createContext({spClient:new k.FetchHttpClient,siteUrl:""}),je=()=>g.useContext(De),Cn=e=>{const{authProvider:t}=he(),n=()=>{if(e.spClient)return e.spClient;if(t){let s=new k.AuthHttpClient(t,new k.FetchHttpClient);return s.resourceUri=new URL(e.siteUrl).origin,s}},[r,i]=g.useState(n());return g.useEffect(()=>{i(n())},[e.spClient,t]),r&&o.jsx(De.Provider,{value:{spClient:r,siteUrl:e.siteUrl},children:e.children})},Ie=g.createContext({dataverseClient:new k.FetchHttpClient}),tt=()=>g.useContext(Ie),xn=e=>{const{authProvider:t}=he(),n=()=>{if(e.dataverseClient)return e.dataverseClient;if(t){let s=new k.AuthHttpClient(t,new k.FetchHttpClient);return s.resourceUri=e.dataverseResource,e.autoBatch&&(s=new k.DataverseBatchClient(s,e.dataverseResource,e.apiPath,500)),s}},[r,i]=g.useState(n());return g.useEffect(()=>{i(n())},[e.dataverseClient,t]),r&&o.jsx(Ie.Provider,{value:{dataverseClient:r,dataverseResource:e.dataverseResource},children:e.children})},Oe=typeof window>"u"?global:window,_e="@griffel/";function nt(e,t){return Oe[Symbol.for(_e+e)]||(Oe[Symbol.for(_e+e)]=t),Oe[Symbol.for(_e+e)]}const ke=nt("DEBUG_RESET_CLASSES",{}),se=nt("DEFINITION_LOOKUP_TABLE",{}),oe="data-make-styles-bucket",rt="data-priority",Fe="data-container",Rn="r",le=7,Q="___",at="_",it=process.env.NODE_ENV==="production"?Q.length+le:Q.length+le+at.length+le,Pn=0,st=1;function Ne(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Te(e){const t=e.length;if(t===le)return e;for(let n=t;n<le;n++)e+="0";return e}function ot(e,t,n=[]){return process.env.NODE_ENV==="production"?Q+Te(Ne(e+t)):Q+Te(Ne(e+t))+at+Te(Ne(n.join("")))}function lt(e,t){let n="",r="";for(const i in e){const s=e[i];if(s===0){r+=i+" ";continue}const l=Array.isArray(s),c=t==="rtl"?(l?s[1]:s)+" ":(l?s[0]:s)+" ";n+=c,r+=c}return[n.slice(0,-1),r.slice(0,-1)]}function ct(e,t){const n={};for(const r in e){const[i,s]=lt(e[r],t);if(s===""){n[r]="";continue}const l=ot(s,t),c=l+(i===""?"":" "+i);se[l]=[e[r],t],n[r]=c}return n}const ge={};function ut(){let e=null,t="",n="";const r=new Array(arguments.length);let i="";for(let m=0;m<arguments.length;m++){const S=arguments[m];if(typeof S=="string"&&S!==""){const v=S.indexOf(Q);if(v===-1)process.env.NODE_ENV!=="production"&&S.split(" ").forEach(w=>{w.startsWith(Rn)&&ke[w]&&(i?console.error(`mergeClasses(): a passed string contains multiple classes produced by makeResetStyles (${S} & ${t}, this will lead to non-deterministic behavior. Learn more:https://griffel.js.org/react/api/make-reset-styles#limitations
28
+ Source string: ${S}`):i=w)}),t+=S+" ";else{const w=S.substr(v,it);v>0&&(t+=S.slice(0,v)),n+=w,r[m]=w}process.env.NODE_ENV!=="production"&&S.indexOf(Q,v+1)!==-1&&console.error(`mergeClasses(): a passed string contains multiple identifiers of atomic classes (classes that start with "${Q}"), it's possible that passed classes were concatenated in a wrong way. Source string: ${S}`)}}if(n==="")return t.slice(0,-1);const s=ge[n];if(s!==void 0)return t+s;const l=[];for(let m=0;m<arguments.length;m++){const S=r[m];if(S){const v=se[S];v?(l.push(v[Pn]),process.env.NODE_ENV!=="production"&&e!==null&&e!==v[st]&&console.error(`mergeClasses(): a passed string contains an identifier (${S}) that has different direction (dir="${v[1]?"rtl":"ltr"}") setting than other classes. This is not supported. Source string: ${arguments[m]}`),e=v[st]):process.env.NODE_ENV!=="production"&&console.error(`mergeClasses(): a passed string contains an identifier (${S}) that does not match any entry in cache. Source string: ${arguments[m]}`)}}const c=Object.assign.apply(Object,[{}].concat(l)),[f,y]=lt(c,e),d=ot(y,e,r),b=d+" "+f;return ge[n]=b,se[d]=[c,e],t+b}const dt={},ft=new Set,ee={getChildrenSequences:e=>{const t=Object.keys(ge).find(n=>ge[n].startsWith(e));return t?t.split(Q).filter(n=>n.length).map(n=>Q+n):[]},addCSSRule:e=>{ft.add(e)},addSequenceDetails:(e,t)=>{Object.entries(e).forEach(([n,r])=>{dt[r.substring(0,it)]={slotName:n,sourceURL:t}})},getCSSRules:()=>Array.from(ft),getSequenceDetails:e=>dt[e]};function ht(e,t){return Array.isArray(e)?t==="rtl"?e[1]:e[0]:e||""}function wn(e,t,n,r){const i=e[0],s=e[1];return Object.entries(i).map(([l,c])=>{const f=ht(c,s);let y;if(n&&t){const d=n.find(({className:b})=>b===f);!d&&t[0][l]?y=ht(t[0][l],t[1]):d&&t[0][l]?y=(r?r.filter(({debugClassNames:m})=>m.filter(({className:S})=>S===f).length>0).length>0:!1)?d.className:d.overriddenBy:(!d&&!t[0][l]||d&&!t[0][l])&&(y=void 0)}return{className:f,overriddenBy:y}})}function gt(e,t){const n=se[e];if(n===void 0)return;const r=t?se[t.sequenceHash]:void 0,i=wn(n,r,t==null?void 0:t.debugClassNames,t==null?void 0:t.children),s={sequenceHash:e,direction:n[1],children:[],debugClassNames:i};return ee.getChildrenSequences(s.sequenceHash).reverse().forEach(c=>{const f=gt(c,s);f&&s.children.push(f)}),s.children.length||(s.rules={},s.debugClassNames.forEach(({className:c})=>{const f=ee.getSequenceDetails(e);f&&(s.slot=f.slotName,s.sourceURL=f.sourceURL);const y=ee.getCSSRules().find(d=>d.includes(c));s.rules[c]=y})),s}function En(e){if(ke[e]===void 0)return;const r={sequenceHash:e,direction:"ltr",children:[],debugClassNames:[{className:e}]};r.rules={},r.slot="makeResetStyles()";const[{className:i}]=r.debugClassNames,s=ee.getCSSRules().filter(l=>l.includes(`.${i}`));return r.rules[i]=s.join(""),r}function Dn(e,t){const n=e?gt(e):void 0,r=t?En(t):void 0;return!n&&!r?void 0:n?r?{sequenceHash:n.sequenceHash+r.sequenceHash,direction:n.direction,children:[n,r],debugClassNames:[...n.debugClassNames,...r.debugClassNames]}:n:r}function jn(e){const t=e.defaultView;if(!t||t.__GRIFFEL_DEVTOOLS__)return;const n={getInfo:r=>{let i,s;for(const l of r.classList)l.startsWith(Q)&&(i=l),ke[l]&&(s=l);return Dn(i,s)}};Object.defineProperty(t,"__GRIFFEL_DEVTOOLS__",{configurable:!1,enumerable:!1,get(){return n}})}const me=(()=>{var e;try{return!!(typeof window<"u"&&(!((e=window.sessionStorage)===null||e===void 0)&&e.getItem("__GRIFFEL_DEVTOOLS__")))}catch{return!1}})(),Ae="<unknown>";function In(e){return Fn(e)||An(e)||$n(e)}const On=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)?\)?\s*$/i,_n=/^\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)\s*$/i,kn=/\((\S*)\)/;function Fn(e){const t=On.exec(e)||_n.exec(e);if(!t)return null;let n=t[2];const r=n&&n.indexOf("native")===0,i=n&&n.indexOf("eval")===0,s=kn.exec(n);return i&&s!==null&&(n=s[1]),{loc:r?null:t[2],name:t[1]||Ae}}const Nn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)\s*$/i,Tn=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function An(e){const t=Nn.exec(e);if(!t)return null;let n=t[3];const r=n&&n.indexOf(" > eval")>-1,i=Tn.exec(n);return r&&i!==null&&(n=i[1]),{loc:t[3],name:t[1]||Ae}}const Ln=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?)\s*$/i;function $n(e){const t=Ln.exec(e);return t?{loc:t[3],name:t[1]||Ae}:null}function Bn(){const e=String(new Error().stack).split(`
29
+ `),t=Un(e);if(t===void 0)return;const n=In(t);return n==null?void 0:n.loc}function Un(e){for(let t=e.length-1;t>=0;--t)if(e[t].includes("at getSourceURLfromError"))return e[t+3]}function Gn(e){if(!Array.isArray(e))return[e];if(process.env.NODE_ENV!=="production"&&e.length>2)throw new Error("CSS Bucket contains an entry with greater than 2 items, please report this to https://github.com/microsoft/griffel/issues");return e}function qn(e,t,n,r){const i=[];if(r[oe]=t,r[rt]=String(n),e)for(const l in r)e.setAttribute(l,r[l]);function s(l){return e!=null&&e.sheet?e.sheet.insertRule(l,e.sheet.cssRules.length):i.push(l)}return{elementAttributes:r,insertRule:s,element:e,bucketName:t,cssRules(){return e!=null&&e.sheet?Array.from(e.sheet.cssRules).map(l=>l.cssText):i}}}const mt=["r","d","l","v","w","f","i","h","a","s","k","t","m","c","x"].reduce((e,t,n)=>(e[t]=n,e),{});function Mn(e,t,n){return e==="m"||e==="x"?e+t+n:e+n}function Vn(e,t,n,r,i={}){var s,l;const c=e==="m",f=e==="x",y=i.m,d=i.x,b=(s=i.p)!==null&&s!==void 0?s:0,m=Mn(e,(l=d??y)!==null&&l!==void 0?l:"0",b);if(!r.stylesheets[m]){const S=t&&t.createElement("style"),v=qn(S,e,b,{...r.styleElementAttributes,...c&&{media:y},...f&&{[Fe]:d}});r.stylesheets[m]=v,t!=null&&t.head&&S&&t.head.insertBefore(S,Qn(t,n,e,r,i))}return r.stylesheets[m]}function Wn(e,t,n){return e.getAttribute(oe)===t?t==="m"?n.m===e.media:t==="x"?n.x===e.getAttribute(Fe):!0:!1}function Qn(e,t,n,r,i={}){var s,l,c;const f=mt[n],y=(s=i.m)!==null&&s!==void 0?s:"",d=(l=i.x)!==null&&l!==void 0?l:"",b=(c=i.p)!==null&&c!==void 0?c:0;let m=O=>f-mt[O.getAttribute(oe)],S=e.head.querySelectorAll(`[${oe}]`);if(n==="m"||n==="x"){const O=e.head.querySelectorAll(`[${oe}="${n}"]`);O.length&&(S=O,m=n==="m"?x=>r.compareMediaQueries(y,x.media):x=>{var _;return r.compareContainerQueries(d,(_=x.getAttribute(Fe))!==null&&_!==void 0?_:"")})}const v=O=>Wn(O,n,i)?b-Number(O.getAttribute(rt)):m(O),w=S.length;let E=w-1;for(;E>=0;){const O=S.item(E);if(v(O)>0)return O.nextSibling;E--}return w>0?S.item(0):t?t.nextSibling:null}const zn=["-moz-placeholder","-moz-focus-inner","-moz-focusring","-ms-input-placeholder","-moz-read-write","-moz-read-only"].join("|"),Hn=new RegExp(`:(${zn})`);function vt(e,t){try{e.insertRule(t)}catch(n){process.env.NODE_ENV!=="production"&&!Hn.test(t)&&console.error(`There was a problem inserting the following rule: "${t}"`,n)}}let Yn=0;const Kn=(e,t)=>e<t?-1:e>t?1:0;function Xn(e=typeof document>"u"?void 0:document,t={}){const{classNameHashSalt:n,unstable_filterCSSRule:r,insertionPoint:i,styleElementAttributes:s,compareMediaQueries:l=Kn,compareContainerQueries:c=l}=t,f={classNameHashSalt:n,insertionCache:{},stylesheets:{},styleElementAttributes:Object.freeze(s),compareMediaQueries:l,compareContainerQueries:c,id:`d${Yn++}`,insertCSSRules(y){for(const d in y){const b=y[d];for(let m=0,S=b.length;m<S;m++){const[v,w]=Gn(b[m]),E=Vn(d,e,i||null,f,w);f.insertionCache[v]||(f.insertionCache[v]=d,process.env.NODE_ENV!=="production"&&me&&ee.addCSSRule(v),r?r(v)&&vt(E,v):vt(E,v))}}}};return e&&process.env.NODE_ENV!=="production"&&me&&jn(e),f}const Zn=()=>{const e={};return function(n,r){e[n.id]===void 0&&(n.insertCSSRules(r),e[n.id]=!0)}};function Jn(e,t,n=Zn){const r=n();let i=null,s=null,l;process.env.NODE_ENV!=="production"&&me&&(l=Bn());function c(f){const{dir:y,renderer:d}=f,b=y==="ltr";b?i===null&&(i=ct(e,y)):s===null&&(s=ct(e,y)),r(d,t);const m=b?i:s;return process.env.NODE_ENV!=="production"&&me&&ee.addSequenceDetails(m,l),m}return c}function er(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const yt=G.useInsertionEffect?G.useInsertionEffect:void 0,tr=()=>{const e={};return function(n,r){if(yt&&er()){yt(()=>{n.insertCSSRules(r)},[n,r]);return}e[n.id]===void 0&&(n.insertCSSRules(r),e[n.id]=!0)}},nr=G.createContext(Xn());function rr(){return G.useContext(nr)}const ar=G.createContext("ltr");function ir(){return G.useContext(ar)}function pt(e,t){const n=Jn(e,t,tr);return function(){const i=ir(),s=rr();return n({dir:i,renderer:s})}}const sr=pt({root:{mc9l5x:"f1w7gpdv",Bg96gwp:"fez10in"},rtl:{Bz10aip:"f13rod7r"}},{d:[".f1w7gpdv{display:inline;}",".fez10in{line-height:0;}",".f13rod7r{transform:scaleX(-1);}"]}),St=g.createContext(void 0),or={};St.Provider;const lr=()=>{const e=g.useContext(St);return e??or},cr="fui-Icon",ur="data-fui-icon",dr=(e,t)=>{const{filled:n,idPrefix:r,title:i,primaryFill:s="currentColor",...l}=e,c={...l,fill:s},f=lr(),y=!!(t!=null&&t.flipInRtl&&(f==null?void 0:f.textDirection)==="rtl");return i&&(c["aria-label"]=i),!c["aria-label"]&&!c["aria-labelledby"]?c["aria-hidden"]=!0:c.role="img",c[ur]="",{state:c,isRtlFlip:y}},fr=(e,t)=>{const n=sr(),{state:r,isRtlFlip:i}=dr(e,t);return r.className=ut(n.root,i&&n.rtl,r.className),r},hr=pt({root:{B8gzw0y:"f1dd5bof"}},{m:[["@media (forced-colors: active){.f1dd5bof{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}]]}),Le="url(#",bt=(e,t,n)=>{const[r,i,...s]=e;let l=i;if(n&&i){const c={};for(const f in i){const y=i[f];if(typeof y!="string")c[f]=y;else if(f==="id")c[f]=n+y;else{const d=y.indexOf(Le);c[f]=d<0?y:y.slice(0,d+Le.length)+n+y.slice(d+Le.length)}}l=c}return g.createElement(r,{...l,key:t},...s.map((c,f)=>bt(c,f,n)))},gr=e=>e==="1em"?"20":e,Ct=(e,t,n)=>typeof e!="string"&&(t!=null&&t.color||Array.isArray(e[0]))?e.map((r,i)=>bt(r,i,n)):void 0,mr=()=>{},vr=(e,t)=>{const n=Ct(e,t);return n?function(i){return g.useMemo(()=>i?Ct(e,t,i):n,[i])}:mr},yr=(e,t,n)=>typeof t=="string"?g.createElement("svg",{...e,dangerouslySetInnerHTML:{__html:t}}):n?g.createElement("svg",e,...n):g.createElement("svg",e,...t.map(r=>g.createElement("path",{d:r,fill:e.fill}))),Y=(e,t,n,r)=>{const i=gr(t),s=vr(n,r),l=g.forwardRef((c,f)=>{const y=hr(),d=fr(c,{flipInRtl:r==null?void 0:r.flipInRtl}),b=s(c.idPrefix),m={...d,className:ut(cr,d.className,y.root),ref:f,width:t,height:t,viewBox:`0 0 ${i} ${i}`,xmlns:"http://www.w3.org/2000/svg"};return yr(m,n,b)});return l.displayName=e,l},pr=Y("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0}),Sr=Y("FilterRegular","1em",["M7.5 13h5a.5.5 0 0 1 .09 1H7.5a.5.5 0 0 1-.09-1h5.09-5Zm-2-4h9a.5.5 0 0 1 .09 1H5.5a.5.5 0 0 1-.09-1h9.09-9Zm-2-4h13a.5.5 0 0 1 .09 1H3.5a.5.5 0 0 1-.09-1H16.5h-13Z"]),br=Y("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"]),xt=Y("Search20Regular","20",["M13.73 14.44a6.5 6.5 0 1 1 .7-.7l3.42 3.4a.5.5 0 0 1-.63.77l-.07-.06-3.42-3.41Zm-.71-.71A5.54 5.54 0 0 0 15 9.5a5.5 5.5 0 1 0-1.98 4.23Z"]),Cr=Y("Open16Regular","16",["M4.5 3C3.67 3 3 3.67 3 4.5v7c0 .83.67 1.5 1.5 1.5h7c.83 0 1.5-.67 1.5-1.5V9.27a.5.5 0 0 1 1 0v2.23a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 11.5v-7A2.5 2.5 0 0 1 4.5 2h2.23a.5.5 0 0 1 0 1H4.5Zm4.27-.5c0-.28.22-.5.5-.5h4.23c.28 0 .5.22.5.5v4.23a.5.5 0 0 1-1 0V3.71L9.62 7.08a.5.5 0 1 1-.7-.7L12.29 3H9.27a.5.5 0 0 1-.5-.5Z"]),xr=Y("ChevronLeft16Regular","16",["M10.35 3.15c.2.2.2.5 0 .7L6.21 8l4.14 4.15a.5.5 0 0 1-.7.7l-4.5-4.5a.5.5 0 0 1 0-.7l4.5-4.5c.2-.2.5-.2.7 0Z"]),Rr=Y("ChevronRight16Regular","16",["M5.65 3.15a.5.5 0 0 0 0 .7L9.79 8l-4.14 4.15a.5.5 0 0 0 .7.7l4.5-4.5a.5.5 0 0 0 0-.7l-4.5-4.5a.5.5 0 0 0-.7 0Z"]),Pr=Y("Dismiss24Regular","24",["m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"]),$e=["title","path","description","listItemId","identityListItemId","identityListId","identitySiteCollectionId","identityWebId","lastModifiedTime","viewsLifeTime","viewsRecent","owstaxidmetadataalltagsinfo","driveId","author","authorOwsUser"],Rt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xlsx.png",Pt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/docx.png",wt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pptx.png",Et="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/mpp.png",ce="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/photo.png",wr="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pdf.png",Er="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/txt.png",Dt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/email.png",Dr="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/csv.png",jr="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/pub.png",Ir="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/accdb.png",Be="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/zip.png",Ue="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/genericfile.png",jt="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/code.png",Or="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/html.png",_r="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/xml.png",kr="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/spo.png",ue="https://static2.sharepointonline.com/files/fabric/assets/item-types/32/video.png",pe=class pe{static getFileImageUrl(t){if(!t)return Ue;let n=Ue;const r=t.split("."),i=r[r.length-1];if(!i)return n;switch(i.toLowerCase()){case"xlsx":n=Rt;break;case"xls":n=Rt;break;case"docx":n=Pt;break;case"doc":n=Pt;break;case"pptx":n=wt;break;case"ppt":n=wt;break;case"mppx":n=Et;break;case"mpp":n=Et;break;case"csv":n=Dr;break;case"pdf":n=wr;break;case"txt":n=Er;break;case"jpg":n=ce;break;case"msg":n=Dt;break;case"jpeg":n=ce;break;case"png":n=ce;break;case"ico":n=ce;break;case"tiff":n=ce;break;case"eml":n=Dt;break;case"pub":n=jr;break;case"accdb":n=Ir;break;case"zip":n=Be;break;case"7z":n=Be;break;case"tar":n=Be;break;case"js":n=jt;break;case"json":n=jt;break;case"html":n=Or;break;case"xml":n=_r;break;case"aspx":n=kr;break;case"mp4":n=ue;break;case"mov":n=ue;break;case"wmv":n=ue;break;case"ogg":n=ue;break;case"webm":n=ue;break;default:n=Ue;break}return n}};pe.getShortName=t=>{if(!t)return"";const n=t.split("."),r=n[0].substring(0,25),i=n[n.length-1];return`${r}...${i}`},pe.isOndrive=async t=>t?t.indexOf("my.sharepoint.com")>-1:!1;let ve=pe;const Z=class Z{};Z.getThumbnailUrl=(t,n="medium")=>`https://graph.microsoft.com/v1.0/sites/${t.identitySiteCollectionId}/sites/${t.identityWebId}/lists/${t.identityListId}/items/${t.listItemId}/microsoft.graph.listitem/driveItem/thumbnails/0/${n}/content`,Z.getThumbnailImageFromGraphApiCall=async(t,n)=>{const r=await t.get(n);if(r.headers["content-type"]==="application/json")return"data:image/png;base64,"+(await r.text()).replace('"',"").replace('"',"");if(r.status===302)return r.headers.Location;if(r.status===404)return"";const i=await r.arrayBuffer();return`data:image/jpeg;base64,${Buffer.from(new Uint8Array(i).reduce((l,c)=>l+String.fromCharCode(c),"")).toString("base64")}`},Z.getThumbnailImageFromGraph=async(t,n,r="medium")=>{const i=Z.getThumbnailUrl(t,r);return await Z.getThumbnailImageFromGraphApiCall(n,i)};let Ge=Z;function Fr(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}const Nr=h.makeStyles({title:{...h.shorthands.margin(0,0,"12px")},description:{...h.shorthands.margin(0,0,"12px")},card:{width:"20rem",maxWidth:"100%",height:"fit-content"},image:{width:"20rem",height:"7rem"},text:{...h.shorthands.margin(0)},imageIconWrapper:{width:"20rem!important",height:"7rem!important",display:"flex!important",justifyContent:"center",alignItems:"center",backgroundColor:h.tokens.colorNeutralBackground3}}),It=e=>{const{graphClient:t}=q(),n=Nr(),[r,i]=g.useState(void 0);return g.useEffect(()=>{Ge.getThumbnailImageFromGraph(e.document.fields,t).then(s=>{i(s)}).catch(s=>{console.error(s)})},[]),o.jsxs(h.Card,{className:n.card,children:[o.jsx(h.CardPreview,{children:r?o.jsx("img",{src:r,alt:e.document.fields.title,className:n.image}):o.jsx("div",{className:n.imageIconWrapper,children:o.jsx("div",{children:o.jsx("img",{src:ve.getFileImageUrl(e.document.fields.path),width:"32px",height:"32px",alt:e.document.fields.title})})})}),o.jsx(h.CardHeader,{image:o.jsx("img",{src:ve.getFileImageUrl(e.document.fields.path),width:"32px",height:"32px",alt:e.document.fields.title}),header:o.jsx(h.Body1,{children:o.jsx("b",{children:e.document.fields.title})}),description:o.jsx(h.Caption1,{children:e.document.fields.author}),action:o.jsx(h.Button,{appearance:"transparent","aria-label":"More options"})}),o.jsx("p",{className:n.text,children:e.document.fields.description}),o.jsx(h.CardFooter,{children:o.jsx(h.Button,{as:"a",href:e.document.fields.path,appearance:"primary",icon:o.jsx(Cr,{}),children:"Open"})})]})},Tr=h.makeStyles({wrapper:{},searchInput:{},searchResults:{display:"flex",flexWrap:"wrap",flexDirection:"row",...h.shorthands.gap(h.tokens.spacingHorizontalL,h.tokens.spacingVerticalL)}}),Ar=e=>{var S;const{graphClient:t}=q(),n=Tr(),r=g.useMemo(()=>{var w,E,O,x,_,L,A;var v=new k.GraphSearchPagedDataProvider(t,[((w=e.dataProviderProps)==null?void 0:w.entityType)??"listItem"],((E=e.dataProviderProps)==null?void 0:E.selectFields)||$e);return v.queryTemplate=(O=e.dataProviderProps)==null?void 0:O.queryTemplate,v.pageSize=(x=e.dataProviderProps)==null?void 0:x.pageSize,(_=e.dataProviderProps)!=null&&_.aggregations&&v.setRefiners((L=e.dataProviderProps)==null?void 0:L.aggregations),v.setQuery(((A=e.dataProviderProps)==null?void 0:A.initialQuery)??""),v},[t,e.dataProviderProps]),[i,s]=g.useState(!0),[l,c]=g.useState(((S=e.dataProviderProps)==null?void 0:S.initialQuery)??""),[f,y]=g.useState([]),[d,b]=g.useState(void 0);g.useEffect(()=>{r.setQuery(l),s(!0),r.getData().then(v=>{y(v),b(void 0)}).catch(v=>{b(v.message)}).finally(()=>{s(!1)})},[l]);const m=()=>e!=null&&e.searchInputComponent?o.jsx(e.searchInputComponent,{onSearch:v=>{c(v)}}):o.jsx(h.Input,{contentBefore:o.jsx(xt,{}),placeholder:"Search",value:l,onChange:v=>{c(v.target.value)}});return o.jsxs("div",{children:[o.jsx("div",{children:m()}),o.jsxs("div",{children:[i&&o.jsx(h.Spinner,{label:"Loading..."}),!i&&d&&o.jsxs("div",{children:["Error: ",d]})]}),o.jsx("div",{className:n.searchResults,children:f.map((v,w)=>o.jsx("div",{children:e!=null&&e.onResultRendering?e.onResultRendering(v):o.jsx(It,{document:v})},w))})]})},Lr=h.makeStyles({wrapper:{},searchInput:{},searchResults:{display:"flex",flexWrap:"wrap",flexDirection:"row",...h.shorthands.gap(h.tokens.spacingHorizontalL,h.tokens.spacingVerticalL)}}),$r=e=>{var S;const{graphClient:t}=q(),n=Lr(),r=g.useMemo(()=>{var w,E;var v=new dn.CopilotRetrievalDataProvider(t,"sharePoint",((w=e.dataProviderProps)==null?void 0:w.selectFields)||$e,(E=e.dataProviderProps)==null?void 0:E.queryTemplate);return v},[t,e.dataProviderProps]),[i,s]=g.useState(!0),[l,c]=g.useState(((S=e.dataProviderProps)==null?void 0:S.initialQuery)??""),[f,y]=g.useState([]),[d,b]=g.useState(void 0);g.useEffect(()=>{k.DebounceHandler.debounce("copilot-search",async()=>{s(!0),r.getData(l).then(v=>{y(v),b(void 0)}).catch(v=>{b(v.message)}).finally(()=>{s(!1)})},1e3)},[l]);const m=()=>e!=null&&e.searchInputComponent?o.jsx(e.searchInputComponent,{onSearch:v=>{c(v)}}):o.jsx(h.Input,{style:{width:"500px"},contentBefore:o.jsx(xt,{}),placeholder:"Search",value:l,onChange:v=>{c(v.target.value)}});return o.jsxs("div",{children:[o.jsx("div",{children:m()}),o.jsxs("div",{children:[i&&o.jsx(h.Spinner,{label:"Loading..."}),!i&&d&&o.jsxs("div",{children:["Error: ",d]})]}),o.jsx("div",{className:n.searchResults,children:f.map((v,w)=>o.jsx("div",{children:e!=null&&e.onResultRendering?e.onResultRendering(v):o.jsx(It,{document:{fields:v.resourceMetadata,...v}})},w))})]})},Br=h.makeStyles({root:{paddingBottom:h.tokens.spacingVerticalM,position:"relative"},searchInput:{minWidth:"800px"},suggestionsSurface:{position:"absolute",top:"100%",marginTop:"0rem",zIndex:2,backgroundColor:h.tokens.colorNeutralBackgroundAlpha2,width:"800px",transform:"scaleY(0)",transformOrigin:"top",transitionProperty:"all",transitionTimingFunction:h.tokens.curveDecelerateMid,transitionDuration:h.tokens.durationSlow},suggestionsSurfaceVisible:{transform:"scaleY(1)"},suggestionsWrapper:{display:"flex",flexDirection:"column",rowGap:h.tokens.spacingVerticalM,maxHeight:"15rem",overflowY:"auto",alignItems:"flex-start"},suggestionsList:{listStyleType:"none",paddingLeft:"0px"},suggestionButton:{"&:focus":{...h.shorthands.borderColor(h.tokens.colorBrandBackground)}}}),Ur=[":","=","<",">","<=",">="];function Gr(e){const t=Br(),{graphClient:n}=q(),[r,i]=g.useState(!1),[s,l]=g.useState([]),[c,f]=g.useState(!0),[y,d]=g.useState(""),[b,m]=g.useState(!0),[S,v]=g.useState(),w=g.useRef(),E=g.useRef(),O=g.useRef(new k.GraphSearchInputSuggestionServiceBuilder(n));return g.useEffect(()=>{e.query&&O.current.withManagedPropertiesRelatedQuery(e.query),O.current.build().then(x=>{v(x),m(!1)})},[]),o.jsxs("div",{className:t.root,children:[o.jsx(h.Input,{ref:w,className:t.searchInput,contentAfter:b?o.jsx(h.Spinner,{size:"tiny"}):o.jsx(h.Button,{appearance:"transparent",title:"Search",onClick:()=>{e.onSearch(y)},icon:o.jsx(pr,{})}),value:y,onChange:(x,_)=>{d(_.value),k.DebounceHandler.debounce("search-input",async()=>{m(!0);const L=await S.getSuggestions(_.value);l(L.value),f(L.areSuggestionsProps),L.value&&L.value.length>0&&i(!0),m(!1)},500)},onKeyDown:x=>{var _;if(x.key==="Enter"&&e.onSearch(y),x.key==="ArrowDown"){const L=(_=E.current)==null?void 0:_.firstChild;if(L){const A=L.firstChild;if(A){A.focus(),x.preventDefault();return}}}x.key==="Escape"&&i(!1)}}),o.jsxs("div",{className:h.mergeClasses(t.suggestionsSurface,r&&t.suggestionsSurfaceVisible),onBlur:()=>{},children:[o.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"},children:o.jsx(h.Button,{tabIndex:-1,appearance:"subtle",onClick:()=>{i(!1)},title:"Close",icon:o.jsx(br,{})})}),o.jsx("div",{className:t.suggestionsWrapper,children:o.jsxs("ul",{className:t.suggestionsList,ref:E,onKeyDown:x=>{var M;const _=E==null?void 0:E.current.querySelectorAll("button"),L=x.target;let A=null;if(_.forEach((X,z)=>{X===L&&(A=z)}),x.key==="ArrowUp")if(A===0){(M=w.current)==null||M.focus(),x.preventDefault();return}else{_.item(A-1).focus(),x.preventDefault();return}if(x.key==="ArrowDown")if(A===_.length-1){_.item(0).focus(),x.preventDefault();return}else{_.item(A+1).focus(),x.preventDefault();return}},children:[c&&s.map(x=>o.jsx("li",{children:o.jsx(h.Button,{className:t.suggestionButton,appearance:"transparent",onClick:()=>{var M;const _=y.split(c?" ":":"),L=_[_.length-1],A=y.replace(L,x+":");d(A),i(!1),f(!1),(M=w.current)==null||M.focus()},children:x},x)})),!c&&s.map((x,_)=>o.jsx("li",{children:o.jsx(h.Button,{className:t.suggestionButton,appearance:"transparent",onClick:()=>{var z;const L=y.split(" ");let A=L[L.length-1],M=Ur.find(P=>A.indexOf(P)>0);M&&(A=A.split(M)[1]);const X=y.replace(A,x.replace(/ /g,"+"));d(X),i(!1),f(!0),(z=w.current)==null||z.focus(),e.onSearch(X)},children:x},_)}))]})})]})]})}var qr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,Vr=(e,t,n,r)=>{for(var i=r>1?void 0:r?Mr(t,n):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(i=(r?l(t,n,i):l(i))||i);return r&&i&&qr(t,n,i),i};class qe{constructor(t,n){this.graphClient=t,this.updatePresence=n,this.key="persona-cache-",this.cacheExpiration=1e3*60*60*4,this.storageService=new fn.LocalStorageCacheService}async getUser(t,n="48x48"){let r=t;if(t&&t.indexOf("@")>-1){const c=`/users/${t}?$select=id`,f=await this.graphClient.get(c);if(f.status===404)return null;r=(await f.json()).id}let i=this.storageService.get(this.key+t),s=i==null?void 0:i.data;const l=r?`/users/${r}`:"/me";if(!s||i.expiration<new Date().getTime()){const[c,f,y]=await Promise.all([this.graphClient.get(l+"?$select=id,displayName,mail,jobTitle,department,officeLocation,mobilePhone,businessPhones,userPrincipalName,usageLocation"),this.graphClient.get(l+`/photos/${n}/$value`),this.graphClient.get(l+"/presence")]),[d,b,m]=await Promise.all([c.json(),f.text(),y.json()]);s={...d,photo:`data:image/png;base64,${b.replace('"',"").replace('"',"")}`,presence:m},this.storageService.set(this.key+t,{data:s,expiration:new Date().getTime()+this.cacheExpiration})}else if(this.updatePresence){const f=await(await this.graphClient.get(l+"/presence")).json();s={...s,presence:f},this.storageService.set(this.key+t,{data:s,expiration:new Date().getTime()+this.cacheExpiration})}return s}}Vr([hn.queueRequest("getUser-{0}")],qe.prototype,"getUser",1);function ye(e){var b,m,S,v,w;const{id:t}=e;let n=e.graphClient;const r=E=>{switch(E){case"":return"offline";case"Available":return"available";case"Busy":return"busy";case"Away":return"away";case"DoNotDisturb":return"do-not-disturb";case"Offline":return"offline";case"PresenceUnknown":return"unknown";case"OutOfOffice":return"out-of-office";case"Blocked":return"blocked";case"BeRightBack":return"away";case"BusyIdle":return"busy";case"AvailableIdle":return"available";default:return E==null?void 0:E.toLowerCase()}},i=g.useRef(new qe(n,e.showPresence)),[s,l]=g.useState(!e.user),[c,f]=g.useState(e.user),y=async()=>{const E=await i.current.getUser(t);f({...e.user,...E}),l(!1)};if(g.useEffect(()=>{e.user||y()},[t]),s)return o.jsx(h.Spinner,{});const d=(c==null?void 0:c.displayName)||e.name||e.title||e.id;return o.jsx(h.Persona,{primaryText:d,secondaryText:c==null?void 0:c.jobTitle,avatar:{image:{src:c==null?void 0:c.photo},initials:((b=c==null?void 0:c.displayName)==null?void 0:b.split(" ").map(E=>E[0]).join(""))||((m=e.name)==null?void 0:m.split(" ").map(E=>E[0]).join(""))},presence:e.showPresence?{status:r((S=c==null?void 0:c.presence)==null?void 0:S.availability),outOfOffice:(w=(v=c==null?void 0:c.presence)==null?void 0:v.outOfOfficeSettings)==null?void 0:w.isOutOfOffice}:void 0,...e})}function Wr(e){const{graphClient:t}=q();return o.jsx(ye,{...e,graphClient:t})}function K(e){const[t,n]=g.useState(e.value||[]),[r,i]=g.useState(!1),[s,l]=g.useState(""),[c,f]=g.useState(e.value||[]),y=d=>gn.DebounceHandler.debounce(`entityPicker-${e.additionalKey}`,async()=>{i(!0);try{const b=await e.onDataRequested(d);n([...b,...c].reduce((m,S)=>m.find(w=>w.id===S.id)?m:m.concat([S]),[])),i(!1)}catch(b){console.error(b),i(!1)}},500);return g.useEffect(()=>{y(s)},[s,e.additionalKey]),e.renderOverride?o.jsx(o.Fragment,{children:e.renderOverride(t,r,y)}):o.jsxs(h.Field,{label:e.label,hint:e.description,children:[o.jsx(h.Combobox,{value:s,multiselect:e.multiSelect,freeform:!0,onChange:d=>{l(d.target.value)},size:e.size,disabled:e.disabled,onOptionSelect:(d,b)=>{let m=[];const S=t.find(v=>v.id===b.optionValue);c.some(v=>v.id===b.optionValue)?m=c.filter(v=>v.id!==b.optionValue):e.multiSelect?m=[...c,S]:m=[S],m=m.filter(v=>!!v),e.onEntitySelected&&e.onEntitySelected(m),f(m),l(m.map(v=>v.displayName).join(", "))},defaultSelectedOptions:c.map(d=>d.id),children:t.map(d=>o.jsx(h.Option,{text:d.displayName,value:d.id,children:e.onSuggestionRendering?e.onSuggestionRendering(d):d.displayName},encodeURIComponent(d.id)))}),r&&o.jsx(h.ProgressBar,{})]})}function Qr(e){const{graphClient:t}=q();return o.jsx(Ot,{...e,graphClient:t})}function Ot(e){const t=async()=>(await(await e.graphClient.get(`/teams/${e.teamId}/channels?$select=id,displayName`)).json()).value;g.useEffect(()=>{t()},[e.teamId]);const n=async r=>await t();return o.jsx(K,{additionalKey:`team-${e.teamId}-channels`,...e,onDataRequested:n})}function zr(e){const{graphClient:t}=q();return o.jsx(_t,{...e,graphClient:t,siteId:e.siteId})}function _t(e){const t=async n=>{let r=e.siteId?`/sites/${e.siteId}/drives?$select=id,name`:"/me/drives?$select=id,name";return n&&(r+=`&$filter=startswith(name, '${n}')`),(await(await e.graphClient.get(r)).json()).value.map(l=>({id:l.id,displayName:l.name}))};return o.jsx(K,{additionalKey:`drive-picker-${e.siteId}`,...e,onDataRequested:t})}function Hr(e){const{graphClient:t}=q();return o.jsx(kt,{...e,graphClient:t})}function kt(e){const t=async n=>{let r="/teams?$select=id,displayName&$top=8";return n&&(r+=`&$filter=startswith(displayName, '${n}')`),(await(await e.graphClient.get(r)).json()).value};return o.jsx(K,{additionalKey:"team-site-picker",...e,onDataRequested:t})}function Yr(e){const{graphClient:t}=q();return o.jsx(Ft,{...e,graphClient:t})}function Ft(e){const t=new k.PeopleProvider(e.graphClient,!0,!0),n=async r=>(t.setQuery(r),await t.getData());return o.jsx(K,{...e,additionalKey:"people-picker",onDataRequested:n,onSuggestionRendering:r=>(r.photo&&(r.photo=`data:image/png;base64,${r.photo.replace('"',"").replace('"',"")}`),o.jsx(ye,{showPresence:!0,user:r,graphClient:e.graphClient}))})}function Kr(e){const{graphClient:t}=q();return o.jsx(Nt,{...e,graphClient:t})}function Nt(e){const t=g.useRef(new k.GraphSearchPagedDataProvider(e.graphClient,["site"],["id","displayName"])),n=async r=>(t.current.setQuery(r||"*"),await t.current.getData());return o.jsx(K,{...e,onDataRequested:n})}function Tt(e){const[t,n]=g.useState(e.initialRender),[r,i]=g.useState(!0);return g.useEffect(()=>{e.permissionCheck().then(s=>{n(s)}).finally(()=>i(!1))},[]),r&&e.placeholder?o.jsx(o.Fragment,{children:e.placeholder}):t?o.jsx(o.Fragment,{children:e.children}):o.jsx(o.Fragment,{})}function Xr(e){const{spClient:t,siteUrl:n}=je();return o.jsx(At,{...e,siteUrl:n,spClient:t})}function At(e){return o.jsx(Tt,{placeholder:e.placeholder,permissionCheck:async()=>{var t=`${e.siteUrl}/_api/web/EffectiveBasePermissions`,n=await e.spClient.get(t,{headers:{accept:"application/json"}}),r=await n.json(),i=[];for(var s in k.permissionKind){var l=k.PermissionCheckService.hasPermission(r,k.permissionKind[s]);l&&i.push(s)}return i.indexOf(e.role)>=0},children:e.children},`${e.role}-${e.siteUrl}`)}function Lt(e){return o.jsx(Tt,{placeholder:e.placeholder,permissionCheck:async()=>{const t=`/me/transitiveMemberOf/${e.groupId}?$select=id`;return(await e.graphClient.get(t)).ok},children:e.children},e.groupId)}function Zr(e){const{graphClient:t}=q();return o.jsx(Lt,{...e,graphClient:t})}class $t{constructor(t,n,r){this.dataverseClient=t,this.dataverseEnv=n,this.tableName=r,this.dataFields=[],this.getFieldSuggestions=async(i,s)=>{if(i.type==="User"){let y=`${this.dataverseEnv}/api/data/v9.0/systemusers?`;if(s&&s.length>0){const m=new k.DataverseQueryBuilder;for(const S of s)S.type||(S.type="Text"),S.name=i.expandFields[0],m.withFieldQuery(S);y+=`$filter=${m.build()}&`}return y+=`$select=${i.expandFields.join(",")}`,(await(await this.dataverseClient.get(y,{headers:{prefer:"odata.include-annotations=*"}})).json()).value.map(m=>({id:m[i.relatedId],displayName:m[i.expandFields[0]]}))}let l=`${this.dataverseEnv}/api/data/v9.0/${this.tableName}?`;if(s&&s.length>0){const y=new k.DataverseQueryBuilder;for(const d of s)d.type||(d.type="Text"),y.withFieldQuery(d,d.joinBy||"And");l+=`$filter=${y.build()}&`}i.type==="Lookup"?l+=`$apply=groupby((${i.name}/${i.relatedId||i.name+"_id"},${i.name}/${i.expandFields[0]}))`:i.type=="DateTime"?l+=`$apply=aggregate(${i.name} with min as ${i.name})`:l+=`$apply=groupby((${i.name}))`;const f=await(await this.dataverseClient.get(l,{headers:{prefer:"odata.include-annotations=*"}})).json();if(i.type==="Lookup"||i.type==="User"){if(f.value.length===0)return[];let y="",d="";const b=f.value[0];for(const m in b)m.indexOf(i.relatedId)>=0&&(y=m),m.indexOf(i.expandFields[0])>=0&&(d=m);return f.value.map(m=>({id:m[y],displayName:m[d]}))}return f.value.map(y=>({id:y[i.name],displayName:y[`${i.name}@OData.Community.Display.V1.FormattedValue`]?y[`${i.name}@OData.Community.Display.V1.FormattedValue`]:y[i.name]}))},this.dataProvider=new k.DataversePagedDataProvider(t,n,r),this.dataProvider.pageSize=25}getTotalRows(){return this.dataProvider.allItemsCount}mapToExpand(t){return t.expandFields?`${t.name}($select=${t.expandFields.join(",")})`:t.name}setFields(t){this.dataProvider.selectQuery=t.filter(n=>n.type!=="Lookup").map(n=>n.name).join(","),this.dataProvider.expandQuery=t.filter(n=>n.type==="Lookup"||n.type==="User").map(n=>this.mapToExpand(n)).join(","),this.dataFields=t}getData(t,n,r){if(t&&t.length>0){const i=new k.DataverseQueryBuilder;for(const l of t)l.type||(l.type="Text"),i.withFieldQuery(l,l.joinBy||"And");const s=i.build();this.dataProvider.setQuery(s)}else this.dataProvider.setQuery("");if(n){let i=n,s=this.dataFields.find(l=>l.name===i);s&&s.type==="Lookup"?i=`${s.name}/${s.expandFields[0]}`:s&&s.type==="User"&&(i=`${s.name}/fullname`),this.dataProvider.setOrder(i,r||"ASC")}return this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}}class Me{isRendererApplicable(t){return t.type==="DateTime"}renderField(t,n,r){if(!n)return o.jsx("span",{children:"-"});const i=new Date(String(n));return isNaN(i.getTime())?o.jsx("span",{children:"-"}):o.jsx("span",{children:i.toLocaleDateString()})}}class Jr{constructor(){this.renderers=[new Me]}registerRenderer(t){this.renderers.unshift(t)}isRendererApplicable(t){return!!this.renderers.find(n=>n.isRendererApplicable(t))}renderField(t,n,r){const i=this.renderers.find(s=>s.isRendererApplicable(t));return i?i.renderField(t,n,r):typeof n=="string"?o.jsx("div",{children:n}):o.jsx("div",{children:JSON.stringify(n)})}}const ea=h.makeStyles({root:{display:"flex",justifyContent:"end",gap:h.tokens.spacingHorizontalS},button:{},activeFilterButton:{backgroundColor:h.tokens.colorBrandBackground,color:h.tokens.colorNeutralForegroundOnBrand}});function ta(e){const[t,n]=g.useState(!1),r=ea(),i=e.initialQueryFields&&e.initialQueryFields.length>0;return o.jsxs("div",{className:r.root,children:[i&&e.onClearFilters&&o.jsx(h.Button,{"aria-label":"Clear all filters",appearance:"subtle",onClick:e.onClearFilters,children:"Clear filters"}),o.jsx(h.Button,{"aria-label":"Open filter pane",icon:o.jsx(Sr,{}),className:i?r.activeFilterButton:void 0,onClick:()=>{n(!0)}}),o.jsxs(h.Drawer,{type:"overlay",separator:!0,open:t,onOpenChange:(s,{open:l})=>n(l),position:"end",children:[o.jsx(h.DrawerHeader,{children:o.jsx(h.DrawerHeaderTitle,{action:o.jsx(h.Button,{appearance:"subtle","aria-label":"Close",icon:o.jsx(Pr,{}),onClick:()=>n(!1)}),children:"Filter"})}),o.jsx(h.DrawerBody,{children:e.filterFields.map(s=>o.jsx(h.Field,{label:s.label||s.name,children:e.renderFilter(s,e.onFilterSet,e.initialQueryFields)},s.name))}),i&&e.onClearFilters&&o.jsx(h.DrawerFooter,{children:o.jsx(h.Button,{appearance:"secondary",onClick:()=>{var s;(s=e.onClearFilters)==null||s.call(e),n(!1)},children:"Clear all filters"})})]})]})}const na=h.makeStyles({root:{position:"relative"},loadingWrapper:{position:"absolute",width:"100%",height:"min-content",paddingTop:h.tokens.spacingVerticalM,paddingBottom:h.tokens.spacingHorizontalM,backgroundColor:h.tokens.colorNeutralBackgroundAlpha,zIndex:9999},errorWrapper:{marginBottom:h.tokens.spacingVerticalM},pagination:{display:"flex",width:"100%",justifyContent:"center",gap:h.tokens.spacingHorizontalL,marginTop:h.tokens.spacingVerticalM}});function Ve(e){var z;const t=na(),n=g.useMemo(()=>{const P=new Jr;if(e.customRenderers)for(const F of e.customRenderers)P.registerRenderer(F);return P},[e.customRenderers]),r=g.useMemo(()=>e.fieldsToRender.map(P=>h.createTableColumn({columnId:P.name,renderHeaderCell:()=>o.jsx(h.Text,{weight:"semibold",children:P.label||P.name}),renderCell:F=>n.renderField(P,F[P.name],F),compare:(F,T)=>F[P.name]-T[P.name]})),[e.fieldsToRender]),[i,s]=g.useState({sortColumn:(z=e.fieldsToRender.find(P=>!P.disableSorting))==null?void 0:z.name,sortDirection:"ascending"}),l=(P,F)=>{s(F)},[c,f]=g.useState([]),[y,d]=g.useState(!0),[b,m]=g.useState(null),[S,v]=g.useState([]),[w,E]=g.useState(new Set),O=g.useMemo(()=>e.dataService.isNextPageAvailable(),[e.dataService,c]),x=g.useMemo(()=>e.dataService.isPreviousPageAvailable(),[e.dataService,c]),_=g.useCallback((P,F)=>{if(e.getRowId)return e.getRowId(P);const T=P;return T.id?String(T.id):T.Id?String(T.Id):T.ID?String(T.ID):F},[e.getRowId]),L=g.useMemo(()=>{const P=new Map;return c.forEach((F,T)=>{P.set(_(F,T),F)}),P},[c,_]),A=(P,F)=>{if(E(F.selectedItems),e.onSelectionChange){const T=[];F.selectedItems.forEach(te=>{const V=L.get(te);V&&T.push(V)}),e.onSelectionChange(T)}},M=g.useMemo(()=>e.fieldsToRender.filter(P=>!P.disableFiltering),[e.fieldsToRender]),X=g.useCallback(()=>{v([])},[]);return g.useEffect(()=>{var F;d(!0),m(null),e.dataService.setFields(e.fieldsToRender);const P=[];e.systemFilter&&e.systemFilter.length>0&&P.push(...e.systemFilter),S&&S.length>0&&P.push(...S),e.dataService.getData(P,(F=i==null?void 0:i.sortColumn)==null?void 0:F.toString(),(i==null?void 0:i.sortDirection)=="ascending"?"ASC":"DESC").then(T=>{f(T),e.onDataFetched&&e.onDataFetched([],e.dataService.getTotalRows())}).catch(T=>{m((T==null?void 0:T.message)||"An error occurred while loading data"),f([])}).finally(()=>d(!1))},[e.systemFilter,i,S]),o.jsxs("div",{className:t.root,children:[y&&o.jsx("div",{className:t.loadingWrapper,children:o.jsx(h.Spinner,{size:"huge"})}),b&&o.jsx("div",{className:t.errorWrapper,children:o.jsx(h.MessageBar,{intent:"error",children:o.jsxs(h.MessageBarBody,{children:[o.jsx(h.MessageBarTitle,{children:"Error"}),b]})})}),e.renderFilter&&o.jsx(ta,{filterFields:M,initialQueryFields:S,onFilterSet:(P,F)=>{const T=[...S.filter(te=>te.name!==P.name)];F&&F.length>0&&T.push(...F),v(T)},onClearFilters:X,renderFilter:e.renderFilter}),o.jsxs(h.DataGrid,{items:c,columns:r,sortable:!0,sortState:i,onSortChange:l,selectionMode:e.selectionMode,selectedItems:w,onSelectionChange:A,getRowId:P=>_(P,c.indexOf(P)),children:[o.jsx(h.DataGridHeader,{children:o.jsx(h.DataGridRow,{selectionCell:e.selectionMode==="multiselect"?{checkboxIndicator:{"aria-label":"Select all rows"}}:void 0,children:({renderHeaderCell:P})=>o.jsx(h.DataGridHeaderCell,{children:P()})})}),o.jsx(h.DataGridBody,{children:({item:P,rowId:F})=>o.jsx(h.DataGridRow,{selectionCell:e.selectionMode?{checkboxIndicator:{"aria-label":"Select row"},radioIndicator:{"aria-label":"Select row"}}:void 0,children:({renderCell:T})=>o.jsx(h.DataGridCell,{children:T(P)})},F)})]}),o.jsxs("div",{className:t.pagination,children:[o.jsx(h.Button,{icon:o.jsx(xr,{}),disabled:!x,onClick:()=>{e.dataService.getPreviousPage().then(P=>f(P)).finally(()=>d(!1))},"aria-label":"Previous page","data-testid":"datagrid-prev-page"}),o.jsx(h.Button,{icon:o.jsx(Rr,{}),disabled:!O,onClick:()=>{e.dataService.getNextPage().then(P=>f(P)).finally(()=>d(!1))},"aria-label":"Next page","data-testid":"datagrid-next-page"})]})]})}class ra{constructor(t){this.graphClient=t}isRendererApplicable(t){return t.type==="User"}renderField(t,n,r){if(!n||typeof n!="object")return o.jsx("span",{children:"-"});const i=n,s=i.azureactivedirectoryobjectid;if(!s){const l=i.fullname;return o.jsx("span",{children:l?String(l):"-"})}return o.jsx(ye,{graphClient:this.graphClient,id:String(s)})}}class aa{isRendererApplicable(t){return t.type==="Lookup"}renderField(t,n,r){if(!n||typeof n!="object")return o.jsx("span",{children:"-"});const i=n;if(t.expandFields&&t.expandFields[0]){const s=i[t.expandFields[0]];return o.jsx("span",{children:s!=null?String(s):"-"})}return o.jsx("span",{children:JSON.stringify(n)})}}function ia(e){const t=async n=>{const r=[];return e.additionalFilters&&r.push(...e.additionalFilters),n&&r.push({name:e.column.type==="Lookup"?`${e.column.name}/${e.column.expandFields[0]}`:e.column.name,type:e.column.type,value:n,comparer:"Contains"}),e.getFieldSuggestions(e.column,r)};return o.jsx(K,{additionalKey:`${e.table}-${e.column.name}`,...e,onDataRequested:t})}class sa{isRendererApplicable(t){return t.type==="Choice"}renderField(t,n,r){return n?o.jsx("span",{children:r[t.name+"@OData.Community.Display.V1.FormattedValue"]}):o.jsx("span",{children:"-"})}}function oa(e){const{dataverseClient:t,dataverseResource:n}=tt(),{graphClient:r}=q(),i=g.useMemo(()=>{const s=[new ra(r)];return e.customRenderers&&s.push(...e.customRenderers),s},[r,e.customRenderers]);return o.jsx(Bt,{...e,dataverseClient:t,dataverseEnv:n,customRenderers:i})}function Bt(e){const t=g.useMemo(()=>{let r=[new aa,new Me,new sa];return e.customRenderers&&r.push(...e.customRenderers),r},[e.customRenderers]),n=g.useMemo(()=>new $t(e.dataverseClient,e.dataverseEnv,e.tableName),[e.dataverseEnv,e.tableName]);return o.jsx(Ve,{dataService:n,fieldsToRender:e.fieldsToRender,customRenderers:t,selectionMode:e.selectionMode,systemFilter:e.systemFilter,getRowId:e.getRowId,onSelectionChange:e.onSelectionChange,onDataFetched:e.onDataFetched,renderFilter:(r,i,s)=>e.filterComponents&&e.filterComponents.find(l=>l.fieldName===r.name)?e.filterComponents.find(l=>l.fieldName===r.name).filterComponent(r,i,s):o.jsx(ia,{additionalFilters:s,onEntitySelected:l=>{if(l){const c=l.map(f=>({name:r.type=="Lookup"||r.type=="User"?`${r.name}/${r.relatedId}`:r.name,type:r.type,label:r.label,value:f.id,comparer:"Eq"}));i({...r,name:r.type=="Lookup"||r.type=="User"?`${r.name}/${r.relatedId}`:r.name},c)}},table:e.tableName,column:r,getFieldSuggestions:(l,c)=>n.getFieldSuggestions(l,e.systemFilter)})})}class Ut{constructor(t,n,r,i=25){this.spHttpClient=t,this.siteUrl=n,this.listId=r,this.rowLimit=i,this.getFieldSuggestions=async(s,l)=>{let c=`${this.siteUrl}/_api/web/lists('${this.listId}')/RenderListFilterData?FieldInternalName='${s.name}'`;if(l&&l.length>0){let v="";for(let w=0;w<l.length;w++){const E=l[w],O=w+1;v+=`&FilterField${O}=${E.name}&FilterValue${O}=${encodeURIComponent(E.value)}&FilterType${O}=${E.type||"Text"}`}c+=v}const f=await this.spHttpClient.post(c,{headers:{accept:"application/json"}}),y=new DOMParser,d=await f.text(),m=y.parseFromString(d==null?void 0:d.replace("SELECTED",""),"application/xml").getElementsByTagName("OPTION"),S=[];for(let v=0;v<m.length;v++){const w=m.item(v);S.push({id:w.getAttribute("Value"),displayName:w.innerHTML})}return S},this.dataProvider=new k.SPListItemCamlPagedDataProvider(t,n,r),this.dataProvider.pageSize=i}setFields(t){this.dataProvider.selectedFields=t.map(n=>n.name)}getTotalRows(){return this.dataProvider.allItemsCount}async getData(t,n,r){const i=new k.CamlQueryBuilder;return t&&t.length>0&&(t.forEach(s=>i.withFieldQuery(s)),this.dataProvider.setQuery(i.build())),n&&this.dataProvider.setOrder(n,r),this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}}function la(e){const t=async n=>{const r=[];return e.additionalFilters&&r.push(...e.additionalFilters),n&&r.push({name:e.column.name,type:e.column.type,value:n,comparer:"Contains"}),e.getFieldSuggestions(e.column,r)};return o.jsx(K,{additionalKey:`${e.listId}-${e.column.name}-${Fr(e.additionalFilters?e.additionalFilters.map(n=>n.name+n.value).join(";"):"")}`,...e,onDataRequested:t})}class ca{isRendererApplicable(t){return t.type==="User"}renderField(t,n,r){if(!n||!Array.isArray(n)||n.length===0)return o.jsx("span",{children:"-"});const i=n;return o.jsx("span",{children:i.map((s,l)=>o.jsxs("span",{children:[s.title||s.email||"Unknown",l<i.length-1?", ":""]},l))})}}function ua(e){const{spClient:t,siteUrl:n}=je();return o.jsx(Gt,{...e,siteUrl:n,spClient:t})}function Gt(e){const t=g.useMemo(()=>{let r=[];return r.push(new ca,new Me),e.customRenderers&&r.push(...e.customRenderers),r},[e.customRenderers]),n=g.useMemo(()=>new Ut(e.spClient,e.siteUrl,e.listId,e.rowLimit),[e.spClient,e.listId,e.siteUrl]);return o.jsx(Ve,{dataService:n,fieldsToRender:e.fieldsToRender,customRenderers:t,selectionMode:e.selectionMode,rowLimit:e.rowLimit,getRowId:e.getRowId,onSelectionChange:e.onSelectionChange,renderFilter:(r,i,s)=>o.jsx(la,{additionalFilters:s,onEntitySelected:l=>{if(l){const c=l.map(f=>({name:r.name,type:r.type,label:r.label,value:f.id,comparer:"Eq"}));i({...r,name:r.name},c)}},listId:e.listId,column:r,getFieldSuggestions:n.getFieldSuggestions})})}class da{constructor(t,n){this.graphClient=t,this.entityEndpoint=n,this.dataProvider=new k.ODataPagedDataProvider(t,n,!0)}getTotalRows(){return this.dataProvider.allItemsCount}mapToExpand(t){return t.expandFields?`${t.name}($select=${t.expandFields.join(",")})`:t.name}setFields(t){this.dataProvider.selectQuery=t.filter(n=>n.type!=="Lookup").map(n=>n.name).join(","),this.dataProvider.expandQuery=t.filter(n=>n.type==="Lookup"||n.type==="User").map(n=>this.mapToExpand(n)).join(",")}getData(t,n,r){if(t){const i=new mn.ODataQueryBuilder;for(const l of t)i.withFieldQuery(l);const s=i.build();this.dataProvider.setQuery(s)}return n&&this.dataProvider.setOrder(n,r||"ASC"),this.dataProvider.getData()}getNextPage(){return this.dataProvider.getNextPage()}isNextPageAvailable(){return this.dataProvider.isNextPageAvailable()}getPreviousPage(){return this.dataProvider.getPreviousPage()}isPreviousPageAvailable(){return this.dataProvider.isPreviousPageAvailable()}async getFieldSuggestions(t,n){return[]}}C.AbstractGraphEntityPicker=K,C.AuthenticationContext=we,C.AuthenticationContextProvider=Sn,C.ChannelPicker=Qr,C.ChannelPickerStandalone=Ot,C.DataverseContext=Ie,C.DataverseContextProvider=xn,C.DataverseTableDataGridService=$t,C.DataverseTableGrid=oa,C.DataverseTableGridStandalone=Bt,C.DrivePicker=zr,C.DrivePickerStandalone=_t,C.GenericDataGrid=Ve,C.GraphContext=Ee,C.GraphContextProvider=bn,C.GraphEntityDataGridService=da,C.GraphGroupMembershipTrimmedComponent=Zr,C.GraphGroupMembershipTrimmedComponentStandalone=Lt,C.GraphPersona=Wr,C.GraphPersonaStandalone=ye,C.M365CopilotSearch=$r,C.M365Search=Ar,C.PeoplePicker=Yr,C.PeoplePickerStandalone=Ft,C.PersonaService=qe,C.SPContext=De,C.SPContextProvider=Cn,C.SPListDataGrid=ua,C.SPListDataGridService=Ut,C.SPListDataGridStandalone=Gt,C.SPPermissionTrimmedComponent=Xr,C.SPPermissionTrimmedComponentStandalone=At,C.SearchInputWithSuggestions=Gr,C.SitePicker=Kr,C.SitePickerStandalone=Nt,C.TeamPicker=Hr,C.TeamPickerStandalone=kt,C.defaultSelectFields=$e,C.useAuthentication=he,C.useDataverse=tt,C.useGraph=q,C.useSP=je,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});