@spteck/react-controls-v2 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aiAssistant/AIAssistant.d.ts.map +1 -1
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts +11 -2
- package/dist/components/aiAssistant/IAIAssistantProps.d.ts.map +1 -1
- package/dist/components/appDashboard/IAppDashboardProps.d.ts.map +1 -1
- package/dist/components/typographyControl/ITypographyControlProps.d.ts +3 -0
- package/dist/components/typographyControl/ITypographyControlProps.d.ts.map +1 -1
- package/dist/components/typographyControl/TypographyControl.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/components/appDashboard/ExampleAppDashboardUsage.d.ts +0 -9
- package/dist/components/appDashboard/ExampleAppDashboardUsage.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AIAssistant.d.ts","sourceRoot":"","sources":["../../../src/components/aiAssistant/AIAssistant.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAmBxD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AIAssistant.d.ts","sourceRoot":"","sources":["../../../src/components/aiAssistant/AIAssistant.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAmBxD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoNnD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -2,6 +2,14 @@ import { IApplicationContext } from '../../abstractions';
|
|
|
2
2
|
import { IResponse } from './IResponse';
|
|
3
3
|
import { Theme } from '@fluentui/react-components';
|
|
4
4
|
|
|
5
|
+
export interface IMCPServerConfig {
|
|
6
|
+
transport: "http" | "sse" | "stdio";
|
|
7
|
+
url?: string;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
command?: string;
|
|
10
|
+
args?: string[];
|
|
11
|
+
env?: Record<string, string>;
|
|
12
|
+
}
|
|
5
13
|
export interface IAIAssistantProps {
|
|
6
14
|
instrutions?: string;
|
|
7
15
|
onResponse?: (response: string) => Promise<IResponse>;
|
|
@@ -11,8 +19,9 @@ export interface IAIAssistantProps {
|
|
|
11
19
|
* Application context - can be provided via props or UniversalProvider
|
|
12
20
|
*/
|
|
13
21
|
context?: IApplicationContext;
|
|
14
|
-
openAIConfig
|
|
15
|
-
endpoint
|
|
22
|
+
openAIConfig: {
|
|
23
|
+
endpoint?: string;
|
|
24
|
+
mcpServers?: Record<string, IMCPServerConfig>;
|
|
16
25
|
};
|
|
17
26
|
title?: string | JSX.Element;
|
|
18
27
|
theme?: Theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAIAssistantProps.d.ts","sourceRoot":"","sources":["../../../src/components/aiAssistant/IAIAssistantProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"IAIAssistantProps.d.ts","sourceRoot":"","sources":["../../../src/components/aiAssistant/IAIAssistantProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGnD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAEpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAM,OAAO,CAAC,SAAS,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,YAAY,EAAE;QACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;KAC/C,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAppDashboardProps.d.ts","sourceRoot":"","sources":["../../../src/components/appDashboard/IAppDashboardProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"IAppDashboardProps.d.ts","sourceRoot":"","sources":["../../../src/components/appDashboard/IAppDashboardProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE,MAAM,CAAE;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITypographyControlProps.d.ts","sourceRoot":"","sources":["../../../src/components/typographyControl/ITypographyControlProps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE1D;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,EAAE,CAAC,EAAE,GAAG,GACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,GAAG,GACH,GAAG,GACH,KAAK,GACL,MAAM,GACN,QAAQ,CAAC;IAET;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAEzD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5D,aAAa,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC/D,WAAW,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7D,YAAY,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE9D;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3D,YAAY,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9D,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5D,WAAW,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE7D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"ITypographyControlProps.d.ts","sourceRoot":"","sources":["../../../src/components/typographyControl/ITypographyControlProps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE1D;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,EAAE,CAAC,EAAE,GAAG,GACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,GAAG,GACH,GAAG,GACH,KAAK,GACL,MAAM,GACN,QAAQ,CAAC;IAET;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAEzD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5D,aAAa,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC/D,WAAW,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7D,YAAY,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE9D;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3D,YAAY,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9D,UAAU,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5D,WAAW,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;IAE7D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypographyControl.d.ts","sourceRoot":"","sources":["../../../src/components/typographyControl/TypographyControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAoCpE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"TypographyControl.d.ts","sourceRoot":"","sources":["../../../src/components/typographyControl/TypographyControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAoCpE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA4E/D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -48,4 +48,5 @@ export * from './components/userCard';
|
|
|
48
48
|
export * from './components/StackedUsers';
|
|
49
49
|
export * from './components/ListItemActivityMessage';
|
|
50
50
|
export * from './components/appDashboard';
|
|
51
|
+
export * from './models/IAppCardContainer';
|
|
51
52
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,cAAc,0BAA0B,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,iCAAiC,CAAC;AAGhD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC;AAGxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAIxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,cAAc,0BAA0B,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,iCAAiC,CAAC;AAGhD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sCAAsC,CAAC;AAGrD,cAAc,2BAA2B,CAAC;AAG1C,cAAc,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -133,7 +133,7 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
133
133
|
`,bottomText:g.css`
|
|
134
134
|
padding-left: 8px;
|
|
135
135
|
padding-right: 8px;
|
|
136
|
-
`,zoomContainer:g.css({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",width:"100%",boxSizing:"border-box",padding:"8px 0px"})},[s,l]=L.useState(n),[u,d]=L.useState(null),[h,m]=L.useState(!1);L.useEffect(()=>{l(n)},[n]);const f=(e,n)=>{const r={spanCols:n+1,spanRows:e+1};l(r),null==t||t(r),m(!1)},y=(e,t)=>{d({spanCols:t+1,spanRows:e+1})},b=L.useMemo(()=>30*r+4*(r-1)+32,[r]);return c.jsxs(p.Menu,{open:h,onOpenChange:(e,t)=>{m(t.open),d(null)},children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Tooltip,{content:"Configure",relationship:"label",children:c.jsx(p.MenuButton,{icon:c.jsx(i,{}),size:"small",appearance:"transparent"})})}),c.jsxs(p.MenuPopover,{style:{width:`${b}px`,minWidth:"120px",padding:8},children:[c.jsx("div",{className:a.zoomContainer,children:c.jsx(bt,{label:`Span (${s.spanCols} × ${s.spanRows})`})}),c.jsx("div",{className:a.gridContainer,style:{gridTemplateColumns:`repeat(${r}, 30px)`,gridTemplateRows:`repeat(${o}, 30px)`},onMouseLeave:()=>{d(null)},children:(()=>{const e=[];for(let t=0;t<o;t++)for(let n=0;n<r;n++){const r=t<s.spanRows&&n<s.spanCols,o=u&&t<u.spanRows&&n<u.spanCols;e.push(c.jsx("div",{className:`${a.cell} ${o?a.hoveredCell:""} ${r?a.selectedCell:""}`,onMouseEnter:()=>y(t,n),onClick:()=>f(t,n)},`${t}-${n}`))}return e})()}),c.jsx(p.Caption1,{className:a.bottomText,children:"Click to set span"})]})]})};exports.ErrorType=l.ErrorType,exports.LogLevel=l.LogLevel,exports.AIAssistant=e=>{const{instrutions:t,timezone:n,locale:r,onResponse:o,openAIConfig:i,theme:a,placeholder:s,context:l}=e,[d,h]=L.useReducer(uc,{messages:[],inputText:"",isLoading:!0,error:void 0,isRunning:!1}),{messages:m,inputText:f,isLoading:y,error:v,isRunning:b}=d,C=L.useRef([]),w={container:g.css({display:"flex",flexDirection:"column",padding:"10px",width:"100%",height:"600px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.1)",overflowY:"auto",overflowX:"hidden",position:"relative",zIndex:1e3}),chatList:g.css({display:"flex",flexDirection:"column",gap:"10px",padding:"10px",overflowY:"auto",overflowX:"hidden",height:"100%",width:"100%","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),chatAIAssistantRoot:g.css({padding:"10px",display:"flex",flexDirection:"column",position:"relative",height:"calc(100% - 20px)"}),inputContainer:g.css({display:"flex",flexDirection:"row",flex:1,marginTop:"10px",gap:"10px",alignItems:"center"}),input:g.css({width:"100%",fontSize:"14px"})},S=L.useRef(null),{sendRequest:k,cancelRequest:P,error:E}=function(){const[e,t]=u.useState(""),[n,r]=u.useState(!1),[o,i]=u.useState(null),a=u.useRef(null);return{data:e,isLoading:n,error:o,sendRequest:u.useCallback(async(e,n,o,s)=>{var l;t(""),i(null),r(!0);const c=new AbortController;a.current=c;try{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:c.signal,...o});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const i=null==(l=r.body)?void 0:l.getReader();if(!i)throw new Error("No response body");const a=new TextDecoder("utf-8");let u=!1,d="";for(;!u;){const{value:e,done:n}=await i.read();if(u=n,e){const n=a.decode(e,{stream:!0});d+=n,t(d),s&&s(n)}}}catch(u){throw u instanceof Error&&"AbortError"===u.name?(i("Request aborted"),u):(i(u instanceof Error?u.message:"Error occurred"),u)}finally{r(!1)}},[]),cancelRequest:u.useCallback(()=>{a.current&&a.current.abort()},[])}}(),A=L.useCallback(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight-S.current.clientHeight)},[]);L.useEffect(()=>{var e,t;const r={message:"Welcome to AI Assistant! How can I help you today?",senderName:"Assistant",timeStamp:dc(n,(null==(t=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:t.currentUICultureName)||"en-US"),status:"received"};h({type:"INIT",welcomeMessage:r})},[]);const I=L.useCallback(async()=>{var e,a,s,u;if(!f.trim())return;const d={message:f,senderName:"User",timeStamp:dc(n,(null==(a=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:a.currentUICultureName)||"en-US"),status:"received"},p=f;h({type:"ADD_USER_MESSAGE",message:d}),h({type:"CLEAR_INPUT"}),h({type:"SET_IS_RUNNING"});const m={message:c.jsx(cc,{}),senderName:"Assistant",timeStamp:dc(n,(null==(u=null==(s=null==l?void 0:l.pageContext)?void 0:s.cultureInfo)?void 0:u.currentUICultureName)||"en-US"),status:"sending"};h({type:"ADD_ASSISTANT_MESSAGE",message:m}),A();let g="";const y=(null==i?void 0:i.endpoint)||"http://localhost:7071/api/EventAssistant",v={instructions:t,input:p,timezone:n,locale:r,history:C.current};try{await k(y,v,void 0,e=>{g+=e,null==o||o(g).then(e=>{const{message:t,status:n}=e;h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:t||g,status:n||"received"}}),h({type:"SET_IS_RUNNING"})})})}catch(b){console.error("Error during streaming:",b),h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:"Error occurred while processing your request.",status:"failed"}}),h({type:"SET_IS_RUNNING"})}C.current.push(p),C.current.push(g),A()},[f,t,r,o,i,n,k,E]),_=L.useCallback(e=>{h({type:"SET_INPUT",inputText:e})},[]);return y?c.jsx(p.Spinner,{size:"medium"}):v?c.jsx(En,{message:"There was an error processing your request.",messageType:U.INFO}):c.jsxs("div",{id:"aiAssistant",className:w.chatAIAssistantRoot,children:[c.jsx(V.Chat,{className:w.chatList,ref:S,children:m.map((e,t)=>"User"===e.senderName?c.jsx(V.ChatMyMessage,{status:e.status,author:e.senderName,timestamp:e.timeStamp,children:e.message},t):c.jsx(V.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:c.jsx(x.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:p.tokens.colorBrandBackground}}),author:e.senderName,timestamp:e.timeStamp,children:e.message},t))}),c.jsx("div",{className:w.inputContainer,children:c.jsx(lc,{context:l,value:f,onChange:_,placeholder:s,onSend:I,onAbort:P,theme:a,isRunning:b})})]})},exports.AISearchControl=({systemPromptTemplate:e,azureOpenAIConfig:t,placeholder:n="Ask AI to generate search query... (e.g., 'Find engineers in the Seattle office')",onSearchQueryGenerated:r,onSearchStart:o,onSearchError:i,disabled:a=!1,className:s,width:l})=>{const{error:c}=q(),{generateText:d,isConfigured:h}={generateText:async(e,t)=>(console.warn("useAzureOpenAI not implemented - add your Azure OpenAI implementation",{prompt:e,userInput:t}),"Azure OpenAI not configured - please provide configuration"),isConfigured:!1},[m,f]=u.useState(!1),[g,y]=u.useState(""),v=u.useRef(null),{searchBoxStyles:b,iconWrapperStyles:x}={searchBoxStyles:Xl`
|
|
136
|
+
`,zoomContainer:g.css({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",width:"100%",boxSizing:"border-box",padding:"8px 0px"})},[s,l]=L.useState(n),[u,d]=L.useState(null),[h,m]=L.useState(!1);L.useEffect(()=>{l(n)},[n]);const f=(e,n)=>{const r={spanCols:n+1,spanRows:e+1};l(r),null==t||t(r),m(!1)},y=(e,t)=>{d({spanCols:t+1,spanRows:e+1})},b=L.useMemo(()=>30*r+4*(r-1)+32,[r]);return c.jsxs(p.Menu,{open:h,onOpenChange:(e,t)=>{m(t.open),d(null)},children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Tooltip,{content:"Configure",relationship:"label",children:c.jsx(p.MenuButton,{icon:c.jsx(i,{}),size:"small",appearance:"transparent"})})}),c.jsxs(p.MenuPopover,{style:{width:`${b}px`,minWidth:"120px",padding:8},children:[c.jsx("div",{className:a.zoomContainer,children:c.jsx(bt,{label:`Span (${s.spanCols} × ${s.spanRows})`})}),c.jsx("div",{className:a.gridContainer,style:{gridTemplateColumns:`repeat(${r}, 30px)`,gridTemplateRows:`repeat(${o}, 30px)`},onMouseLeave:()=>{d(null)},children:(()=>{const e=[];for(let t=0;t<o;t++)for(let n=0;n<r;n++){const r=t<s.spanRows&&n<s.spanCols,o=u&&t<u.spanRows&&n<u.spanCols;e.push(c.jsx("div",{className:`${a.cell} ${o?a.hoveredCell:""} ${r?a.selectedCell:""}`,onMouseEnter:()=>y(t,n),onClick:()=>f(t,n)},`${t}-${n}`))}return e})()}),c.jsx(p.Caption1,{className:a.bottomText,children:"Click to set span"})]})]})};exports.ErrorType=l.ErrorType,exports.LogLevel=l.LogLevel,exports.AIAssistant=e=>{const{instrutions:t,timezone:n,locale:r,onResponse:o,openAIConfig:i,theme:a,placeholder:s,context:l}=e,[d,h]=L.useReducer(uc,{messages:[],inputText:"",isLoading:!0,error:void 0,isRunning:!1}),{messages:m,inputText:f,isLoading:y,error:v,isRunning:b}=d,C=L.useRef([]),w={container:g.css({display:"flex",flexDirection:"column",padding:"10px",width:"100%",height:"600px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.1)",overflowY:"auto",overflowX:"hidden",position:"relative",zIndex:1e3}),chatList:g.css({display:"flex",flexDirection:"column",gap:"10px",padding:"10px",overflowY:"auto",overflowX:"hidden",height:"100%",width:"100%","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),chatAIAssistantRoot:g.css({padding:"10px",display:"flex",flexDirection:"column",position:"relative",height:"calc(100% - 20px)"}),inputContainer:g.css({display:"flex",flexDirection:"row",flex:1,marginTop:"10px",gap:"10px",alignItems:"center"}),input:g.css({width:"100%",fontSize:"14px"})},S=L.useRef(null),{sendRequest:k,cancelRequest:P,error:E}=function(){const[e,t]=u.useState(""),[n,r]=u.useState(!1),[o,i]=u.useState(null),a=u.useRef(null);return{data:e,isLoading:n,error:o,sendRequest:u.useCallback(async(e,n,o,s)=>{var l;t(""),i(null),r(!0);const c=new AbortController;a.current=c;try{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:c.signal,...o});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const i=null==(l=r.body)?void 0:l.getReader();if(!i)throw new Error("No response body");const a=new TextDecoder("utf-8");let u=!1,d="";for(;!u;){const{value:e,done:n}=await i.read();if(u=n,e){const n=a.decode(e,{stream:!0});d+=n,t(d),s&&s(n)}}}catch(u){throw u instanceof Error&&"AbortError"===u.name?(i("Request aborted"),u):(i(u instanceof Error?u.message:"Error occurred"),u)}finally{r(!1)}},[]),cancelRequest:u.useCallback(()=>{a.current&&a.current.abort()},[])}}(),A=L.useCallback(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight-S.current.clientHeight)},[]);L.useEffect(()=>{var e,t;const r={message:"Welcome to AI Assistant! How can I help you today?",senderName:"Assistant",timeStamp:dc(n,(null==(t=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:t.currentUICultureName)||"en-US"),status:"received"};h({type:"INIT",welcomeMessage:r})},[]);const I=L.useCallback(async()=>{var e,a,s,u;if(!f.trim())return;const d={message:f,senderName:"User",timeStamp:dc(n,(null==(a=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:a.currentUICultureName)||"en-US"),status:"received"},p=f;h({type:"ADD_USER_MESSAGE",message:d}),h({type:"CLEAR_INPUT"}),h({type:"SET_IS_RUNNING"});const m={message:c.jsx(cc,{}),senderName:"Assistant",timeStamp:dc(n,(null==(u=null==(s=null==l?void 0:l.pageContext)?void 0:s.cultureInfo)?void 0:u.currentUICultureName)||"en-US"),status:"sending"};h({type:"ADD_ASSISTANT_MESSAGE",message:m}),A();let g="";const y=(null==i?void 0:i.endpoint)||"http://localhost:7071/api/EventAssistant",v={instructions:t,input:p,timezone:n,locale:r,history:C.current,mcpServers:null==i?void 0:i.mcpServers};try{await k(y,v,void 0,e=>{g+=e,null==o||o(g).then(e=>{const{message:t,status:n}=e;h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:t||g,status:n||"received"}}),h({type:"SET_IS_RUNNING"})})})}catch(b){console.error("Error during streaming:",b),h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:"Error occurred while processing your request.",status:"failed"}}),h({type:"SET_IS_RUNNING"})}C.current.push(p),C.current.push(g),A()},[f,t,r,o,i,n,k,E]),_=L.useCallback(e=>{h({type:"SET_INPUT",inputText:e})},[]);return y?c.jsx(p.Spinner,{size:"medium"}):v?c.jsx(En,{message:"There was an error processing your request.",messageType:U.INFO}):c.jsxs("div",{id:"aiAssistant",className:w.chatAIAssistantRoot,children:[c.jsx(V.Chat,{className:w.chatList,ref:S,children:m.map((e,t)=>"User"===e.senderName?c.jsx(V.ChatMyMessage,{status:e.status,author:e.senderName,timestamp:e.timeStamp,children:e.message},t):c.jsx(V.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:c.jsx(x.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:p.tokens.colorBrandBackground}}),author:e.senderName,timestamp:e.timeStamp,children:e.message},t))}),c.jsx("div",{className:w.inputContainer,children:c.jsx(lc,{context:l,value:f,onChange:_,placeholder:s,onSend:I,onAbort:P,theme:a,isRunning:b})})]})},exports.AISearchControl=({systemPromptTemplate:e,azureOpenAIConfig:t,placeholder:n="Ask AI to generate search query... (e.g., 'Find engineers in the Seattle office')",onSearchQueryGenerated:r,onSearchStart:o,onSearchError:i,disabled:a=!1,className:s,width:l})=>{const{error:c}=q(),{generateText:d,isConfigured:h}={generateText:async(e,t)=>(console.warn("useAzureOpenAI not implemented - add your Azure OpenAI implementation",{prompt:e,userInput:t}),"Azure OpenAI not configured - please provide configuration"),isConfigured:!1},[m,f]=u.useState(!1),[g,y]=u.useState(""),v=u.useRef(null),{searchBoxStyles:b,iconWrapperStyles:x}={searchBoxStyles:Xl`
|
|
137
137
|
border: 1px solid ${p.tokens.colorNeutralStroke2};
|
|
138
138
|
border-radius: 50px; /* Fully circular/pill shape */
|
|
139
139
|
background-color: ${p.tokens.colorNeutralBackground1};
|
|
@@ -197,5 +197,5 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
197
197
|
align-items: center;
|
|
198
198
|
padding: 2px;
|
|
199
199
|
margin-right: 8px;
|
|
200
|
-
`},C=u.useCallback(async e=>{if(e.trim()){return void(null==i||i("Azure OpenAI is not properly configured. Please check your configuration.",e.trim()))}},[d,e,r,o,i,c,h]),w=u.useCallback((e,t)=>{y(t.value)},[]),S=u.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==r||r("","")},[r]),k=u.useCallback(e=>{var t;"Enter"===e.key&&!m&&g.trim()?C(g).catch(e=>{console.error("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==r||r("",""))},[C,m,g,r]);return Jl(p.SearchBox,{ref:v,css:b,className:s,style:{width:l},placeholder:n,value:g,onChange:w,onKeyDown:k,disabled:a||m,contentBefore:Jl("span",{css:x,children:Jl(tc,{size:20})}),dismiss:{onClick:S}})},exports.AISearchIcon=tc,exports.AISearchIconExample=()=>{const e=nc();return c.jsxs("div",{className:e.container,children:[c.jsx("h2",{children:"AI Search Icon Examples"}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Standard AI Search Icon"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Small (16px):"}),c.jsx(tc,{size:16})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Medium (20px):"}),c.jsx(tc,{size:20})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Large (24px):"}),c.jsx(tc,{size:24})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Extra Large (32px):"}),c.jsx(tc,{size:32})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Custom Colors:"}),c.jsx(tc,{size:24,color:p.tokens.colorPaletteBlueForeground2,aiIndicatorColor:p.tokens.colorPaletteGreenForeground2})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage in Buttons"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Primary Button:"}),c.jsx(p.Button,{appearance:"primary",icon:c.jsx(tc,{size:16}),children:"AI Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Secondary Button:"}),c.jsx(p.Button,{appearance:"secondary",icon:c.jsx(tc,{size:16}),children:"Smart Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Icon Only Button:"}),c.jsx(p.Button,{appearance:"subtle",icon:c.jsx(tc,{size:20}),title:"AI Search"})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage Example Code"}),c.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=e=>{const t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),o=u.useRef(null);u.useEffect(()=>{A.AdaptiveCard.onProcessMarkdown||(A.AdaptiveCard.onProcessMarkdown=(e,t)=>{t.outputHtml=(new W.default).render(e),t.didProcess=!0;try{t.outputHtml=(new W.default).render(e),t.didProcess=!0}catch(n){console.error("AdaptiveCardHost: Error parsing Markdown",n),t.didProcess=!1}})},[]),u.useEffect(()=>{n.current=null,n.current=new A.AdaptiveCard,r.current=new A.SerializationContext},[e]);const i=u.useCallback(t=>{if(e.onInvokeAction){let n={type:"",title:""};const r=t.getJsonTypeName();switch(r){case A.OpenUrlAction.JsonTypeName:{const e=t;n={type:r,title:e.title,url:e.url}}break;case A.SubmitAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data}}break;case A.ExecuteAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:"Unknown Action"}}e.onInvokeAction(n)}},[e.onInvokeAction]);return u.useEffect(()=>{let t,r=e.themeType;o.current=null,r||(r=jn.SharePoint),t=e.theme?e.theme:ps(r);const i=Vn(r,t),a=i.hostConfig;console.log("hostconfig:",a),o.current=t,n.current&&(n.current.hostConfig=i.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(a.hostCapabilities)},[e]),u.useEffect(()=>{n.current&&(n.current.onExecuteAction=i)},[e,i]),u.useEffect(()=>{const t=new A.CardObjectRegistry,n=new A.CardObjectRegistry;var o;A.GlobalRegistry.populateWithDefaultElements(t),A.GlobalRegistry.populateWithDefaultActions(n),o=t,M.initializeIcons(),o.register("Input.Text",ns),o.register("Input.Number",Ya),o.register("Input.Time",ss),o.register("Input.Date",Ja),o.register("Input.Toggle",ds),o.register("Input.ChoiceSet",Fa),function(e){e.register("Action.Submit",Oa),e.register("Action.OpenUrl",Da),e.register("Action.ShowCard",Va),e.register("Action.ToggleVisibility",Ba),e.register("Action.Execute",Na)}(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);const i=r.current;i&&i.setElementRegistry(t),i&&i.setActionRegistry(n)},[e]),u.useEffect(()=>{for(var o;null==(o=null==t?void 0:t.current)?void 0:o.firstChild;)t.current.lastChild&&t.current.removeChild(t.current.lastChild);const i=t.current;if(!i)return;const a=n.current;try{const t=new D.Template(e.card),n=((e,t,n)=>{var r,o,i,a,s,l,c;let u,d;return d=n?{theme:t,aadInfo:(null==(r=null==n?void 0:n.pageContext)?void 0:r.aadInfo)?{instanceUrl:n.pageContext.aadInfo.instanceUrl||"",tenantId:n.pageContext.aadInfo.tenantId||"",userId:n.pageContext.aadInfo.userId||""}:void 0,cultureInfo:(null==(o=null==n?void 0:n.pageContext)?void 0:o.cultureInfo)?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:(null==(i=null==n?void 0:n.pageContext)?void 0:i.user)?{displayName:n.pageContext.user.displayName,email:n.pageContext.user.email,isAnonymousGuestUser:n.pageContext.user.isAnonymousGuestUser||!1,isExternalGuestUser:n.pageContext.user.isExternalGuestUser||!1,loginName:n.pageContext.user.loginName,preferUserTimeZone:n.pageContext.user.preferUserTimeZone||!1}:void 0,spListInfo:(null==(a=null==n?void 0:n.pageContext)?void 0:a.list)?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||"",title:n.pageContext.list.title}:void 0,spListItemInfo:(null==(s=null==n?void 0:n.pageContext)?void 0:s.listItem)?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:(null==(l=null==n?void 0:n.pageContext)?void 0:l.site)?{absoluteUrl:n.pageContext.site.absoluteUrl,cdnPrefix:n.pageContext.site.cdnPrefix||"",classification:n.pageContext.site.classification||"",correlationId:n.pageContext.site.correlationId||"",id:n.pageContext.site.id,isNoScriptEnabled:n.pageContext.site.isNoScriptEnabled||!1,recycleBinItemCount:n.pageContext.site.recycleBinItemCount||0,serverRelativeUrl:n.pageContext.site.serverRelativeUrl||"",serverRequestPath:n.pageContext.site.serverRequestPath||"",sitePagesEnabled:n.pageContext.site.sitePagesEnabled||!1}:void 0,spWebInfo:(null==(c=null==n?void 0:n.pageContext)?void 0:c.web)?{absoluteUrl:n.pageContext.web.absoluteUrl,id:n.pageContext.web.id,isAppWeb:n.pageContext.web.isAppWeb||!1,language:n.pageContext.web.language||0,languageName:n.pageContext.web.languageName||"",logoUrl:n.pageContext.web.logoUrl||"",serverRelativeUrl:n.pageContext.web.serverRelativeUrl||"",templateName:n.pageContext.web.templateName||"",title:n.pageContext.web.title,description:n.pageContext.web.description||""}:void 0}:{theme:t},u=e?{$root:{...null==e?void 0:e.$root,"@context":d}}:{$root:{"@context":d}},u})(e.data??{$root:{}},ps(e.themeType??jn.SharePoint),e.context),o=t.expand(n);if(a&&a.parse(o,r.current??void 0),a){const e=a.render();e&&e.outerHTML!==i.innerHTML&&e.outerHTML!==i.innerHTML&&(i.innerHTML="",i.appendChild(e))}}catch(s){e.onError&&e.onError(s)}},[e,ps]),c.jsx(p.IdPrefixProvider,{value:"adaptiveCardHost",children:c.jsx(p.FluentProvider,{theme:o.current?o.current:ps(e.themeType??jn.SharePoint),children:c.jsx("div",{ref:t,className:`${e.className?e.className:""}`,style:e.style})})})},exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:n="100%",maxSpanRows:r=4,enableDragAndDrop:o=!0,enableCache:i=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const d={dashboardContainer:g.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:p.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:g.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:g.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:g.css({color:`${p.tokens.colorNeutralForeground2}`}),cardWrapper:g.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:p.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${p.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${p.tokens.shadow8}`}})},h=`${a}-layout-settings`,m=`${a}-card-order`,{getCachedData:f,setCachedData:y}=X(),v=u.useCallback(e=>f(e),[f]),b=u.useCallback((e,t)=>y(e,t,43200),[y]),{getCachedData:x,setCachedData:C}=X(),w=u.useCallback(e=>x(e),[x]),S=u.useCallback((e,t)=>C(e,t,43200),[C]),[k,P]=u.useState([]),[E,A]=u.useState({}),I=u.useRef(null),_=u.useRef(null),T=u.useRef(null);u.useEffect(()=>{(async()=>{try{let t=e,n={};if(i){const[r,o]=await Promise.all([v(h),w(m)]);if(o&&o.length>0){const n=new Map(e.map(e=>[e.id,e])),r=o.filter(e=>n.has(e)),i=e.filter(e=>!o.includes(e.id));t=[...r.map(e=>n.get(e)),...i]}e.forEach(e=>{var t,o;const i=null==r?void 0:r[e.id];n[e.id]={spanCols:(null==i?void 0:i.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==i?void 0:i.spanRows)??(null==(o=e.defaultSpan)?void 0:o.spanRows)??1}})}else e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}});P(t),A(n)}catch(t){console.warn("Failed to load dashboard data from cache:",t),P(e);const n={};e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}}),A(n)}})()},[e,i,h,m,v,w]),u.useEffect(()=>{if(!i||0===Object.keys(E).length)return;(async()=>{try{await b(h,E)}catch(e){console.warn("Failed to save dashboard layout to cache:",e)}})()},[E,i,h,b]),u.useEffect(()=>{if(!i||0===k.length)return;(async()=>{try{const e=k.map(e=>e.id);await S(m,e)}catch(e){console.warn("Failed to save dashboard order to cache:",e)}})()},[k,i,m,S]),u.useEffect(()=>{t<=600&&A(()=>{const e={};return k.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,k]);const j=u.useMemo(()=>t>600,[t]),{minCardWidth:M,gridGap:N,containerPadding:D}=u.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),V=t-2*D,O=u.useMemo(()=>Math.floor((V+N)/(M+N)),[V,N,M]),B=Math.max(O,1),R=u.useCallback(()=>{if(null!==I.current&&null!==_.current&&I.current!==_.current){const e=[...k],[t]=e.splice(I.current,1);e.splice(_.current,0,t),P(e),s&&s(e)}I.current=null,_.current=null},[k,s]),z=u.useCallback((e,t)=>{const n={spanCols:Math.min(Math.max(t.spanCols,1),B),spanRows:Math.min(Math.max(t.spanRows,1),r)};A(t=>({...t,[e]:n})),l&&l(e,n)},[B,r,l]),L=u.useMemo(()=>k.reduce((e,t)=>{var n,r;return e[t.id]={spanCols:Math.min((null==(n=t.defaultSpan)?void 0:n.spanCols)??1,O),spanRows:(null==(r=t.defaultSpan)?void 0:r.spanRows)??1},e},{}),[k,O]),H=u.useMemo(()=>k.map((e,t)=>{var i,a,s,l;const u=!1!==e.showZoom&&j,h=e.headerAction||(u?c.jsx(Cc,{values:E[e.id]||L[e.id]||{spanCols:1,spanRows:1},maxCols:B,maxRows:r,IsOpen:!1,onChange:t=>z(e.id,t)}):void 0);return c.jsx("div",{className:d.cardWrapper,draggable:o,onDragStart:()=>o&&(I.current=t),onDragEnter:()=>o&&(_.current=t),onDragOver:e=>o&&e.preventDefault(),onDragEnd:o?R:void 0,style:{gridColumnEnd:(null==(i=E[e.id])?void 0:i.spanCols)?`span ${E[e.id].spanCols}`:`span ${(null==(a=L[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=E[e.id])?void 0:s.spanRows)?`span ${E[e.id].spanRows}`:`span ${(null==(l=L[e.id])?void 0:l.spanRows)||1}`,cursor:o?"grab":"default"},children:c.jsxs(p.Card,{className:`${d.cardBody} ${e.className||""}`,children:[c.jsx(p.CardHeader,{header:c.jsxs(yt,{gap:"0px",children:[c.jsx(p.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&c.jsx(p.Text,{className:d.cardDescription,size:200,children:e.cardDescription})]}),action:h}),c.jsx("div",{className:d.chartContainer,style:{height:n,...e.style},children:e.content})]})},e.id)}),[k,o,R,E,d.cardBody,d.cardDescription,d.chartContainer,d.cardWrapper,j,B,r,z,n,L]);return 0===k.length?c.jsx(xc,{}):c.jsx("div",{ref:T,className:d.dashboardContainer,style:{height:n},children:H})},exports.AspectRatio=({ratio:e,children:t,maxWidth:n,maxHeight:r,style:o={},...i})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:n||"none",maxHeight:r||"none",...o};return c.jsx("div",{style:a,...i,children:c.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:n,theme:r,size:o="medium",currentIndex:i=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Pt(),d=u.useRef(null),[h,m]=u.useState([]),[g,y]=u.useState([]);return u.useEffect(()=>{const t=()=>{if(!d.current)return;const t=d.current.offsetWidth;let n=0;const r=[],o=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):o.push(e)}),m(r),y(o)},n=((e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(t,100),r=new f.ResizeObserver(()=>{n()});return d.current&&r.observe(d.current),t(),()=>{r.disconnect()}},[e]),c.jsx("div",{ref:d,className:p.mergeClasses(s.container,a),style:{maxWidth:t,...n},children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[h.map((e,t)=>c.jsxs(c.Fragment,{children:[t===i?c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?u.cloneElement(e.icon,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}}):null,c.jsx(p.Text,{className:p.mergeClasses(s.breadcrumbItem,l(e,o),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):c.jsx(p.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:c.jsx(p.Text,{className:l(e,o),children:e.label})},e.label),t<h.length-1&&c.jsx(v.ChevronRightRegular,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}})]})),g.length>0&&c.jsx(Et,{items:g,theme:r})]})})},exports.ButtonMenu=kt,exports.CalendarControl=({events:e,height:t=800,theme:n,onDayChange:r,onMonthChange:o,onWeekChange:i,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:d})=>{const{styles:m}=Mt(),g=u.useRef(null),[y,v]=u.useState(null),b=u.useRef(0),[x,C]=u.useState(new Date),[w,S]=u.useState(l??Yt.Month),{getMonthCalendar:k}=Jt(Intl.DateTimeFormat().resolvedOptions().timeZone),P=L.useCallback(e=>{const t=e.getMonth(),n=h.startOfMonth(e),r=h.startOfWeek(n);return Array.from({length:42},(e,n)=>{const o=h.addDays(r,n);return{day:o.getDate(),currentMonth:o.getMonth()===t,date:o}})},[42]),E=L.useCallback(e=>{o&&o(e),C(e)},[o]),A=L.useCallback(e=>{r&&r(e),C(e)},[r]),I=L.useCallback(e=>{i&&i(e),C(e)},[i]),_=L.useCallback(e=>{a&&a(e),S(e)},[a]),T=L.useCallback(t=>{var n;const{date:r}=t;return(null==(n=k(e,x.getFullYear(),x.getMonth())[h.format(r,"yyyy-MM-dd")])?void 0:n.flatMap(e=>e))||[]},[x,e]),j=L.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){const e=g.current.querySelector(`.${m.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),b.current=e.offsetHeight)}})},[m.calendarWrapper]);u.useEffect(()=>{const e=new f.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener("resize",j),()=>{e.disconnect(),window.removeEventListener("resize",j)}},[j,w]),u.useEffect(()=>{S(l||Yt.Month)},[l]);const M=L.useCallback(()=>{switch(w){case Yt.Month:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl});case Yt.Week:return c.jsx(mn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.weekView});case Yt.Day:return c.jsx(fn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.dayView});default:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl})}},[w,e,x,y,P,T,m,s,t]);return c.jsx(p.IdPrefixProvider,{value:"calendarControl-",children:c.jsx(p.FluentProvider,{theme:n??p.webLightTheme,style:{width:"100%"},children:c.jsxs(st,{height:"100%",verticalAlign:"start",children:[c.jsx(cn,{selectedView:w,onSelectedView:_,currentDate:x,setCurrentDate:C,onWeekChange:I,onMonthChange:E,onDayChange:A,strings:null==d?void 0:d.toolbar}),c.jsx(M,{})]})})})},exports.CalendarMonth=tn,exports.Card=tt,exports.Carousel=e=>{const{className:t,items:n,title:r}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{carouselStyles:u}=ht(e),[d,h]=y(),m=mt(),{enableControls:g,embla__slide:b,embla__container:x,embla__viewport:C,embla__buttons:w}=pt(0,i),{prevBtnDisabled:S,nextBtnDisabled:k,onPrevButtonClick:P,onNextButtonClick:E}=dt(h);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),a(o.current.clientWidth),l(o.current.clientHeight),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsxs("div",{id:"-carousel",className:p.mergeClasses(t,"embla"),style:{...u(i,s)},ref:o,children:[c.jsxs("div",{className:g,children:[c.jsx(p.Subtitle2,{className:m.titleStyles,children:r}),c.jsxs("div",{className:w,children:[c.jsx(p.Button,{onClick:P,disabled:S,appearance:"subtle",icon:c.jsx(v.ChevronLeftRegular,{})}),c.jsx(p.Button,{onClick:E,disabled:k,appearance:"subtle",icon:c.jsx(v.ChevronRightRegular,{})})]})]}),c.jsx("div",{className:C,ref:d,children:c.jsx("div",{className:x,children:n.map((e,t)=>c.jsx("div",{className:b,children:e},t))})})]})})},exports.Center=ct,exports.ChatInput=oc,exports.ChatInputWithMensions=lc,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:n,placeholder:r,onSend:o,theme:i=p.webLightTheme,isRunning:a,onAbort:s})=>{const[l,d]=u.useState(n||""),[h,m]=u.useState(!1),f=u.useRef(null),[g,y]=u.useState({top:0,left:0}),[v,b]=u.useState([]),x=u.useRef({}),C=sc();u.useEffect(()=>{var e;null==(e=f.current)||e.focus(),d(n||"")},[n]);const w=u.useCallback(Ke(async t=>{const n=await(async t=>{var n,r;if(x.current[t])return x.current[t];if(!(null==e?void 0:e.graphClient))return console.warn("Graph client not available"),[];try{const o=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",i=await e.graphClient.get(o),a=(null==i?void 0:i.value)||[],s=(null==(r=null==(n=e.pageContext)?void 0:n.web)?void 0:r.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),x.current[t]=a,a}catch(o){return console.error("Error fetching users from Graph:",o),[]}})(t);n.sort((e,t)=>e.displayName.localeCompare(t.displayName)),b(n),m(!0),setTimeout(()=>{var e;null==(e=f.current)||e.focus()},0)},300),[e]),S=e=>{var n;const r=l.replace(/@(\w*)$/,`@${e} `);d(r),t&&t(r),m(!1),b([]),null==(n=f.current)||n.focus()},k=u.useCallback(({users:e})=>c.jsxs("div",{className:C.listContainer,children:[0===e.length&&c.jsx(p.Caption1,{children:"No users found"}),e.map(e=>c.jsx(p.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>S(e.mail),children:c.jsx(p.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,S]);return c.jsxs(st,{horizontal:!0,width:"100%",className:C.inputContainer,children:[c.jsx(oc,{ref:f,onSend:o,value:l,onChange:async e=>{var n;d(e),t&&t(e),null==(n=f.current)||n.focus();const r=e.lastIndexOf("@");if(-1===r||0!==r&&" "!==e[r-1])m(!1);else{const t=e.slice(r+1);await w(t);const n=f.current;if(n){const e=O(n,r),t=n.getBoundingClientRect(),o=t.top+e.top+22,i=t.left+e.left+16;y({top:o,left:i})}}},theme:i,placeholder:r,isRunning:a,onAbort:s}),c.jsxs(ft,{theme:i,anchorPoint:g,isOpen:h,onClose:()=>m(!1),excludeRefs:[f],children:[c.jsx(p.CardHeader,{header:c.jsx(p.Body1Strong,{className:C.sugestionsHeader,children:"Sugestions"})}),c.jsx(p.Divider,{}),c.jsx(k,{users:v})]})]})},exports.Container=e=>{const{className:t,children:n,style:r,alignItems:o="center",justifyContent:i="center",flexDirection:a="row",centerContent:s=!0}=e,l=L.useRef(null),[u,d]=L.useState(0),[p,h]=L.useState(0),{containerStyles:g}=ut(e),y=L.useMemo(()=>m.debounce(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;d(e),h(n)}},200),[]);return L.useEffect(()=>{const e=new f.ResizeObserver(e=>{y(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),y.cancel()}},[y]),c.jsx("div",{id:"container",className:t,style:{...g(u,p),display:"flex",justifyContent:i,alignItems:o,flexDirection:a,...r},ref:l,children:s?c.jsx(ct,{children:n}):n})},exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:n,renderControl:r,theme:o})=>{const i={container:g.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:g.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:g.css({cursor:"pointer",minWidth:107})},a=L.useCallback(e=>{n&&n(e)},[n]);return c.jsx(p.Overflow,{children:c.jsxs(p.FluentProvider,{theme:o,children:[" ",c.jsxs("div",{className:p.mergeClasses(i.container),children:[e.map(e=>{const n=e.id===t;return c.jsx(p.OverflowItem,{id:e.id,priority:n?2:1,children:r(e,n,()=>a(e.id))},e.id)}),c.jsx(In,{items:e,onSelectedItem:a,theme:o})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:n,defaultSelectedItems:r=[],enableSorting:o=!1,selectionMode:i="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:u,enableResizing:d=!1,noItemsMessage:h,isLoadingData:m,isLoadingDataMessage:f,dataGridBodyClassName:g,dataGridBodyStyles:y,refreshData:v}=e,b=e=>t.findIndex(t=>t===e),[x,C]=L.useState(new Set(r.map(e=>b(e)))),w=L.useRef(null),{styles:S}=vn();L.useEffect(()=>{r.length>0&&C(new Set(r.map(e=>b(e))))},[r,t]),L.useEffect(()=>{v&&C(new Set)},[v]);const k=n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),P=L.useCallback((e,t)=>{e.stopPropagation(),"row"===i&&a&&a([t])},[i,a]),E=L.useMemo(()=>"row"===i?S.rowSelection:"",[i,S.rowSelection]),A=L.useCallback(()=>c.jsx(p.DataGridBody,{style:y??{},className:g??"",children:({item:e,rowId:t})=>c.jsx(p.DataGridRow,{className:E,onClick:t=>P(t,e),children:({renderCell:t})=>c.jsx(p.DataGridCell,{children:t(e)})},t)}),[P,E,y,g]),I=L.useMemo(()=>t.length&&!m,[t,m]),_=L.useCallback(()=>m?c.jsx(c.Fragment,{children:f??c.jsx(yn,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:c.jsx(p.Spinner,{})})}):I?c.jsx(A,{}):m||t.length?c.jsx(c.Fragment,{}):c.jsx("div",{children:h}),[I,m,t,h]);return c.jsx("div",{ref:w,children:c.jsxs(p.DataGrid,{as:"div",items:t,onSelectionChange:(e,n)=>{const r=new Set;if(n.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),C(r),a){const e=Array.from(r).map(e=>t[e]);a(e)}},sortable:o,columns:k,selectionMode:"none"===i||"row"===i?void 0:"multiple"===i?"multiselect":"single"===i?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:u,resizableColumns:d,resizableColumnsOptions:{autoFitColumns:!1},children:[c.jsx(p.DataGridHeader,{children:c.jsx(p.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(p.DataGridHeaderCell,{children:e()})})}),c.jsx(_,{})]})})},exports.DataGridV2=xn,exports.DropdownField=({options:e,onChange:t,renderItem:n,validate:r,label:o,placeholder:i,message:a,messageType:s,required:l,size:d,hint:h})=>{const[m,f]=u.useState(""),[g,y]=u.useState(""),b=L.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),x=L.useMemo(()=>g||a,[g,a]),C=L.useCallback(()=>{switch(b){case"error":return c.jsx(v.ErrorCircle12Filled,{});case"warning":return c.jsx(v.Warning12Filled,{});case"success":return c.jsx(v.CheckmarkCircle12Filled,{});default:return null}},[b]);return c.jsx(p.Field,{label:o,required:l,validationMessage:x,validationMessageIcon:C(),size:d,hint:h,validationState:b,children:c.jsx(p.Dropdown,{placeholder:i,onChange:(e,n)=>{const o=(null==n?void 0:n.value)||"";f(o);const i=r?r(o):"";y(i),!i&&t&&t(o)},value:m,children:e.map(e=>c.jsxs(p.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[n&&n(e)," "]},e.value))})})},exports.EBreakPoints=$,exports.ECalendarViews=Yt,exports.EMessageType=U,exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu();return i?c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsxs(p.MenuButton,{ref:r,children:["+",o," items"]})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(_n,{id:n(e),children:t(e)},n(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:n}=e,{gridStyles:r}=nt(e),o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{className:n,style:r(i,s),ref:o,children:t})})},exports.Layout=e=>{const{className:t,children:n,layoutConfig:r=ot}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{rootStyles:u,layoutGridStyles:d}=rt({...e,layoutConfig:r}),h=((e,t)=>{let n;return L.useCallback((...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return L.useEffect(()=>{if(!o.current)return;const e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(o.current),()=>e.disconnect()},[h]),c.jsx("div",{id:"-Layout",className:p.mergeClasses(t,d),style:{...u(i,s),gridTemplateAreas:r.areas.join(" "),gridTemplateColumns:r.columns,gridTemplateRows:r.rows},ref:o,children:L.Children.map(n,(e,t)=>{var n;if(L.isValidElement(e)){const r=e;return c.jsx("div",{style:{gridArea:(null==(n=r.props)?void 0:n.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:n}=e;return c.jsx(c.Fragment,{children:c.jsx("div",{style:{gridArea:t},children:n})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:n,currentUserEmail:r,strings:o,context:i})=>{var a,s,l,d,p,h,m,f,g,y,b;const{getItemActivities:x}=(e=>{const t=G(),n=e||t,r=null==n?void 0:n.graphClient;return{getItemActivities:u.useCallback(async(e,t,n)=>{if(!r)return console.warn("Graph client not available for SharePoint activities"),{activities:[]};try{const o=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return o&&o.value?{activities:o.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(o){throw console.error("Error fetching SharePoint activities:",o),o}},[r])}})(i),C=new Map([["access",{message:(null==o?void 0:o.access)||(null==(a=vc.get("access"))?void 0:a.message)||"",icon:c.jsx(v.OpenRegular,{style:gc})}],["comment",{message:(null==o?void 0:o.comment)||(null==(s=vc.get("comment"))?void 0:s.message)||"",icon:c.jsx(v.CommentRegular,{style:gc})}],["create",{message:(null==o?void 0:o.create)||(null==(l=vc.get("create"))?void 0:l.message)||"",icon:c.jsx(v.AddRegular,{style:gc})}],["delete",{message:(null==o?void 0:o.delete)||(null==(d=vc.get("delete"))?void 0:d.message)||"",icon:c.jsx(v.DeleteRegular,{style:gc})}],["edit",{message:(null==o?void 0:o.edit)||(null==(p=vc.get("edit"))?void 0:p.message)||"",icon:c.jsx(v.EditRegular,{style:gc})}],["mention",{message:(null==o?void 0:o.mention)||(null==(h=vc.get("mention"))?void 0:h.message)||"",icon:c.jsx(v.MentionRegular,{style:gc})}],["move",{message:(null==o?void 0:o.move)||(null==(m=vc.get("move"))?void 0:m.message)||"",icon:c.jsx(v.ArrowMoveRegular,{style:gc})}],["rename",{message:(null==o?void 0:o.rename)||(null==(f=vc.get("rename"))?void 0:f.message)||"",icon:c.jsx(v.RenameRegular,{style:gc})}],["restore",{message:(null==o?void 0:o.restore)||(null==(g=vc.get("restore"))?void 0:g.message)||"",icon:c.jsx(v.ArrowSyncRegular,{style:gc})}],["share",{message:(null==o?void 0:o.share)||(null==(y=vc.get("share"))?void 0:y.message)||"",icon:c.jsx(v.PeopleRegular,{style:gc})}],["version",{message:(null==o?void 0:o.version)||(null==(b=vc.get("version"))?void 0:b.message)||"",icon:c.jsx(v.HistoryRegular,{style:gc})}]]),[w,S]=L.useState({message:"",icon:c.jsx(c.Fragment,{})}),[k,P]=L.useState(!0),E=L.useRef(void 0),A=L.useRef(void 0),[I]=L.useState(30),_=L.useCallback(e=>e.user.email===r,[r]),T=L.useCallback(e=>{if(!e)return{message:"",icon:c.jsx(c.Fragment,{})};const{action:t,actor:n}=e,{displayName:r}=(null==n?void 0:n.user)||{displayName:""},o=yc.find(e=>t[e]);if(o){const e=C.get(o);if(e){return{message:`${_(n)?"You":r} ${e.message}`,icon:e.icon}}}return{message:"",icon:c.jsx(c.Fragment,{})}},[C,_]);return L.useEffect(()=>{var e;null==(e=A.current)||e.setPlaybackRate(I/100)},[I,k]),L.useEffect(()=>{let r=!1;const o=async(i=1e3)=>{var a;if(e&&t&&n)try{const o=await x(e,t,n);if(r)return;const i=o.activities[0];E.current&&JSON.stringify(E.current)===JSON.stringify(i)||(E.current=i,S(T(i)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):i;return console.warn(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>o(2*t),t)}console.error("Activity Error",s)}finally{r||P(!1)}},i=setTimeout(()=>{o()},1e3);return()=>{clearTimeout(i),r=!0}},[e,t,n,x,T]),c.jsx(B.Fade,{imperativeRef:A,visible:!k,children:c.jsx("div",{children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[w.icon," ",w.message]})})})},exports.LivePersona=pc,exports.Mensions=ac,exports.MensionsExample=({context:e})=>{const[t,n]=u.useState(""),[r,o]=u.useState(""),i=u.useRef(null),a=u.useRef(null);return c.jsxs(st,{RowGap:20,children:[c.jsxs("div",{children:[c.jsx("h3",{children:"Input with @ mentions"}),c.jsx(p.Input,{ref:i,value:t,onChange:(e,t)=>n(t.value),placeholder:"Type @ to mention someone..."}),c.jsx(ac,{context:e,inputValue:t,parentRef:i,mentionChars:["@"],onUserSelect:(e,r)=>{const o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),a=t.replace(o,`${r}${e.displayName} `);n(a),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Mention User",maxSuggestions:8})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Textarea with @ and # mentions"}),c.jsx(p.Textarea,{ref:a,value:r,onChange:(e,t)=>o(t.value),placeholder:"Type @ to mention someone or # for tags...",rows:4}),c.jsx(ac,{context:e,inputValue:r,parentRef:a,mentionChars:["@","#"],onUserSelect:(e,t)=>{const n=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),i=r.replace(n,`${t}${e.displayName} `);o(i),setTimeout(()=>{var e;null==(e=a.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Select User or Tag",maxSuggestions:10,userFilter:(e,t)=>{var n;return e.displayName.toLowerCase().includes(t.toLowerCase())||((null==(n=e.mail)?void 0:n.toLowerCase().includes(t.toLowerCase()))??!1)}})]})]})},exports.Popup=ft,exports.RenderAdaptiveCard=({card:e,data:t})=>{const n=u.useRef(null);return u.useEffect(()=>{if(!n.current)return;n.current.innerHTML="";const r=new D.Template(e).expand({$root:t}),o=new F.AdaptiveCard;null==o||o.parse(r);const i=o.render();i&&n.current.appendChild(i)},[e,t]),c.jsx("div",{ref:n})},exports.RenderDialog=wn,exports.RenderDrawer=e=>{const{isOpen:t,onOpenChange:n,title:r,headerActions:o,footerActions:i,size:a,separator:s,type:l,style:u,children:d,position:p,classNameHeader:h="",classNameBody:m="",classNameFooter:f=""}=e;return c.jsx(c.Fragment,{children:c.jsxs(P.Drawer,{type:l,separator:s,open:t,onOpenChange:(e,t)=>{n&&n(t.open)},size:a,style:u,position:p,children:[c.jsx(P.DrawerHeader,{className:h,children:c.jsx(P.DrawerHeaderTitle,{style:{width:"100%"},action:o,children:r})}),c.jsx(P.DrawerBody,{className:m,children:d}),c.jsx(P.DrawerFooter,{className:f,children:i})]})})},exports.RenderHeader=e=>{const{onDismiss:t,title:n,description:r,icon:o,showCloseButton:i=!0}=e,a=Sn();return c.jsx(c.Fragment,{children:c.jsxs("div",{id:"RenderHedaermain",className:a.renderHeaderContent,children:[c.jsxs("div",{className:a.renderHeaderHeader,children:[c.jsx(p.Button,{style:{display:i?"block":"none"},appearance:"subtle",className:a.closeButton,onClick:e=>{e.stopPropagation(),e.preventDefault(),t(!1)},icon:c.jsx(v.Dismiss24Regular,{})}),c.jsxs("div",{className:a.renderHeaderTitleContainer,children:[L.isValidElement(o)?o:c.jsx(x.Icon,{icon:o}),c.jsxs("div",{className:a.dialogTitleAndDescriptionContainer,children:[L.isValidElement(n)?n:c.jsx(p.Subtitle1,{className:a.renderHeaderTitle,children:n}),L.isValidElement(r)?r:c.jsx(p.Caption1,{className:a.renderHeaderDescription,children:r})]})]})]}),c.jsx("div",{className:a.divider})]})})},exports.RenderLabel=bt,exports.RenderSpinner=e=>{const{size:t,label:n,labelPosition:r,style:o,className:i}=e,a=xt();return c.jsx("div",{className:a.root,children:c.jsx(p.Spinner,{style:o,className:p.mergeClasses(a.spinner,i),size:t,label:n,labelPosition:r})})},exports.SelectDay=Kt,exports.SelectMonth=nn,exports.SelectView=({onChange:e,defaultKey:t,label:n,options:r=[]})=>{const[o,i]=u.useState(()=>r.map(e=>({...e,selected:e.key===(t??"status")})));u.useEffect(()=>{const t=o.find(e=>e.selected);t&&e(t.key)},[]);const a=u.useCallback(t=>{const n=o.map(e=>({...e,selected:e.key===t.key}));i(n),e(t.key)},[o,e]);return c.jsxs(yt,{gap:"s",alignItems:"center",children:[n&&c.jsx(p.Label,{children:n}),c.jsx(kt,{options:o,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=sn,exports.ShareDialog=({isOpen:e,options:t,onClose:n})=>{const[r,o]=u.useState(void 0);console.log(r);const i=u.useRef(null),[a,s]=u.useState(400),{siteUrl:l,listId:d,itemId:p,name:h}=t,m=u.useCallback(()=>{n()},[n]),f=u.useCallback(e=>{if(e.origin!==window.location.origin)return;console.log("Message from iframe:",e.data);const{name:t,height:n}=JSON.parse(e.data);switch(t){case"share_dismiss":m();break;case"share_resize":s(n)}},[m]);return u.useEffect(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),u.useEffect(()=>{if(e){const e="sharePoint",t=0,n="",r=(new Date).getTime(),i=!1,a=encodeURIComponent(window.location.origin),s=encodeURIComponent(h),c=`${l}/_layouts/15/sharedialog.aspx?listId=${d}&listItemId=${p}&clientId=${e}&policyTip=${t}&folderColor=${n}&clickTime=${r}&ma=0&fullScreenMode=${i}&itemName= ${s}&channelId=&origin=${a}`;console.log(c),o(c)}else o(void 0)},[e,l,d,p]),c.jsx(wn,{isOpen:e,onDismiss:m,maxHeight:"fit-content",children:c.jsx("iframe",{ref:i,src:r||"",style:{width:"100%",height:a,border:"none"},onLoad:()=>console.log("Iframe loaded")})})},exports.ShowError=({title:e,message:t})=>{const n=kn();return c.jsx(p.Card,{className:n.container,children:c.jsxs(yt,{gap:"l",alignItems:"center",children:[c.jsx(v.ErrorCircleRegular,{className:n.icon}),c.jsxs(yt,{gap:"s",alignItems:"center",children:[c.jsx(p.Title3,{className:n.title,children:e}),c.jsx(p.Body1,{className:n.message,children:t})]})]})})},exports.ShowMessage=En,exports.Space=e=>{const t=L.useRef(null),[n,r]=L.useState(0),{spaceStyles:o}=it(e);return L.useEffect(()=>{let e;return t.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e}=t.contentRect;r(e)}}),e.observe(t.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{id:"-space",style:o(n),ref:t})})},exports.Stack=st,exports.StackItem=e=>{const{children:t,grow:n,disableShrink:r,shrink:o,order:i,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=Z(),u=L.useRef(null),[d,p]=L.useState(0),[h,m]=L.useState(0),g=l(e,d,h);L.useEffect(()=>{let e;return u.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;p(e),m(n)}}),e.observe(u.current)),()=>{e&&e.disconnect()}},[]);const y={...g,alignSelf:a,order:i,height:s?"100%":"auto",flexGrow:n?"boolean"==typeof n?1:n:void 0,flexShrink:r||!n&&!o?0:1,minWidth:0,minHeight:0,width:"auto"};return c.jsx(c.Fragment,{children:c.jsx("div",{ref:u,style:y,children:t})})},exports.StackV2=yt,exports.StackedUsers=({users:e,maxVisible:t=5,avatarSize:n=32,showHoverCard:r=!0,context:o,className:i,layout:a="stack",overflowText:s})=>{const l={container:g.css({display:"flex",alignItems:"center",gap:"4px"}),stackLayout:g.css({"& > *:not(:first-child)":{marginLeft:"-8px"}}),spreadLayout:g.css({display:"flex",flexDirection:"row",gap:"8px","& > *":{marginLeft:"0"}}),userCardWrapper:g.css({position:"relative",zIndex:1,transition:"transform 0.2s ease, z-index 0.2s ease","&:hover":{transform:"scale(1.1)",zIndex:10}}),overflowButton:g.css({backgroundColor:p.tokens.colorNeutralBackground1,border:`2px solid ${p.tokens.colorNeutralStroke1}`,borderRadius:"50%",color:p.tokens.colorNeutralForeground1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600,minWidth:"32px",minHeight:"32px",position:"relative",zIndex:1,transition:"all 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:g.css({maxWidth:"300px",padding:"12px"}),popoverUserList:g.css({display:"flex",flexDirection:"column",gap:"8px"}),popoverUserCard:g.css({padding:"4px",borderRadius:"4px",transition:"background-color 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover}})},{visibleUsers:d,overflowUsers:h}=u.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),m=u.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?o?c.jsxs(yt,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${i||""}`,children:[d.map((e,t)=>c.jsx("div",{className:l.userCardWrapper,children:c.jsx(fc,{userId:e.id,avatarSize:n,showHoverCard:r??!0,context:o,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&c.jsxs(p.Popover,{withArrow:!0,children:[c.jsx(p.PopoverTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Button,{className:l.overflowButton,style:{width:`${n}px`,height:`${n}px`,fontSize:n>40?"14px":"12px"},appearance:"subtle",children:m})}),c.jsx(p.PopoverSurface,{className:l.popover,children:c.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>c.jsx("div",{className:l.popoverUserCard,children:c.jsx(fc,{userId:e.id,avatarSize:32,showHoverCard:r??!0,context:o,textPosition:"after",avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(console.warn("StackedUsers: context is required to display user cards"),null):null},exports.TypographyControl=e=>{const{fontSize:t,fontWeight:n,numberOfLines:r,as:o,padding:i,paddingTop:a,paddingBottom:s,paddingLeft:l,paddingRight:u,margin:d,marginTop:h,marginBottom:m,marginLeft:f,marginRight:y,children:v,style:b,className:x,color:C}=e,w=g.css({color:C,fontSize:t&&Ct[t]?Ct[t]:t,fontWeight:n&&St[n]?St[n]:n,display:r?"-webkit-box":void 0,WebkitBoxOrient:"vertical",overflow:r?"hidden":void 0,WebkitLineClamp:r,padding:i&&wt[i]?wt[i]:i,paddingTop:a&&wt[a]?wt[a]:a,paddingBottom:s&&wt[s]?wt[s]:s,paddingLeft:l&&wt[l]?wt[l]:l,paddingRight:u&&wt[u]?wt[u]:u,margin:d&&wt[d]?wt[d]:d,marginTop:h&&wt[h]?wt[h]:h,marginBottom:m&&wt[m]?wt[m]:m,marginLeft:f&&wt[f]?wt[f]:f,marginRight:y&&wt[y]?wt[y]:y,...b});return c.jsx(p.Text,{as:o,className:p.mergeClasses(x,w),children:v})},exports.UniversalProvider=({context:e,children:t})=>c.jsx(J.Provider,{value:e,children:t}),exports.UserCard=fc,exports.VideoPlayer=e=>{const{url:t,controls:n=!0,width:r="100%",height:o="100%",loop:i=!1,muted:a=!1}=e,[s,l]=u.useState(!1),d=Tn(e);return c.jsxs("div",{className:d.videoPlayerContainer,children:[c.jsx(E,{url:t,controls:n,width:r,height:o,playing:s,loop:i,muted:a,onPause:()=>l(!1),onPlay:()=>l(!0),className:d.reactPlayer}),!s&&c.jsx(p.Button,{className:p.mergeClasses(d.playButton),onClick:()=>{l(!s)},children:"►"})]})},exports.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>e(t));if(t instanceof Object){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}return t},exports.debounce=Ke,exports.defaultCalendarControlStrings=pn,exports.defaultCalendarMonthStrings=en,exports.defaultSelectWeekStrings=rn,exports.every=function(e,t){return e.every(t)},exports.filter=function(e,t){return e.filter(t)},exports.get=function(e,t,n){const r=Array.isArray(t)?t:t.split(".");let o=e;for(const i of r){if(null==o)return n;o=o[i]}return void 0===o?n:o},exports.groupBy=function(e,t){return e.reduce((e,n)=>{const r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})},exports.isEmpty=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)},exports.map=function(e,t){return e.map(t)},exports.set=function(e,t,n){const r=Array.isArray(t)?t:t.split("."),o=r.pop();if(!o)return e;let i=e;for(const a of r)a in i&&"object"==typeof i[a]||(i[a]={}),i=i[a];return i[o]=n,e},exports.some=function(e,t){return e.some(t)},exports.throttle=function(e,t=0){let n=null,r=0;return function(...o){const i=this,a=Date.now();r||(r=a);const s=t-(a-r);s<=0||s>t?(n&&(clearTimeout(n),n=null),r=a,e.apply(i,o)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(i,o)},s))}},exports.uniq=function(e){return Array.from(new Set(e))},exports.uniqBy=function(e,t){const n=new Set;return e.filter(e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)})},exports.useApplicationContext=G,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:n}=Z();return{aspectRatioStyles:L.useCallback((r,o)=>({...n(e,r,o),...t}),[n,e,t])}},exports.useCalendar=Jt,exports.useCalendarStyles=Mt,exports.useCardStyles=et,exports.useCarouselStyles=pt,exports.useCarouselStylesMain=ht,exports.useCenterStyles=lt,exports.useComponentUtils=Z,exports.useContainerStyles=ut,exports.useDataGridStyles=vn,exports.useDateUtils=(e,t,n)=>{const{getFormatRelative:r,formatDate:o}=Ze(t,e);return{formatUtcDate:(e,t="PP")=>{const n=h.differenceInDays(new Date,h.parseISO(e));let i="";return void 0!==e&&(i=n>7?o(e,t):r(e)),i},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{const r="string"==typeof n?new Date(n):n,o=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r);let i,a,s,l,c,u;for(const e of o)switch(e.type){case"year":i=e.value;break;case"month":a=e.value;break;case"day":s=e.value;break;case"hour":l=e.value;break;case"minute":c=e.value;break;case"second":u=e.value}return new Date(`${i}-${a}-${s}T${l}:${c}:${u}Z`)}}},exports.useDayViewStyles=Gt,exports.useGraphAPI=()=>{const e=G(),t=null==e?void 0:e.graphClient;return{getUser:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get(`/users/${e}`)}catch(n){return console.error("Error fetching user:",n),null}},[t]),getCurrentUser:u.useCallback(async()=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get("/me")}catch(e){return console.error("Error fetching current user:",e),null}},[t]),searchUsers:u.useCallback(async(e,n=10)=>{if(!t)return console.warn("Graph client not available"),[];try{return(await t.get(`/users?$search="displayName:${e}" OR "mail:${e}"&$top=${n}`)).value||[]}catch(r){return console.error("Error searching users:",r),[]}},[t]),getUserPhoto:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{const n=await t.get(`/users/${e}/photo/$value`);return URL.createObjectURL(n)}catch(n){return console.error("Error fetching user photo:",n),null}},[t]),graphClient:t}},exports.useGridStyles=nt,exports.useImageUtils=()=>{const e=u.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),t=u.useCallback(async(e,t,n)=>new Promise((r,o)=>{const i=new Image;i.crossOrigin="anonymous",i.addEventListener("load",()=>{var e;const a=document.createElement("canvas");let s;a.width=t??i.width,a.height=n??i.height,null==(e=null==a?void 0:a.getContext("2d"))||e.drawImage(i,0,0,t??i.width,n??i.height);try{s=a.toDataURL("image/png",1),r(s)}catch(l){Qe&&console.error(`[ImageService.getBase64Image]: Err='${l.message}'`),o(l)}}),i.addEventListener("error",e=>{Qe&&console.error(`[ImageService.getBase64Image]: Image load error='${e.message}'`),o(e)}),i.src=e}),[]),n=u.useCallback(e=>!m.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:u.useCallback(e=>{try{const t=document.getElementById(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");null==r||r.drawImage(t,0,0);return n.toDataURL("image/png")}catch(t){return void(Qe&&console.error(`[getBase64ImageFromDOMImg]: Err='${t.message}'`))}},[]),isBase64Image:n,getImageBase64:t,base64FromSVGUrl:e}},exports.useIndexedDBCache=X,exports.useLayoutStyles=rt,exports.useLogging=q,exports.useMensionsStyles=ic,exports.usePolling=Y,exports.usePrevNextButtons=dt,exports.useRenderHeaderStyles=Sn,exports.useShowErrorStyles=kn,exports.useShowMessageStyles=Pn,exports.useSpaceStyles=it,exports.useStackStyles=at,exports.useStyles=()=>({inputContainer:g.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:p.tokens.borderRadiusMedium}}),listContainer:g.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),sugestionsHeader:g.css({color:p.tokens.colorBrandBackground})}),exports.useTimeZoneHelper=()=>{const e=G(),t=u.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:t,convertToUserTimeZone:(e,n)=>{const r=n||t;return d.toZonedTime(e,r)},convertFromUserTimeZone:(e,n)=>{const r=n||t;return d.fromZonedTime(e,r)},formatInTimeZone:(e,n,r)=>{const o=r||t;return d.format(d.toZonedTime(e,o),n,{timeZone:o})},getUserTimeZone:()=>{var n,r;return null==(r=null==(n=null==e?void 0:e.pageContext)?void 0:n.user)||r.preferUserTimeZone,t}}},exports.useUtils=At,exports.useVideoStyles=Tn,exports.useWeekViewStyles=Vt;
|
|
200
|
+
`},C=u.useCallback(async e=>{if(e.trim()){return void(null==i||i("Azure OpenAI is not properly configured. Please check your configuration.",e.trim()))}},[d,e,r,o,i,c,h]),w=u.useCallback((e,t)=>{y(t.value)},[]),S=u.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==r||r("","")},[r]),k=u.useCallback(e=>{var t;"Enter"===e.key&&!m&&g.trim()?C(g).catch(e=>{console.error("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==r||r("",""))},[C,m,g,r]);return Jl(p.SearchBox,{ref:v,css:b,className:s,style:{width:l},placeholder:n,value:g,onChange:w,onKeyDown:k,disabled:a||m,contentBefore:Jl("span",{css:x,children:Jl(tc,{size:20})}),dismiss:{onClick:S}})},exports.AISearchIcon=tc,exports.AISearchIconExample=()=>{const e=nc();return c.jsxs("div",{className:e.container,children:[c.jsx("h2",{children:"AI Search Icon Examples"}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Standard AI Search Icon"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Small (16px):"}),c.jsx(tc,{size:16})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Medium (20px):"}),c.jsx(tc,{size:20})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Large (24px):"}),c.jsx(tc,{size:24})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Extra Large (32px):"}),c.jsx(tc,{size:32})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Custom Colors:"}),c.jsx(tc,{size:24,color:p.tokens.colorPaletteBlueForeground2,aiIndicatorColor:p.tokens.colorPaletteGreenForeground2})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage in Buttons"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Primary Button:"}),c.jsx(p.Button,{appearance:"primary",icon:c.jsx(tc,{size:16}),children:"AI Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Secondary Button:"}),c.jsx(p.Button,{appearance:"secondary",icon:c.jsx(tc,{size:16}),children:"Smart Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Icon Only Button:"}),c.jsx(p.Button,{appearance:"subtle",icon:c.jsx(tc,{size:20}),title:"AI Search"})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage Example Code"}),c.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=e=>{const t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),o=u.useRef(null);u.useEffect(()=>{A.AdaptiveCard.onProcessMarkdown||(A.AdaptiveCard.onProcessMarkdown=(e,t)=>{t.outputHtml=(new W.default).render(e),t.didProcess=!0;try{t.outputHtml=(new W.default).render(e),t.didProcess=!0}catch(n){console.error("AdaptiveCardHost: Error parsing Markdown",n),t.didProcess=!1}})},[]),u.useEffect(()=>{n.current=null,n.current=new A.AdaptiveCard,r.current=new A.SerializationContext},[e]);const i=u.useCallback(t=>{if(e.onInvokeAction){let n={type:"",title:""};const r=t.getJsonTypeName();switch(r){case A.OpenUrlAction.JsonTypeName:{const e=t;n={type:r,title:e.title,url:e.url}}break;case A.SubmitAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data}}break;case A.ExecuteAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:"Unknown Action"}}e.onInvokeAction(n)}},[e.onInvokeAction]);return u.useEffect(()=>{let t,r=e.themeType;o.current=null,r||(r=jn.SharePoint),t=e.theme?e.theme:ps(r);const i=Vn(r,t),a=i.hostConfig;console.log("hostconfig:",a),o.current=t,n.current&&(n.current.hostConfig=i.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(a.hostCapabilities)},[e]),u.useEffect(()=>{n.current&&(n.current.onExecuteAction=i)},[e,i]),u.useEffect(()=>{const t=new A.CardObjectRegistry,n=new A.CardObjectRegistry;var o;A.GlobalRegistry.populateWithDefaultElements(t),A.GlobalRegistry.populateWithDefaultActions(n),o=t,M.initializeIcons(),o.register("Input.Text",ns),o.register("Input.Number",Ya),o.register("Input.Time",ss),o.register("Input.Date",Ja),o.register("Input.Toggle",ds),o.register("Input.ChoiceSet",Fa),function(e){e.register("Action.Submit",Oa),e.register("Action.OpenUrl",Da),e.register("Action.ShowCard",Va),e.register("Action.ToggleVisibility",Ba),e.register("Action.Execute",Na)}(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);const i=r.current;i&&i.setElementRegistry(t),i&&i.setActionRegistry(n)},[e]),u.useEffect(()=>{for(var o;null==(o=null==t?void 0:t.current)?void 0:o.firstChild;)t.current.lastChild&&t.current.removeChild(t.current.lastChild);const i=t.current;if(!i)return;const a=n.current;try{const t=new D.Template(e.card),n=((e,t,n)=>{var r,o,i,a,s,l,c;let u,d;return d=n?{theme:t,aadInfo:(null==(r=null==n?void 0:n.pageContext)?void 0:r.aadInfo)?{instanceUrl:n.pageContext.aadInfo.instanceUrl||"",tenantId:n.pageContext.aadInfo.tenantId||"",userId:n.pageContext.aadInfo.userId||""}:void 0,cultureInfo:(null==(o=null==n?void 0:n.pageContext)?void 0:o.cultureInfo)?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:(null==(i=null==n?void 0:n.pageContext)?void 0:i.user)?{displayName:n.pageContext.user.displayName,email:n.pageContext.user.email,isAnonymousGuestUser:n.pageContext.user.isAnonymousGuestUser||!1,isExternalGuestUser:n.pageContext.user.isExternalGuestUser||!1,loginName:n.pageContext.user.loginName,preferUserTimeZone:n.pageContext.user.preferUserTimeZone||!1}:void 0,spListInfo:(null==(a=null==n?void 0:n.pageContext)?void 0:a.list)?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||"",title:n.pageContext.list.title}:void 0,spListItemInfo:(null==(s=null==n?void 0:n.pageContext)?void 0:s.listItem)?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:(null==(l=null==n?void 0:n.pageContext)?void 0:l.site)?{absoluteUrl:n.pageContext.site.absoluteUrl,cdnPrefix:n.pageContext.site.cdnPrefix||"",classification:n.pageContext.site.classification||"",correlationId:n.pageContext.site.correlationId||"",id:n.pageContext.site.id,isNoScriptEnabled:n.pageContext.site.isNoScriptEnabled||!1,recycleBinItemCount:n.pageContext.site.recycleBinItemCount||0,serverRelativeUrl:n.pageContext.site.serverRelativeUrl||"",serverRequestPath:n.pageContext.site.serverRequestPath||"",sitePagesEnabled:n.pageContext.site.sitePagesEnabled||!1}:void 0,spWebInfo:(null==(c=null==n?void 0:n.pageContext)?void 0:c.web)?{absoluteUrl:n.pageContext.web.absoluteUrl,id:n.pageContext.web.id,isAppWeb:n.pageContext.web.isAppWeb||!1,language:n.pageContext.web.language||0,languageName:n.pageContext.web.languageName||"",logoUrl:n.pageContext.web.logoUrl||"",serverRelativeUrl:n.pageContext.web.serverRelativeUrl||"",templateName:n.pageContext.web.templateName||"",title:n.pageContext.web.title,description:n.pageContext.web.description||""}:void 0}:{theme:t},u=e?{$root:{...null==e?void 0:e.$root,"@context":d}}:{$root:{"@context":d}},u})(e.data??{$root:{}},ps(e.themeType??jn.SharePoint),e.context),o=t.expand(n);if(a&&a.parse(o,r.current??void 0),a){const e=a.render();e&&e.outerHTML!==i.innerHTML&&e.outerHTML!==i.innerHTML&&(i.innerHTML="",i.appendChild(e))}}catch(s){e.onError&&e.onError(s)}},[e,ps]),c.jsx(p.IdPrefixProvider,{value:"adaptiveCardHost",children:c.jsx(p.FluentProvider,{theme:o.current?o.current:ps(e.themeType??jn.SharePoint),children:c.jsx("div",{ref:t,className:`${e.className?e.className:""}`,style:e.style})})})},exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:n="100%",maxSpanRows:r=4,enableDragAndDrop:o=!0,enableCache:i=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const d={dashboardContainer:g.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:p.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:g.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:g.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:g.css({color:`${p.tokens.colorNeutralForeground2}`}),cardWrapper:g.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:p.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${p.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${p.tokens.shadow8}`}})},h=`${a}-layout-settings`,m=`${a}-card-order`,{getCachedData:f,setCachedData:y}=X(),v=u.useCallback(e=>f(e),[f]),b=u.useCallback((e,t)=>y(e,t,43200),[y]),{getCachedData:x,setCachedData:C}=X(),w=u.useCallback(e=>x(e),[x]),S=u.useCallback((e,t)=>C(e,t,43200),[C]),[k,P]=u.useState([]),[E,A]=u.useState({}),I=u.useRef(null),_=u.useRef(null),T=u.useRef(null);u.useEffect(()=>{(async()=>{try{let t=e,n={};if(i){const[r,o]=await Promise.all([v(h),w(m)]);if(o&&o.length>0){const n=new Map(e.map(e=>[e.id,e])),r=o.filter(e=>n.has(e)),i=e.filter(e=>!o.includes(e.id));t=[...r.map(e=>n.get(e)),...i]}e.forEach(e=>{var t,o;const i=null==r?void 0:r[e.id];n[e.id]={spanCols:(null==i?void 0:i.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==i?void 0:i.spanRows)??(null==(o=e.defaultSpan)?void 0:o.spanRows)??1}})}else e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}});P(t),A(n)}catch(t){console.warn("Failed to load dashboard data from cache:",t),P(e);const n={};e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}}),A(n)}})()},[e,i,h,m,v,w]),u.useEffect(()=>{if(!i||0===Object.keys(E).length)return;(async()=>{try{await b(h,E)}catch(e){console.warn("Failed to save dashboard layout to cache:",e)}})()},[E,i,h,b]),u.useEffect(()=>{if(!i||0===k.length)return;(async()=>{try{const e=k.map(e=>e.id);await S(m,e)}catch(e){console.warn("Failed to save dashboard order to cache:",e)}})()},[k,i,m,S]),u.useEffect(()=>{t<=600&&A(()=>{const e={};return k.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,k]);const j=u.useMemo(()=>t>600,[t]),{minCardWidth:M,gridGap:N,containerPadding:D}=u.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),V=t-2*D,O=u.useMemo(()=>Math.floor((V+N)/(M+N)),[V,N,M]),B=Math.max(O,1),R=u.useCallback(()=>{if(null!==I.current&&null!==_.current&&I.current!==_.current){const e=[...k],[t]=e.splice(I.current,1);e.splice(_.current,0,t),P(e),s&&s(e)}I.current=null,_.current=null},[k,s]),z=u.useCallback((e,t)=>{const n={spanCols:Math.min(Math.max(t.spanCols,1),B),spanRows:Math.min(Math.max(t.spanRows,1),r)};A(t=>({...t,[e]:n})),l&&l(e,n)},[B,r,l]),L=u.useMemo(()=>k.reduce((e,t)=>{var n,r;return e[t.id]={spanCols:Math.min((null==(n=t.defaultSpan)?void 0:n.spanCols)??1,O),spanRows:(null==(r=t.defaultSpan)?void 0:r.spanRows)??1},e},{}),[k,O]),H=u.useMemo(()=>k.map((e,t)=>{var i,a,s,l;const u=!1!==e.showZoom&&j,h=e.headerAction||(u?c.jsx(Cc,{values:E[e.id]||L[e.id]||{spanCols:1,spanRows:1},maxCols:B,maxRows:r,IsOpen:!1,onChange:t=>z(e.id,t)}):void 0);return c.jsx("div",{className:d.cardWrapper,draggable:o,onDragStart:()=>o&&(I.current=t),onDragEnter:()=>o&&(_.current=t),onDragOver:e=>o&&e.preventDefault(),onDragEnd:o?R:void 0,style:{gridColumnEnd:(null==(i=E[e.id])?void 0:i.spanCols)?`span ${E[e.id].spanCols}`:`span ${(null==(a=L[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=E[e.id])?void 0:s.spanRows)?`span ${E[e.id].spanRows}`:`span ${(null==(l=L[e.id])?void 0:l.spanRows)||1}`,cursor:o?"grab":"default"},children:c.jsxs(p.Card,{className:`${d.cardBody} ${e.className||""}`,children:[c.jsx(p.CardHeader,{header:c.jsxs(yt,{gap:"0px",children:[c.jsx(p.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&c.jsx(p.Text,{className:d.cardDescription,size:200,children:e.cardDescription})]}),action:h}),c.jsx("div",{className:d.chartContainer,style:{height:n,...e.style},children:e.content})]})},e.id)}),[k,o,R,E,d.cardBody,d.cardDescription,d.chartContainer,d.cardWrapper,j,B,r,z,n,L]);return 0===k.length?c.jsx(xc,{}):c.jsx("div",{ref:T,className:d.dashboardContainer,style:{height:n},children:H})},exports.AspectRatio=({ratio:e,children:t,maxWidth:n,maxHeight:r,style:o={},...i})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:n||"none",maxHeight:r||"none",...o};return c.jsx("div",{style:a,...i,children:c.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:n,theme:r,size:o="medium",currentIndex:i=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Pt(),d=u.useRef(null),[h,m]=u.useState([]),[g,y]=u.useState([]);return u.useEffect(()=>{const t=()=>{if(!d.current)return;const t=d.current.offsetWidth;let n=0;const r=[],o=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):o.push(e)}),m(r),y(o)},n=((e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(t,100),r=new f.ResizeObserver(()=>{n()});return d.current&&r.observe(d.current),t(),()=>{r.disconnect()}},[e]),c.jsx("div",{ref:d,className:p.mergeClasses(s.container,a),style:{maxWidth:t,...n},children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[h.map((e,t)=>c.jsxs(c.Fragment,{children:[t===i?c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?u.cloneElement(e.icon,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}}):null,c.jsx(p.Text,{className:p.mergeClasses(s.breadcrumbItem,l(e,o),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):c.jsx(p.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:c.jsx(p.Text,{className:l(e,o),children:e.label})},e.label),t<h.length-1&&c.jsx(v.ChevronRightRegular,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}})]})),g.length>0&&c.jsx(Et,{items:g,theme:r})]})})},exports.ButtonMenu=kt,exports.CalendarControl=({events:e,height:t=800,theme:n,onDayChange:r,onMonthChange:o,onWeekChange:i,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:d})=>{const{styles:m}=Mt(),g=u.useRef(null),[y,v]=u.useState(null),b=u.useRef(0),[x,C]=u.useState(new Date),[w,S]=u.useState(l??Yt.Month),{getMonthCalendar:k}=Jt(Intl.DateTimeFormat().resolvedOptions().timeZone),P=L.useCallback(e=>{const t=e.getMonth(),n=h.startOfMonth(e),r=h.startOfWeek(n);return Array.from({length:42},(e,n)=>{const o=h.addDays(r,n);return{day:o.getDate(),currentMonth:o.getMonth()===t,date:o}})},[42]),E=L.useCallback(e=>{o&&o(e),C(e)},[o]),A=L.useCallback(e=>{r&&r(e),C(e)},[r]),I=L.useCallback(e=>{i&&i(e),C(e)},[i]),_=L.useCallback(e=>{a&&a(e),S(e)},[a]),T=L.useCallback(t=>{var n;const{date:r}=t;return(null==(n=k(e,x.getFullYear(),x.getMonth())[h.format(r,"yyyy-MM-dd")])?void 0:n.flatMap(e=>e))||[]},[x,e]),j=L.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){const e=g.current.querySelector(`.${m.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),b.current=e.offsetHeight)}})},[m.calendarWrapper]);u.useEffect(()=>{const e=new f.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener("resize",j),()=>{e.disconnect(),window.removeEventListener("resize",j)}},[j,w]),u.useEffect(()=>{S(l||Yt.Month)},[l]);const M=L.useCallback(()=>{switch(w){case Yt.Month:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl});case Yt.Week:return c.jsx(mn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.weekView});case Yt.Day:return c.jsx(fn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.dayView});default:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl})}},[w,e,x,y,P,T,m,s,t]);return c.jsx(p.IdPrefixProvider,{value:"calendarControl-",children:c.jsx(p.FluentProvider,{theme:n??p.webLightTheme,style:{width:"100%"},children:c.jsxs(st,{height:"100%",verticalAlign:"start",children:[c.jsx(cn,{selectedView:w,onSelectedView:_,currentDate:x,setCurrentDate:C,onWeekChange:I,onMonthChange:E,onDayChange:A,strings:null==d?void 0:d.toolbar}),c.jsx(M,{})]})})})},exports.CalendarMonth=tn,exports.Card=tt,exports.Carousel=e=>{const{className:t,items:n,title:r}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{carouselStyles:u}=ht(e),[d,h]=y(),m=mt(),{enableControls:g,embla__slide:b,embla__container:x,embla__viewport:C,embla__buttons:w}=pt(0,i),{prevBtnDisabled:S,nextBtnDisabled:k,onPrevButtonClick:P,onNextButtonClick:E}=dt(h);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),a(o.current.clientWidth),l(o.current.clientHeight),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsxs("div",{id:"-carousel",className:p.mergeClasses(t,"embla"),style:{...u(i,s)},ref:o,children:[c.jsxs("div",{className:g,children:[c.jsx(p.Subtitle2,{className:m.titleStyles,children:r}),c.jsxs("div",{className:w,children:[c.jsx(p.Button,{onClick:P,disabled:S,appearance:"subtle",icon:c.jsx(v.ChevronLeftRegular,{})}),c.jsx(p.Button,{onClick:E,disabled:k,appearance:"subtle",icon:c.jsx(v.ChevronRightRegular,{})})]})]}),c.jsx("div",{className:C,ref:d,children:c.jsx("div",{className:x,children:n.map((e,t)=>c.jsx("div",{className:b,children:e},t))})})]})})},exports.Center=ct,exports.ChatInput=oc,exports.ChatInputWithMensions=lc,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:n,placeholder:r,onSend:o,theme:i=p.webLightTheme,isRunning:a,onAbort:s})=>{const[l,d]=u.useState(n||""),[h,m]=u.useState(!1),f=u.useRef(null),[g,y]=u.useState({top:0,left:0}),[v,b]=u.useState([]),x=u.useRef({}),C=sc();u.useEffect(()=>{var e;null==(e=f.current)||e.focus(),d(n||"")},[n]);const w=u.useCallback(Ke(async t=>{const n=await(async t=>{var n,r;if(x.current[t])return x.current[t];if(!(null==e?void 0:e.graphClient))return console.warn("Graph client not available"),[];try{const o=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",i=await e.graphClient.get(o),a=(null==i?void 0:i.value)||[],s=(null==(r=null==(n=e.pageContext)?void 0:n.web)?void 0:r.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),x.current[t]=a,a}catch(o){return console.error("Error fetching users from Graph:",o),[]}})(t);n.sort((e,t)=>e.displayName.localeCompare(t.displayName)),b(n),m(!0),setTimeout(()=>{var e;null==(e=f.current)||e.focus()},0)},300),[e]),S=e=>{var n;const r=l.replace(/@(\w*)$/,`@${e} `);d(r),t&&t(r),m(!1),b([]),null==(n=f.current)||n.focus()},k=u.useCallback(({users:e})=>c.jsxs("div",{className:C.listContainer,children:[0===e.length&&c.jsx(p.Caption1,{children:"No users found"}),e.map(e=>c.jsx(p.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>S(e.mail),children:c.jsx(p.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,S]);return c.jsxs(st,{horizontal:!0,width:"100%",className:C.inputContainer,children:[c.jsx(oc,{ref:f,onSend:o,value:l,onChange:async e=>{var n;d(e),t&&t(e),null==(n=f.current)||n.focus();const r=e.lastIndexOf("@");if(-1===r||0!==r&&" "!==e[r-1])m(!1);else{const t=e.slice(r+1);await w(t);const n=f.current;if(n){const e=O(n,r),t=n.getBoundingClientRect(),o=t.top+e.top+22,i=t.left+e.left+16;y({top:o,left:i})}}},theme:i,placeholder:r,isRunning:a,onAbort:s}),c.jsxs(ft,{theme:i,anchorPoint:g,isOpen:h,onClose:()=>m(!1),excludeRefs:[f],children:[c.jsx(p.CardHeader,{header:c.jsx(p.Body1Strong,{className:C.sugestionsHeader,children:"Sugestions"})}),c.jsx(p.Divider,{}),c.jsx(k,{users:v})]})]})},exports.Container=e=>{const{className:t,children:n,style:r,alignItems:o="center",justifyContent:i="center",flexDirection:a="row",centerContent:s=!0}=e,l=L.useRef(null),[u,d]=L.useState(0),[p,h]=L.useState(0),{containerStyles:g}=ut(e),y=L.useMemo(()=>m.debounce(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;d(e),h(n)}},200),[]);return L.useEffect(()=>{const e=new f.ResizeObserver(e=>{y(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),y.cancel()}},[y]),c.jsx("div",{id:"container",className:t,style:{...g(u,p),display:"flex",justifyContent:i,alignItems:o,flexDirection:a,...r},ref:l,children:s?c.jsx(ct,{children:n}):n})},exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:n,renderControl:r,theme:o})=>{const i={container:g.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:g.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:g.css({cursor:"pointer",minWidth:107})},a=L.useCallback(e=>{n&&n(e)},[n]);return c.jsx(p.Overflow,{children:c.jsxs(p.FluentProvider,{theme:o,children:[" ",c.jsxs("div",{className:p.mergeClasses(i.container),children:[e.map(e=>{const n=e.id===t;return c.jsx(p.OverflowItem,{id:e.id,priority:n?2:1,children:r(e,n,()=>a(e.id))},e.id)}),c.jsx(In,{items:e,onSelectedItem:a,theme:o})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:n,defaultSelectedItems:r=[],enableSorting:o=!1,selectionMode:i="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:u,enableResizing:d=!1,noItemsMessage:h,isLoadingData:m,isLoadingDataMessage:f,dataGridBodyClassName:g,dataGridBodyStyles:y,refreshData:v}=e,b=e=>t.findIndex(t=>t===e),[x,C]=L.useState(new Set(r.map(e=>b(e)))),w=L.useRef(null),{styles:S}=vn();L.useEffect(()=>{r.length>0&&C(new Set(r.map(e=>b(e))))},[r,t]),L.useEffect(()=>{v&&C(new Set)},[v]);const k=n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),P=L.useCallback((e,t)=>{e.stopPropagation(),"row"===i&&a&&a([t])},[i,a]),E=L.useMemo(()=>"row"===i?S.rowSelection:"",[i,S.rowSelection]),A=L.useCallback(()=>c.jsx(p.DataGridBody,{style:y??{},className:g??"",children:({item:e,rowId:t})=>c.jsx(p.DataGridRow,{className:E,onClick:t=>P(t,e),children:({renderCell:t})=>c.jsx(p.DataGridCell,{children:t(e)})},t)}),[P,E,y,g]),I=L.useMemo(()=>t.length&&!m,[t,m]),_=L.useCallback(()=>m?c.jsx(c.Fragment,{children:f??c.jsx(yn,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:c.jsx(p.Spinner,{})})}):I?c.jsx(A,{}):m||t.length?c.jsx(c.Fragment,{}):c.jsx("div",{children:h}),[I,m,t,h]);return c.jsx("div",{ref:w,children:c.jsxs(p.DataGrid,{as:"div",items:t,onSelectionChange:(e,n)=>{const r=new Set;if(n.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),C(r),a){const e=Array.from(r).map(e=>t[e]);a(e)}},sortable:o,columns:k,selectionMode:"none"===i||"row"===i?void 0:"multiple"===i?"multiselect":"single"===i?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:u,resizableColumns:d,resizableColumnsOptions:{autoFitColumns:!1},children:[c.jsx(p.DataGridHeader,{children:c.jsx(p.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(p.DataGridHeaderCell,{children:e()})})}),c.jsx(_,{})]})})},exports.DataGridV2=xn,exports.DropdownField=({options:e,onChange:t,renderItem:n,validate:r,label:o,placeholder:i,message:a,messageType:s,required:l,size:d,hint:h})=>{const[m,f]=u.useState(""),[g,y]=u.useState(""),b=L.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),x=L.useMemo(()=>g||a,[g,a]),C=L.useCallback(()=>{switch(b){case"error":return c.jsx(v.ErrorCircle12Filled,{});case"warning":return c.jsx(v.Warning12Filled,{});case"success":return c.jsx(v.CheckmarkCircle12Filled,{});default:return null}},[b]);return c.jsx(p.Field,{label:o,required:l,validationMessage:x,validationMessageIcon:C(),size:d,hint:h,validationState:b,children:c.jsx(p.Dropdown,{placeholder:i,onChange:(e,n)=>{const o=(null==n?void 0:n.value)||"";f(o);const i=r?r(o):"";y(i),!i&&t&&t(o)},value:m,children:e.map(e=>c.jsxs(p.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[n&&n(e)," "]},e.value))})})},exports.EBreakPoints=$,exports.ECalendarViews=Yt,exports.EMessageType=U,exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu();return i?c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsxs(p.MenuButton,{ref:r,children:["+",o," items"]})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(_n,{id:n(e),children:t(e)},n(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:n}=e,{gridStyles:r}=nt(e),o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{className:n,style:r(i,s),ref:o,children:t})})},exports.Layout=e=>{const{className:t,children:n,layoutConfig:r=ot}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{rootStyles:u,layoutGridStyles:d}=rt({...e,layoutConfig:r}),h=((e,t)=>{let n;return L.useCallback((...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return L.useEffect(()=>{if(!o.current)return;const e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(o.current),()=>e.disconnect()},[h]),c.jsx("div",{id:"-Layout",className:p.mergeClasses(t,d),style:{...u(i,s),gridTemplateAreas:r.areas.join(" "),gridTemplateColumns:r.columns,gridTemplateRows:r.rows},ref:o,children:L.Children.map(n,(e,t)=>{var n;if(L.isValidElement(e)){const r=e;return c.jsx("div",{style:{gridArea:(null==(n=r.props)?void 0:n.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:n}=e;return c.jsx(c.Fragment,{children:c.jsx("div",{style:{gridArea:t},children:n})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:n,currentUserEmail:r,strings:o,context:i})=>{var a,s,l,d,p,h,m,f,g,y,b;const{getItemActivities:x}=(e=>{const t=G(),n=e||t,r=null==n?void 0:n.graphClient;return{getItemActivities:u.useCallback(async(e,t,n)=>{if(!r)return console.warn("Graph client not available for SharePoint activities"),{activities:[]};try{const o=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return o&&o.value?{activities:o.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(o){throw console.error("Error fetching SharePoint activities:",o),o}},[r])}})(i),C=new Map([["access",{message:(null==o?void 0:o.access)||(null==(a=vc.get("access"))?void 0:a.message)||"",icon:c.jsx(v.OpenRegular,{style:gc})}],["comment",{message:(null==o?void 0:o.comment)||(null==(s=vc.get("comment"))?void 0:s.message)||"",icon:c.jsx(v.CommentRegular,{style:gc})}],["create",{message:(null==o?void 0:o.create)||(null==(l=vc.get("create"))?void 0:l.message)||"",icon:c.jsx(v.AddRegular,{style:gc})}],["delete",{message:(null==o?void 0:o.delete)||(null==(d=vc.get("delete"))?void 0:d.message)||"",icon:c.jsx(v.DeleteRegular,{style:gc})}],["edit",{message:(null==o?void 0:o.edit)||(null==(p=vc.get("edit"))?void 0:p.message)||"",icon:c.jsx(v.EditRegular,{style:gc})}],["mention",{message:(null==o?void 0:o.mention)||(null==(h=vc.get("mention"))?void 0:h.message)||"",icon:c.jsx(v.MentionRegular,{style:gc})}],["move",{message:(null==o?void 0:o.move)||(null==(m=vc.get("move"))?void 0:m.message)||"",icon:c.jsx(v.ArrowMoveRegular,{style:gc})}],["rename",{message:(null==o?void 0:o.rename)||(null==(f=vc.get("rename"))?void 0:f.message)||"",icon:c.jsx(v.RenameRegular,{style:gc})}],["restore",{message:(null==o?void 0:o.restore)||(null==(g=vc.get("restore"))?void 0:g.message)||"",icon:c.jsx(v.ArrowSyncRegular,{style:gc})}],["share",{message:(null==o?void 0:o.share)||(null==(y=vc.get("share"))?void 0:y.message)||"",icon:c.jsx(v.PeopleRegular,{style:gc})}],["version",{message:(null==o?void 0:o.version)||(null==(b=vc.get("version"))?void 0:b.message)||"",icon:c.jsx(v.HistoryRegular,{style:gc})}]]),[w,S]=L.useState({message:"",icon:c.jsx(c.Fragment,{})}),[k,P]=L.useState(!0),E=L.useRef(void 0),A=L.useRef(void 0),[I]=L.useState(30),_=L.useCallback(e=>e.user.email===r,[r]),T=L.useCallback(e=>{if(!e)return{message:"",icon:c.jsx(c.Fragment,{})};const{action:t,actor:n}=e,{displayName:r}=(null==n?void 0:n.user)||{displayName:""},o=yc.find(e=>t[e]);if(o){const e=C.get(o);if(e){return{message:`${_(n)?"You":r} ${e.message}`,icon:e.icon}}}return{message:"",icon:c.jsx(c.Fragment,{})}},[C,_]);return L.useEffect(()=>{var e;null==(e=A.current)||e.setPlaybackRate(I/100)},[I,k]),L.useEffect(()=>{let r=!1;const o=async(i=1e3)=>{var a;if(e&&t&&n)try{const o=await x(e,t,n);if(r)return;const i=o.activities[0];E.current&&JSON.stringify(E.current)===JSON.stringify(i)||(E.current=i,S(T(i)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):i;return console.warn(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>o(2*t),t)}console.error("Activity Error",s)}finally{r||P(!1)}},i=setTimeout(()=>{o()},1e3);return()=>{clearTimeout(i),r=!0}},[e,t,n,x,T]),c.jsx(B.Fade,{imperativeRef:A,visible:!k,children:c.jsx("div",{children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[w.icon," ",w.message]})})})},exports.LivePersona=pc,exports.Mensions=ac,exports.MensionsExample=({context:e})=>{const[t,n]=u.useState(""),[r,o]=u.useState(""),i=u.useRef(null),a=u.useRef(null);return c.jsxs(st,{RowGap:20,children:[c.jsxs("div",{children:[c.jsx("h3",{children:"Input with @ mentions"}),c.jsx(p.Input,{ref:i,value:t,onChange:(e,t)=>n(t.value),placeholder:"Type @ to mention someone..."}),c.jsx(ac,{context:e,inputValue:t,parentRef:i,mentionChars:["@"],onUserSelect:(e,r)=>{const o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),a=t.replace(o,`${r}${e.displayName} `);n(a),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Mention User",maxSuggestions:8})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Textarea with @ and # mentions"}),c.jsx(p.Textarea,{ref:a,value:r,onChange:(e,t)=>o(t.value),placeholder:"Type @ to mention someone or # for tags...",rows:4}),c.jsx(ac,{context:e,inputValue:r,parentRef:a,mentionChars:["@","#"],onUserSelect:(e,t)=>{const n=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),i=r.replace(n,`${t}${e.displayName} `);o(i),setTimeout(()=>{var e;null==(e=a.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Select User or Tag",maxSuggestions:10,userFilter:(e,t)=>{var n;return e.displayName.toLowerCase().includes(t.toLowerCase())||((null==(n=e.mail)?void 0:n.toLowerCase().includes(t.toLowerCase()))??!1)}})]})]})},exports.Popup=ft,exports.RenderAdaptiveCard=({card:e,data:t})=>{const n=u.useRef(null);return u.useEffect(()=>{if(!n.current)return;n.current.innerHTML="";const r=new D.Template(e).expand({$root:t}),o=new F.AdaptiveCard;null==o||o.parse(r);const i=o.render();i&&n.current.appendChild(i)},[e,t]),c.jsx("div",{ref:n})},exports.RenderDialog=wn,exports.RenderDrawer=e=>{const{isOpen:t,onOpenChange:n,title:r,headerActions:o,footerActions:i,size:a,separator:s,type:l,style:u,children:d,position:p,classNameHeader:h="",classNameBody:m="",classNameFooter:f=""}=e;return c.jsx(c.Fragment,{children:c.jsxs(P.Drawer,{type:l,separator:s,open:t,onOpenChange:(e,t)=>{n&&n(t.open)},size:a,style:u,position:p,children:[c.jsx(P.DrawerHeader,{className:h,children:c.jsx(P.DrawerHeaderTitle,{style:{width:"100%"},action:o,children:r})}),c.jsx(P.DrawerBody,{className:m,children:d}),c.jsx(P.DrawerFooter,{className:f,children:i})]})})},exports.RenderHeader=e=>{const{onDismiss:t,title:n,description:r,icon:o,showCloseButton:i=!0}=e,a=Sn();return c.jsx(c.Fragment,{children:c.jsxs("div",{id:"RenderHedaermain",className:a.renderHeaderContent,children:[c.jsxs("div",{className:a.renderHeaderHeader,children:[c.jsx(p.Button,{style:{display:i?"block":"none"},appearance:"subtle",className:a.closeButton,onClick:e=>{e.stopPropagation(),e.preventDefault(),t(!1)},icon:c.jsx(v.Dismiss24Regular,{})}),c.jsxs("div",{className:a.renderHeaderTitleContainer,children:[L.isValidElement(o)?o:c.jsx(x.Icon,{icon:o}),c.jsxs("div",{className:a.dialogTitleAndDescriptionContainer,children:[L.isValidElement(n)?n:c.jsx(p.Subtitle1,{className:a.renderHeaderTitle,children:n}),L.isValidElement(r)?r:c.jsx(p.Caption1,{className:a.renderHeaderDescription,children:r})]})]})]}),c.jsx("div",{className:a.divider})]})})},exports.RenderLabel=bt,exports.RenderSpinner=e=>{const{size:t,label:n,labelPosition:r,style:o,className:i}=e,a=xt();return c.jsx("div",{className:a.root,children:c.jsx(p.Spinner,{style:o,className:p.mergeClasses(a.spinner,i),size:t,label:n,labelPosition:r})})},exports.SelectDay=Kt,exports.SelectMonth=nn,exports.SelectView=({onChange:e,defaultKey:t,label:n,options:r=[]})=>{const[o,i]=u.useState(()=>r.map(e=>({...e,selected:e.key===(t??"status")})));u.useEffect(()=>{const t=o.find(e=>e.selected);t&&e(t.key)},[]);const a=u.useCallback(t=>{const n=o.map(e=>({...e,selected:e.key===t.key}));i(n),e(t.key)},[o,e]);return c.jsxs(yt,{gap:"s",alignItems:"center",children:[n&&c.jsx(p.Label,{children:n}),c.jsx(kt,{options:o,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=sn,exports.ShareDialog=({isOpen:e,options:t,onClose:n})=>{const[r,o]=u.useState(void 0);console.log(r);const i=u.useRef(null),[a,s]=u.useState(400),{siteUrl:l,listId:d,itemId:p,name:h}=t,m=u.useCallback(()=>{n()},[n]),f=u.useCallback(e=>{if(e.origin!==window.location.origin)return;console.log("Message from iframe:",e.data);const{name:t,height:n}=JSON.parse(e.data);switch(t){case"share_dismiss":m();break;case"share_resize":s(n)}},[m]);return u.useEffect(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),u.useEffect(()=>{if(e){const e="sharePoint",t=0,n="",r=(new Date).getTime(),i=!1,a=encodeURIComponent(window.location.origin),s=encodeURIComponent(h),c=`${l}/_layouts/15/sharedialog.aspx?listId=${d}&listItemId=${p}&clientId=${e}&policyTip=${t}&folderColor=${n}&clickTime=${r}&ma=0&fullScreenMode=${i}&itemName= ${s}&channelId=&origin=${a}`;console.log(c),o(c)}else o(void 0)},[e,l,d,p]),c.jsx(wn,{isOpen:e,onDismiss:m,maxHeight:"fit-content",children:c.jsx("iframe",{ref:i,src:r||"",style:{width:"100%",height:a,border:"none"},onLoad:()=>console.log("Iframe loaded")})})},exports.ShowError=({title:e,message:t})=>{const n=kn();return c.jsx(p.Card,{className:n.container,children:c.jsxs(yt,{gap:"l",alignItems:"center",children:[c.jsx(v.ErrorCircleRegular,{className:n.icon}),c.jsxs(yt,{gap:"s",alignItems:"center",children:[c.jsx(p.Title3,{className:n.title,children:e}),c.jsx(p.Body1,{className:n.message,children:t})]})]})})},exports.ShowMessage=En,exports.Space=e=>{const t=L.useRef(null),[n,r]=L.useState(0),{spaceStyles:o}=it(e);return L.useEffect(()=>{let e;return t.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e}=t.contentRect;r(e)}}),e.observe(t.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{id:"-space",style:o(n),ref:t})})},exports.Stack=st,exports.StackItem=e=>{const{children:t,grow:n,disableShrink:r,shrink:o,order:i,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=Z(),u=L.useRef(null),[d,p]=L.useState(0),[h,m]=L.useState(0),g=l(e,d,h);L.useEffect(()=>{let e;return u.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;p(e),m(n)}}),e.observe(u.current)),()=>{e&&e.disconnect()}},[]);const y={...g,alignSelf:a,order:i,height:s?"100%":"auto",flexGrow:n?"boolean"==typeof n?1:n:void 0,flexShrink:r||!n&&!o?0:1,minWidth:0,minHeight:0,width:"auto"};return c.jsx(c.Fragment,{children:c.jsx("div",{ref:u,style:y,children:t})})},exports.StackV2=yt,exports.StackedUsers=({users:e,maxVisible:t=5,avatarSize:n=32,showHoverCard:r=!0,context:o,className:i,layout:a="stack",overflowText:s})=>{const l={container:g.css({display:"flex",alignItems:"center",gap:"4px"}),stackLayout:g.css({"& > *:not(:first-child)":{marginLeft:"-8px"}}),spreadLayout:g.css({display:"flex",flexDirection:"row",gap:"8px","& > *":{marginLeft:"0"}}),userCardWrapper:g.css({position:"relative",zIndex:1,transition:"transform 0.2s ease, z-index 0.2s ease","&:hover":{transform:"scale(1.1)",zIndex:10}}),overflowButton:g.css({backgroundColor:p.tokens.colorNeutralBackground1,border:`2px solid ${p.tokens.colorNeutralStroke1}`,borderRadius:"50%",color:p.tokens.colorNeutralForeground1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600,minWidth:"32px",minHeight:"32px",position:"relative",zIndex:1,transition:"all 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:g.css({maxWidth:"300px",padding:"12px"}),popoverUserList:g.css({display:"flex",flexDirection:"column",gap:"8px"}),popoverUserCard:g.css({padding:"4px",borderRadius:"4px",transition:"background-color 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover}})},{visibleUsers:d,overflowUsers:h}=u.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),m=u.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?o?c.jsxs(yt,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${i||""}`,children:[d.map((e,t)=>c.jsx("div",{className:l.userCardWrapper,children:c.jsx(fc,{userId:e.id,avatarSize:n,showHoverCard:r??!0,context:o,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&c.jsxs(p.Popover,{withArrow:!0,children:[c.jsx(p.PopoverTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Button,{className:l.overflowButton,style:{width:`${n}px`,height:`${n}px`,fontSize:n>40?"14px":"12px"},appearance:"subtle",children:m})}),c.jsx(p.PopoverSurface,{className:l.popover,children:c.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>c.jsx("div",{className:l.popoverUserCard,children:c.jsx(fc,{userId:e.id,avatarSize:32,showHoverCard:r??!0,context:o,textPosition:"after",avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(console.warn("StackedUsers: context is required to display user cards"),null):null},exports.TypographyControl=e=>{const{fontSize:t,fontWeight:n,numberOfLines:r,as:o,padding:i,paddingTop:a,paddingBottom:s,paddingLeft:l,paddingRight:u,margin:d,marginTop:h,marginBottom:m,marginLeft:f,marginRight:y,children:v,style:b,className:x,color:C,block:w,truncate:S,wrap:k}=e,P=g.css({color:C,fontSize:t&&Ct[t]?Ct[t]:t,fontWeight:n&&St[n]?St[n]:n,display:r?"-webkit-box":void 0,WebkitBoxOrient:"vertical",overflow:r?"hidden":void 0,WebkitLineClamp:r,padding:i&&wt[i]?wt[i]:i,paddingTop:a&&wt[a]?wt[a]:a,paddingBottom:s&&wt[s]?wt[s]:s,paddingLeft:l&&wt[l]?wt[l]:l,paddingRight:u&&wt[u]?wt[u]:u,margin:d&&wt[d]?wt[d]:d,marginTop:h&&wt[h]?wt[h]:h,marginBottom:m&&wt[m]?wt[m]:m,marginLeft:f&&wt[f]?wt[f]:f,marginRight:y&&wt[y]?wt[y]:y,...b});return c.jsx(p.Text,{as:o,className:p.mergeClasses(x,P),block:w,truncate:S,wrap:k,children:v})},exports.UniversalProvider=({context:e,children:t})=>c.jsx(J.Provider,{value:e,children:t}),exports.UserCard=fc,exports.VideoPlayer=e=>{const{url:t,controls:n=!0,width:r="100%",height:o="100%",loop:i=!1,muted:a=!1}=e,[s,l]=u.useState(!1),d=Tn(e);return c.jsxs("div",{className:d.videoPlayerContainer,children:[c.jsx(E,{url:t,controls:n,width:r,height:o,playing:s,loop:i,muted:a,onPause:()=>l(!1),onPlay:()=>l(!0),className:d.reactPlayer}),!s&&c.jsx(p.Button,{className:p.mergeClasses(d.playButton),onClick:()=>{l(!s)},children:"►"})]})},exports.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>e(t));if(t instanceof Object){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}return t},exports.debounce=Ke,exports.defaultCalendarControlStrings=pn,exports.defaultCalendarMonthStrings=en,exports.defaultSelectWeekStrings=rn,exports.every=function(e,t){return e.every(t)},exports.filter=function(e,t){return e.filter(t)},exports.get=function(e,t,n){const r=Array.isArray(t)?t:t.split(".");let o=e;for(const i of r){if(null==o)return n;o=o[i]}return void 0===o?n:o},exports.groupBy=function(e,t){return e.reduce((e,n)=>{const r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})},exports.isEmpty=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)},exports.map=function(e,t){return e.map(t)},exports.set=function(e,t,n){const r=Array.isArray(t)?t:t.split("."),o=r.pop();if(!o)return e;let i=e;for(const a of r)a in i&&"object"==typeof i[a]||(i[a]={}),i=i[a];return i[o]=n,e},exports.some=function(e,t){return e.some(t)},exports.throttle=function(e,t=0){let n=null,r=0;return function(...o){const i=this,a=Date.now();r||(r=a);const s=t-(a-r);s<=0||s>t?(n&&(clearTimeout(n),n=null),r=a,e.apply(i,o)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(i,o)},s))}},exports.uniq=function(e){return Array.from(new Set(e))},exports.uniqBy=function(e,t){const n=new Set;return e.filter(e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)})},exports.useApplicationContext=G,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:n}=Z();return{aspectRatioStyles:L.useCallback((r,o)=>({...n(e,r,o),...t}),[n,e,t])}},exports.useCalendar=Jt,exports.useCalendarStyles=Mt,exports.useCardStyles=et,exports.useCarouselStyles=pt,exports.useCarouselStylesMain=ht,exports.useCenterStyles=lt,exports.useComponentUtils=Z,exports.useContainerStyles=ut,exports.useDataGridStyles=vn,exports.useDateUtils=(e,t,n)=>{const{getFormatRelative:r,formatDate:o}=Ze(t,e);return{formatUtcDate:(e,t="PP")=>{const n=h.differenceInDays(new Date,h.parseISO(e));let i="";return void 0!==e&&(i=n>7?o(e,t):r(e)),i},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{const r="string"==typeof n?new Date(n):n,o=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r);let i,a,s,l,c,u;for(const e of o)switch(e.type){case"year":i=e.value;break;case"month":a=e.value;break;case"day":s=e.value;break;case"hour":l=e.value;break;case"minute":c=e.value;break;case"second":u=e.value}return new Date(`${i}-${a}-${s}T${l}:${c}:${u}Z`)}}},exports.useDayViewStyles=Gt,exports.useGraphAPI=()=>{const e=G(),t=null==e?void 0:e.graphClient;return{getUser:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get(`/users/${e}`)}catch(n){return console.error("Error fetching user:",n),null}},[t]),getCurrentUser:u.useCallback(async()=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get("/me")}catch(e){return console.error("Error fetching current user:",e),null}},[t]),searchUsers:u.useCallback(async(e,n=10)=>{if(!t)return console.warn("Graph client not available"),[];try{return(await t.get(`/users?$search="displayName:${e}" OR "mail:${e}"&$top=${n}`)).value||[]}catch(r){return console.error("Error searching users:",r),[]}},[t]),getUserPhoto:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{const n=await t.get(`/users/${e}/photo/$value`);return URL.createObjectURL(n)}catch(n){return console.error("Error fetching user photo:",n),null}},[t]),graphClient:t}},exports.useGridStyles=nt,exports.useImageUtils=()=>{const e=u.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),t=u.useCallback(async(e,t,n)=>new Promise((r,o)=>{const i=new Image;i.crossOrigin="anonymous",i.addEventListener("load",()=>{var e;const a=document.createElement("canvas");let s;a.width=t??i.width,a.height=n??i.height,null==(e=null==a?void 0:a.getContext("2d"))||e.drawImage(i,0,0,t??i.width,n??i.height);try{s=a.toDataURL("image/png",1),r(s)}catch(l){Qe&&console.error(`[ImageService.getBase64Image]: Err='${l.message}'`),o(l)}}),i.addEventListener("error",e=>{Qe&&console.error(`[ImageService.getBase64Image]: Image load error='${e.message}'`),o(e)}),i.src=e}),[]),n=u.useCallback(e=>!m.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:u.useCallback(e=>{try{const t=document.getElementById(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");null==r||r.drawImage(t,0,0);return n.toDataURL("image/png")}catch(t){return void(Qe&&console.error(`[getBase64ImageFromDOMImg]: Err='${t.message}'`))}},[]),isBase64Image:n,getImageBase64:t,base64FromSVGUrl:e}},exports.useIndexedDBCache=X,exports.useLayoutStyles=rt,exports.useLogging=q,exports.useMensionsStyles=ic,exports.usePolling=Y,exports.usePrevNextButtons=dt,exports.useRenderHeaderStyles=Sn,exports.useShowErrorStyles=kn,exports.useShowMessageStyles=Pn,exports.useSpaceStyles=it,exports.useStackStyles=at,exports.useStyles=()=>({inputContainer:g.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:p.tokens.borderRadiusMedium}}),listContainer:g.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),sugestionsHeader:g.css({color:p.tokens.colorBrandBackground})}),exports.useTimeZoneHelper=()=>{const e=G(),t=u.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:t,convertToUserTimeZone:(e,n)=>{const r=n||t;return d.toZonedTime(e,r)},convertFromUserTimeZone:(e,n)=>{const r=n||t;return d.fromZonedTime(e,r)},formatInTimeZone:(e,n,r)=>{const o=r||t;return d.format(d.toZonedTime(e,o),n,{timeZone:o})},getUserTimeZone:()=>{var n,r;return null==(r=null==(n=null==e?void 0:e.pageContext)?void 0:n.user)||r.preferUserTimeZone,t}}},exports.useUtils=At,exports.useVideoStyles=Tn,exports.useWeekViewStyles=Vt;
|
|
201
201
|
//# sourceMappingURL=index.js.map
|