@spteck/react-controls-v2 2.4.0 → 2.4.1
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/iconButton/IconButtonProps.d.ts +2 -0
- package/dist/index.cjs +28 -28
- package/dist/index.js +910 -781
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./LocalizationProvider-BbfcY9z3.cjs`);let t=require(`react`);t=e.E(t);let n=require(`react/jsx-runtime`),r=require(`date-fns-tz`),i=require(`@fluentui/react-components`),a=require(`date-fns`),o=require(`date-fns/locale`),s=require(`lodash`),c=require(`@juggle/resize-observer`),l=require(`@emotion/css`),u=require(`embla-carousel-react`);u=e.E(u);let d=require(`@fluentui/react-icons`),f=require(`react-dom`);f=e.E(f);let p=require(`@iconify/react`),m=require(`uuid`),h=require(`@fluentui/react-calendar-compat`),g=require(`@emotion/react`),_=require(`@emotion/react/jsx-runtime`),v=require(`@fluentui-contrib/react-data-grid-react-window`),y=require(`react-player`);y=e.E(y);let b=require(`react-map-gl/maplibre`);b=e.E(b);let x=require(`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./LocalizationProvider-BbfcY9z3.cjs`);let t=require(`react`);t=e.E(t);let n=require(`react/jsx-runtime`),r=require(`date-fns-tz`),i=require(`@fluentui/react-components`),a=require(`date-fns`),o=require(`date-fns/locale`),s=require(`lodash`),c=require(`@juggle/resize-observer`),l=require(`@emotion/css`),u=require(`embla-carousel-react`);u=e.E(u);let d=require(`@fluentui/react-icons`),f=require(`react-dom`);f=e.E(f);let p=require(`@iconify/react`),m=require(`uuid`),h=require(`@fluentui/react-calendar-compat`),g=require(`@emotion/react`),_=require(`@emotion/react/jsx-runtime`),v=require(`@fluentui-contrib/react-data-grid-react-window`),y=require(`react-player`);y=e.E(y);let b=require(`react-map-gl/maplibre`);b=e.E(b);let x=require(`adaptivecards`);x=e.E(x);let S=require(`nano-css`),C=require(`markdown-it`);C=e.E(C);let w=require(`react-dom/client`),T=require(`adaptivecards/lib/card-elements`),E=require(`adaptivecards/lib/enums`),D=require(`@fluentui/react-datepicker-compat`),O=require(`@fluentui/react-timepicker-compat`),k=require(`adaptivecards-templating`),A=require(`textarea-caret`);A=e.E(A);let j=require(`@fluentui-contrib/react-chat`),M=require(`dompurify`);M=e.E(M);let N=require(`mermaid`);N=e.E(N);let ee=require(`@fluentui/react-motion-components-preview`);var P=function(e){return e[e.XXXLarge=1900]=`XXXLarge`,e[e.ExtraExtraLarge=1400]=`ExtraExtraLarge`,e[e.ExtraLarge=1200]=`ExtraLarge`,e[e.Large=992]=`Large`,e[e.Medium=768]=`Medium`,e[e.Small=576]=`Small`,e[e.ExtraSmall=320]=`ExtraSmall`,e}({}),F=function(e){return e.INFO=`info`,e.ERROR=`error`,e.SUCCESS=`success`,e}({}),I=(0,t.createContext)(void 0),L=({context:e,children:t})=>(0,n.jsx)(I.Provider,{value:e,children:t}),R=()=>(0,t.useContext)(I),z=()=>{let t=R()?.loggingProvider;return{log:(n,r=e.T.Info,i)=>{t?t.log(n,r,i):console.log(n,i)},error:(e,n,r)=>{t?t.error(e,n,r):console.error(e,n,r)},warn:(e,n)=>{t?t.warn(e,n):console.warn(e,n)},info:(e,n)=>{t?t.info(e,n):console.info(e,n)},verbose:(e,n)=>{t?t.verbose(e,n):console.debug(e,n)},LogLevel:e.T,ErrorType:e.w}},te=()=>{let e=R()?.graphClient,{warn:n,error:r}=z();return{getUser:(0,t.useCallback)(async t=>{if(!e)return n(`Graph client not available`),null;try{return await e.get(`/users/${t}`)}catch(e){return r(`Error fetching user:`,e instanceof Error?e:void 0),null}},[e]),getCurrentUser:(0,t.useCallback)(async()=>{if(!e)return n(`Graph client not available`),null;try{return await e.get(`/me`)}catch(e){return r(`Error fetching current user:`,e instanceof Error?e:void 0),null}},[e]),searchUsers:(0,t.useCallback)(async(t,i=10)=>{if(!e)return n(`Graph client not available`),[];try{return(await e.get(`/users?$search="displayName:${t}" OR "mail:${t}"&$top=${i}`)).value||[]}catch(e){return r(`Error searching users:`,e instanceof Error?e:void 0),[]}},[e]),getUserPhoto:(0,t.useCallback)(async t=>{if(!e)return n(`Graph client not available`),null;try{let n=await e.get(`/users/${t}/photo/$value`);return URL.createObjectURL(n)}catch(e){return r(`Error fetching user photo:`,e instanceof Error?e:void 0),null}},[e]),graphClient:e}},ne=()=>{let e=R()?.storageProvider,{warn:n,error:r}=z();return{getCachedData:(0,t.useCallback)(async t=>{if(!e){n(`Storage provider not available`);return}try{return await e.get(t)}catch(e){r(`Error reading from cache:`,e instanceof Error?e:void 0);return}},[e]),setCachedData:(0,t.useCallback)(async(t,i,a)=>{if(!e){n(`Storage provider not available`);return}try{await e.set(t,i,a)}catch(e){r(`Error writing to cache:`,e instanceof Error?e:void 0)}},[e]),removeCachedData:(0,t.useCallback)(async t=>{if(!e){n(`Storage provider not available`);return}try{await e.remove(t)}catch(e){r(`Error removing from cache:`,e instanceof Error?e:void 0)}},[e]),clearCache:(0,t.useCallback)(async()=>{if(!e){n(`Storage provider not available`);return}try{await e.clear()}catch(e){r(`Error clearing cache:`,e instanceof Error?e:void 0)}},[e])}},re=(e,n,r=!0)=>{let[i,a]=(0,t.useState)(!1),o=(0,t.useRef)(null),s=(0,t.useRef)(e);(0,t.useEffect)(()=>{s.current=e},[e]);let c=(0,t.useCallback)(()=>{o.current||=(a(!0),r&&s.current(),setInterval(()=>{s.current()},n))},[n,r]),l=(0,t.useCallback)(()=>{o.current&&(clearInterval(o.current),o.current=null,a(!1))},[]);return(0,t.useEffect)(()=>()=>{l()},[l]),{startPolling:c,stopPolling:l,isPolling:i}},ie=()=>{let e=R(),n=(0,t.useMemo)(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:n,convertToUserTimeZone:(e,t)=>(0,r.toZonedTime)(e,t||n),convertFromUserTimeZone:(e,t)=>(0,r.fromZonedTime)(e,t||n),formatInTimeZone:(e,t,i)=>{let a=i||n;return(0,r.format)((0,r.toZonedTime)(e,a),t,{timeZone:a})},getUserTimeZone:()=>(e?.pageContext?.user?.preferUserTimeZone,n)}},ae=()=>{let{verbose:e,error:n}=z();return{parseSSEResponse:(0,t.useCallback)((t,r={})=>{let{stripMarkdown:i=!0,debug:a=!1}=r;if(!t||typeof t!=`string`)return{data:void 0,rawText:``,isJson:!1,error:`Invalid input: rawResponse must be a non-empty string`};try{a&&(e(`[useAIAssistantParser] Raw SSE input (full):`,t),e(`[useAIAssistantParser] Raw SSE length:`,t.length));let n=t.split(`
|
|
2
2
|
`),r=[],o=!1,s=``,c=!1;for(let t=0;t<n.length;t++){let i=n[t];if(a&&t<20&&e(`[useAIAssistantParser] Line ${t}:`,JSON.stringify(i)),i.startsWith(`event: done`)){s.trim()&&(r.push(s.trim()),s=``);break}if(i.startsWith(`event:`)&&!i.startsWith(`event: done`)){s.trim()&&(r.push(s.trim()),s=``),c=!1;continue}if(i.startsWith(`data: `)){let e=i.substring(6);o=!0,c&&s?s+=`
|
|
3
3
|
`+e:(s=e,c=!0)}else if(i.trim()===``&&!c)continue;else if(c&&i.trim()!==``)s+=`
|
|
4
4
|
`+i;else if(i.trim()===``&&c){let e=t+1;if(e<n.length){let t=n[e];t.startsWith(`event:`)||e===n.length-1||t.trim()===``?(s.trim()&&(r.push(s.trim()),s=``),c=!1):s+=`
|
|
5
5
|
`}}}s.trim()&&r.push(s.trim()),a&&(e(`[useAIAssistantParser] Found ${r.length} data blocks`),r.forEach((t,n)=>{e(`[useAIAssistantParser] Block ${n} (length: ${t.length}):`,t)}));let l,u=[];for(let t of r){let n=t.trim();i&&(n=n.replace(/^```json\s*/i,``).replace(/```\s*$/,``),n=n.trim());try{let t=JSON.parse(n);if(typeof t==`object`&&t){let r=Object.keys(t),i=[`status`,`requestId`,`tokenCount`,`durationMs`];if(r.length>0&&r.every(e=>i.includes(e))){a&&e(`[useAIAssistantParser] Skipping metadata/status-only JSON block:`,n);continue}}l=t,a&&e(`[useAIAssistantParser] Successfully parsed data block as JSON`)}catch{n.match(/^\s*\{\s*["']?status["']?\s*:\s*["']?\w+["']?\s*\}\s*$/)?a&&e(`[useAIAssistantParser] Skipping status-like text block:`,n):(u.push(n),a&&e(`[useAIAssistantParser] Data block is text, adding to text blocks`))}}let d=u.filter(e=>e.trim().length>0).join(`
|
|
6
6
|
`);return a&&(e(`[useAIAssistantParser] Text blocks collected:`,u.length),e(`[useAIAssistantParser] Filtered text blocks:`,u.filter(e=>e.trim().length>0).length),e(`[useAIAssistantParser] Final combined text length:`,d.length),e(`[useAIAssistantParser] Final combined text:`,d)),!o||r.length===0?{data:void 0,rawText:``,isJson:!1,error:`No data found in SSE response. The server may have returned only status messages without actual data.`}:l===void 0?d?(a&&e(`[useAIAssistantParser] No valid JSON found, returning as text`),{data:void 0,rawText:d,isJson:!1}):{data:void 0,rawText:r.join(`
|
|
7
|
-
`),isJson:!1,error:`Could not parse any data blocks as valid JSON`}:(a&&e(`[useAIAssistantParser] Returning last valid JSON`),{data:l,rawText:d,isJson:!0})}catch(e){return a&&n(`[useAIAssistantParser] SSE parsing error:`,e instanceof Error?e:void 0),{data:void 0,rawText:t,isJson:!1,error:e instanceof Error?e.message:`Failed to parse SSE response`}}},[])}},
|
|
7
|
+
`),isJson:!1,error:`Could not parse any data blocks as valid JSON`}:(a&&e(`[useAIAssistantParser] Returning last valid JSON`),{data:l,rawText:d,isJson:!0})}catch(e){return a&&n(`[useAIAssistantParser] SSE parsing error:`,e instanceof Error?e:void 0),{data:void 0,rawText:t,isJson:!1,error:e instanceof Error?e.message:`Failed to parse SSE response`}}},[])}},oe=e=>{let[n,r]=(0,t.useState)(``),[i,a]=(0,t.useState)(!1),[o,s]=(0,t.useState)(null),c=(0,t.useRef)(null),{parseSSEResponse:l}=ae(),{warn:u}=z(),d=(0,t.useRef)(e.conversationId||crypto.randomUUID());return{response:n,isLoading:i,error:o,sendMessage:(0,t.useCallback)(async(t,n)=>{r(``),s(null),a(!0);let i=new AbortController;c.current=i;let o=e.endpoint||`http://localhost:7071/api/EventAssistant`;o.endsWith(`/`)&&(o=o.slice(0,-1));try{let a=t.input;t.history&&t.history.length>0&&(a=`${t.history.join(`
|
|
8
8
|
|
|
9
|
-
`)}\n\n${t.input}`);let s={input:a,instructions:t.instructions,mode:void 0,conversationId:d.current,mcpServers:t.mcpServers||e.mcpServers},c=await fetch(o,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`text/event-stream`,...e.requestHeaders&&Object.keys(e.requestHeaders).length>0?e.requestHeaders:{}},body:JSON.stringify(s),signal:i.signal});if(!c.ok){let e=``;try{let t=await c.text();t&&(e=` - ${t}`)}catch{}throw Error(`HTTP error! status: ${c.status}${e}`)}let f=c.body?.getReader();if(!f)throw Error(`No response body`);let p=new TextDecoder(`utf-8`),m=!1,h=``;for(;!m;){let{value:e,done:t}=await f.read();if(m=t,e){let t=p.decode(e,{stream:!0});h+=t}}let g=l(h),_=g.rawText||``;return r(_),n&&n(_),g.error&&u(`[useAIAssistant] Parser warning:`,g.error),_}catch(e){let t=`Error occurred while processing your request.`;throw e instanceof Error&&(t=e.name===`AbortError`?`Request was cancelled.`:e.message.includes(`Rate limit`)||e.message.includes(`429`)?`Rate limit exceeded. Please wait a moment before sending another message.`:e.message.includes(`quota`)?`API quota exceeded. Please try again later.`:e.message),s(t),Error(t)}finally{a(!1)}},[e.endpoint,e.mcpServers,l]),cancelRequest:(0,t.useCallback)(()=>{c.current&&c.current.abort()},[]),resetConversation:(0,t.useCallback)(()=>{d.current=crypto.randomUUID(),r(``),s(null)},[]),conversationId:d.current}},
|
|
9
|
+
`)}\n\n${t.input}`);let s={input:a,instructions:t.instructions,mode:void 0,conversationId:d.current,mcpServers:t.mcpServers||e.mcpServers},c=await fetch(o,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`text/event-stream`,...e.requestHeaders&&Object.keys(e.requestHeaders).length>0?e.requestHeaders:{}},body:JSON.stringify(s),signal:i.signal});if(!c.ok){let e=``;try{let t=await c.text();t&&(e=` - ${t}`)}catch{}throw Error(`HTTP error! status: ${c.status}${e}`)}let f=c.body?.getReader();if(!f)throw Error(`No response body`);let p=new TextDecoder(`utf-8`),m=!1,h=``;for(;!m;){let{value:e,done:t}=await f.read();if(m=t,e){let t=p.decode(e,{stream:!0});h+=t}}let g=l(h),_=g.rawText||``;return r(_),n&&n(_),g.error&&u(`[useAIAssistant] Parser warning:`,g.error),_}catch(e){let t=`Error occurred while processing your request.`;throw e instanceof Error&&(t=e.name===`AbortError`?`Request was cancelled.`:e.message.includes(`Rate limit`)||e.message.includes(`429`)?`Rate limit exceeded. Please wait a moment before sending another message.`:e.message.includes(`quota`)?`API quota exceeded. Please try again later.`:e.message),s(t),Error(t)}finally{a(!1)}},[e.endpoint,e.mcpServers,l]),cancelRequest:(0,t.useCallback)(()=>{c.current&&c.current.abort()},[]),resetConversation:(0,t.useCallback)(()=>{d.current=crypto.randomUUID(),r(``),s(null)},[]),conversationId:d.current}},se=new Set;function ce(e){e.fontFaces.forEach(t=>{let n=`${e.name}|${t.fontWeight}|${t.fontStyle}`;if(se.has(n))return;let r=t.url.split(`.`).pop()?.split(`?`)[0]?.toLowerCase(),i=r&&{woff2:`woff2`,woff:`woff`,ttf:`truetype`,otf:`opentype`,eot:`embedded-opentype`}[r]||`woff2`,a=`@font-face {
|
|
10
10
|
font-family: "${e.name}";
|
|
11
11
|
src: url("${t.url}") format("${i}");
|
|
12
12
|
font-weight: ${t.fontWeight};
|
|
13
13
|
font-style: ${t.fontStyle};
|
|
14
14
|
font-display: swap;
|
|
15
|
-
}`,o=document.createElement(`style`);o.setAttribute(`data-brand-font`,e.name),o.textContent=a,document.head.appendChild(o),ae.add(n)})}function se(e){if(e){if(e.d)return e.d;if(e.BrandFontLibraryUrl||e.SiteUrl)return e}}var ce=new Set([`woff2`,`woff`,`ttf`,`otf`,`eot`]),le={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900};function ue(e,t){let n=(e?.trim()||t.replace(/\.[^.]+$/,``)).toLowerCase(),r=n.includes(`italic`)||n.includes(`oblique`),i=n.replace(/italic|oblique/gi,``).trim().replace(/[\s_-]+/g,``),a=le[i]??400;if(a===400&&i!==`regular`&&i!==`normal`&&i!==``){for(let[e,t]of Object.entries(le))if(i.includes(e)){a=t;break}}return{fontWeight:a,fontStyle:r?`italic`:`normal`}}var de=`_SPFontFamilyName`,fe=`_SPFontFaces`,pe=`_spFontVisible`,me=[{id:`fluent-base`,name:`'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif`,isDefault:!0,fontFaces:[]},{id:`fluent-monospace`,name:`'Cascadia Code', 'Cascadia Mono', Consolas, 'Courier New', monospace`,isDefault:!1,fontFaces:[]},{id:`fluent-numeric`,name:`'Bahnschrift', 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif`,isDefault:!1,fontFaces:[]}],he=(e={})=>{let{siteUrl:n,disabled:r,fonts:i}=e,a=R(),{warn:o,error:s}=z(),[c,l]=(0,t.useState)(i??[]),[u,d]=(0,t.useState)(!r&&!i),[f,p]=(0,t.useState)(),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(!1),_=(0,t.useCallback)(async()=>{if(r)return;let e=n??a?.pageContext?.web?.absoluteUrl;if(!e){let e=`useBrandCenterFonts: no siteUrl provided and pageContext.web.absoluteUrl is not available.`;o(e),p(e),d(!1);return}d(!0),p(void 0);try{let t=`${e}/_api/SP.BrandCenter/Configuration`,n=async t=>{if(a?.graphClient)return a.graphClient.get(t);let n={Accept:`application/json;odata=nometadata`};a?.authProvider&&(n.Authorization=`Bearer ${await a.authProvider.getAccessToken([`${new URL(e).origin}/.default`])}`);let r=await fetch(t,{credentials:a?.authProvider?void 0:`include`,headers:n});if(!r.ok)throw Error(`SharePoint REST returned ${r.status}: ${t}`);return await r.json()},r=se(await n(t)),i=r?.BrandFontLibraryUrl,s=typeof i==`string`?i:i?.DecodedUrl,c=r?.IsBrandCenterSiteFeatureEnabled===!0||String(r?.IsBrandCenterSiteFeatureEnabled).toLowerCase()===`true`;if(!s||!c){o(`useBrandCenterFonts: Brand Center is not configured for this tenant — using Fluent UI 9 defaults.`),h(!1),l(me),d(!1);return}let u=r?.SiteUrl,f=typeof u==`string`?u:u?.DecodedUrl??e,p=new URL(f).origin,m=s.startsWith(`http`)?new URL(s).pathname:s,g=await n(`${f}/_api/web/GetList('${encodeURIComponent(m)}')/items?$select=Id,FileLeafRef,FileRef,${de},${fe},${pe},File/Name,File/ServerRelativeUrl&$expand=File&$top=5000`),_=g.d?.results??g.value??[],v=new Map;for(let e of _){let t=e.File?.Name??e.FileLeafRef??``,n=t.split(`.`).pop()?.toLowerCase()??``;if(!ce.has(n)||e[pe]===!1)continue;let r=e[de]??t.replace(/\.[^.]+$/,``).split(/[-_]/)[0]??t,i=v.get(r);i?i.items.push(e):v.set(r,{items:[e]})}let y=[];for(let[e,t]of v){let n=[];for(let e of t.items){let t=e.File?.Name??e.FileLeafRef??``,r=e.File?.ServerRelativeUrl??e.FileRef??``;if(!r)continue;let i=e[fe],{fontWeight:a,fontStyle:o}=ue(i,t),s=`${p}${r}`;n.push({url:s,fontWeight:a,fontStyle:o})}n.length>0&&y.push({id:e,name:e,isDefault:!1,fontFaces:n})}y.length>0&&!y.some(e=>e.isDefault)&&(y[0].isDefault=!0),y.forEach(oe),l(y),h(!0)}catch(e){let t=e instanceof Error?e.message:String(e);s(`useBrandCenterFonts: failed to load fonts — falling back to Fluent UI 9 defaults`,e instanceof Error?e:void 0),p(t),h(!1),l(me)}finally{d(!1)}},[r,n,a?.pageContext?.web?.absoluteUrl,a?.graphClient,a?.authProvider]);(0,t.useEffect)(()=>{if(i){i.forEach(oe);return}!g.current&&!r&&(g.current=!0,_())},[_,i,r]);let v=c.find(e=>e.isDefault);return{fonts:c,fontFamilyNames:c.map(e=>e.name),defaultFont:v,loading:u,error:f,isBrandCenterAvailable:m,refresh:_}},V=()=>{let e=t.useCallback((e,t)=>`${e}${t}`,[]),n=t.useCallback(e=>{if(!e)return!1;try{return!!new URL(e)}catch{return!1}},[]),r=e=>e.charAt(0)===`/`&&e.charAt(1)===`/`?e.substring(1,e.length):e,a=t.useCallback(e=>e?new RegExp(/^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$/).test(e)===!0:!1,[]),o=t.useCallback(e=>{if(!e)return``;let t=e.split(`/`);return t[t.length-1]},[]),s=t.useCallback(e=>{let t=window.location.hostname,n=`https://${t}`;if(e.indexOf(`${n}/sites/`)>-1||e.indexOf(`${n}/teams/`)>-1){let r=e.split(t)[1].split(`/`)[2],i=`https://${t}/sites/${r}`;return e.indexOf(`${n}/teams/`)>-1&&(i=`https://${t}/teams/${r}`),i}return n},[]),c=t.useCallback(e=>{let t=e.split(window.location.hostname)[1];return t=r(t),t},[]),l=t.useCallback(e=>encodeURIComponent(e.replace(/[%]/g,`%25`)).replace(/[']/g,`%27%27`).replace(/[&]/g,`%26`).replace(/[#]/g,`%23`).replace(/[?]/g,`%3F`).replace(/[/]/g,`%2F`).replace(/[+]/g,`%2B`),[]),u=t.useCallback(e=>e==null?!1:Object.prototype.hasOwnProperty.call(e,`extraSmall`)||Object.prototype.hasOwnProperty.call(e,`small`)||Object.prototype.hasOwnProperty.call(e,`medium`)||Object.prototype.hasOwnProperty.call(e,`large`)||Object.prototype.hasOwnProperty.call(e,`extraLarge`),[]),d=t.useCallback((e,t)=>e[t.toString().toLowerCase()],[]),f=t.useCallback(e=>e>=P.XXXLarge?`XXXLarge`:e>=P.ExtraExtraLarge?`ExtraExtraLarge`:e>=P.ExtraLarge?`ExtraLarge`:e>=Number(P.Large)?`Large`:e>=Number(P.Medium)?`Medium`:e>=Number(P.Small)?`Small`:`ExtraSmall`,[]),p=t.useCallback((e,t)=>{let n=f(t),r={ExtraSmall:`xs`,Small:`s`,Medium:`m`,Large:`l`,ExtraLarge:`xl`,ExtraExtraLarge:`xxl`},i=e;return u(e)&&(i=d(e,n??`Medium`)||r[n]),i},[f,u,d]),m=t.useCallback((e,t,n)=>{if(!e)return`none`;if(typeof e==`string`&&(/^\d+px$/.test(e)||/^\d+%$/.test(e)))return e;let r=n,a={padding:`spacingHorizontal`,vertical:`spacingVertical`,horizontal:`spacingHorizontal`};switch(p(e,t)){case`none`:return i.tokens[`${a[r]}None`];case`xxs`:return i.tokens[`${a[r]}XXS`];case`xs`:return i.tokens[`${a[r]}XS`];case`sNudge`:return i.tokens[`${a[r]}SNudge`];case`s`:return i.tokens[`${a[r]}S`];case`mNudge`:return i.tokens[`${a[r]}MNudge`];case`m`:return i.tokens[`${a[r]}M`];case`l`:return i.tokens[`${a[r]}L`];case`xl`:return i.tokens[`${a[r]}XL`];case`xxl`:return i.tokens[`${a[r]}XXL`];case`xxxl`:return i.tokens[`${a[r]}XXXL`];default:return i.tokens[`${a[r]}M`]}},[p]);return{getCacheKey:e,validateUrl:n,trimBeginDoubleSlash:r,isValidGUID:a,getPageNameFromUrl:o,getSPSiteAbsoluteUrl:s,getFileServerRelativeUrlFromAbsoluteUrl:c,encodeRestUrl:l,getSpacing:m,getCurrentDevice:f,getBaseStyles:t.useCallback((e,t,n)=>{let{verticalSpacing:r,horizontalSpacing:i,paddingLeft:a,paddingRight:o,paddingBottom:s,background:c,width:l,maxWidth:u,height:d,maxHeight:f,marginLeft:p,marginRight:h,marginTop:g,marginBottom:_,paddingTop:v,padding:y,margin:b,styles:x}=e,S=m(v,t,`padding`),C=m(a,t,`padding`),w=m(o,t,`padding`),T=m(s,t,`padding`),E=m(y,t,`padding`),D=m(p,t,`padding`),O=m(h,t,`padding`),k=m(g,t,`padding`),A=m(_,t,`padding`),j=m(b,t,`padding`);E&&(S=S===`none`?E:S,C=C===`none`?E:C,w=w===`none`?E:w,T=T===`none`?E:T),j&&(D=D===`none`?j:D,O=O===`none`?j:O,k=k===`none`?j:k,A=A===`none`?j:A);let M=`${m(r,t,`vertical`)} ${m(i,t,`horizontal`)}`,{padding:N,margin:P,paddingTop:F,paddingLeft:I,paddingRight:L,paddingBottom:R,marginTop:z,marginLeft:ee,marginRight:te,marginBottom:B,...ne}=x??{};return{...ne,gap:M,paddingTop:S,paddingLeft:C,paddingRight:w,paddingBottom:T,marginLeft:D,marginRight:O,marginTop:k,marginBottom:A,background:c,width:l??void 0,height:d??void 0,maxWidth:u??void 0,maxHeight:f??void 0,overflow:`auto`}},[m]),getLayoutBreakPoint:t.useCallback((e,t)=>{let n=f(t),r=e;return u(e)&&(r=d(e,n??`Medium`)||``),r},[f,u,d])}},ge={"en-US":o.enUS,"es-ES":o.es,"fr-FR":o.fr,"de-DE":o.de,"it-IT":o.it,"pt-BR":o.pt,"pt-PT":o.pt,"ja-JP":o.ja,"ko-KR":o.ko,"zh-CN":o.zhCN},_e=(e,t)=>{let n=t&&ge[t]||o.enUS,{error:r}=z();return{getFormatRelative:e=>{try{return(0,a.formatDistanceToNow)(typeof e==`string`?(0,a.parseISO)(e):e,{addSuffix:!0,locale:n})}catch(e){return r(`Error formatting relative time:`,e instanceof Error?e:void 0),``}},convertDateToUTC:e=>{try{let t=typeof e==`string`?(0,a.parseISO)(e):e;return new Date(t.toUTCString())}catch(e){return r(`Error converting to UTC:`,e instanceof Error?e:void 0),new Date}},formatDate:(e,t=`PPpp`)=>{try{return(0,a.format)(typeof e==`string`?(0,a.parseISO)(e):e,t,{locale:n})}catch(e){return r(`Error formatting date:`,e instanceof Error?e:void 0),``}},getTimezoneOffset:()=>new Date().getTimezoneOffset(),convertToTimezone:(n,i)=>{try{let r=typeof n==`string`?(0,a.parseISO)(n):n,o=i||e||Intl.DateTimeFormat().resolvedOptions().timeZone;return r.toLocaleString(t||`en-US`,{timeZone:o})}catch(e){return r(`Error converting timezone:`,e instanceof Error?e:void 0),(typeof n==`string`?new Date(n):n).toString()}}}},ve=(e,t,n)=>{let{getFormatRelative:r,formatDate:i}=_e(t,e);return{formatUtcDate:(e,t=`PP`)=>{let n=(0,a.differenceInDays)(new Date,(0,a.parseISO)(e)),o=``;return e!==void 0&&(o=n>7?i(e,t):r(e)),o},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{let r=typeof n==`string`?new Date(n):n,i=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),a,o,s,c,l,u;for(let e of i)switch(e.type){case`year`:a=e.value;break;case`month`:o=e.value;break;case`day`:s=e.value;break;case`hour`:c=e.value;break;case`minute`:l=e.value;break;case`second`:u=e.value;break;default:break}let d=`${a}-${o}-${s}T${c}:${l}:${u}Z`;return new Date(d)}}},ye=process.env.NODE_ENV!==`production`,be=`data:image/`,xe=()=>{let{error:e}=z(),n=(0,t.useCallback)(async e=>{let t=await fetch(e).then(e=>e.text());return`data:image/svg+xml;base64,`+btoa(t)},[]),r=(0,t.useCallback)(async(t,n,r)=>new Promise((i,a)=>{let o=new Image;o.crossOrigin=`anonymous`,o.addEventListener(`load`,()=>{let t=document.createElement(`canvas`);t.width=n??o.width,t.height=r??o.height,t?.getContext(`2d`)?.drawImage(o,0,0,n??o.width,r??o.height);let s;try{s=t.toDataURL(`image/png`,1),i(s)}catch(t){ye&&e(`[ImageService.getBase64Image]: Err='${t.message}'`),a(t)}}),o.addEventListener(`error`,t=>{ye&&e(`[ImageService.getBase64Image]: Image load error='${t.message}'`),a(t)}),o.src=t}),[]),i=(0,t.useCallback)(e=>!(0,s.isEmpty)(e)&&e.indexOf(be)>=0,[]);return{getBase64ImageFromDOMImg:(0,t.useCallback)(t=>{try{let e=document.getElementById(t),n=document.createElement(`canvas`);return n.width=e.width,n.height=e.height,n.getContext(`2d`)?.drawImage(e,0,0),n.toDataURL(`image/png`)}catch(t){ye&&e(`[getBase64ImageFromDOMImg]: Err='${t.message}'`);return}},[]),isBase64Image:i,getImageBase64:r,base64FromSVGUrl:n}};function Se(e,t=0){let n=null;return function(...r){let i=this;n&&clearTimeout(n),n=setTimeout(()=>{e.apply(i,r)},t)}}function Ce(e,t=0){let n=null,r=0;return function(...i){let a=this,o=Date.now();r||=o;let s=t-(o-r);s<=0||s>t?(n&&=(clearTimeout(n),null),r=o,e.apply(a,i)):n||=setTimeout(()=>{r=Date.now(),n=null,e.apply(a,i)},s)}}function we(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(e=>we(e));if(e instanceof Object){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n]=we(e[n]));return t}return e}function Te(e){return e==null?!0:typeof e==`string`||Array.isArray(e)?e.length===0:typeof e==`object`?Object.keys(e).length===0:!1}function Ee(e,t,n){let r=Array.isArray(t)?t:t.split(`.`),i=e;for(let e of r){if(i==null)return n;i=i[e]}return i===void 0?n:i}function De(e,t,n){let r=Array.isArray(t)?t:t.split(`.`),i=r.pop();if(!i)return e;let a=e;for(let e of r)(!(e in a)||typeof a[e]!=`object`)&&(a[e]={}),a=a[e];return a[i]=n,e}function Oe(e){return Array.from(new Set(e))}function ke(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function Ae(e,t){return e.reduce((e,n)=>{let r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})}function je(e,t){return e.map(t)}function Me(e,t){return e.filter(t)}function Ne(e,t){return e.some(t)}function Pe(e,t){return e.every(t)}var H=function(e){return e.HTML=`html`,e.MARKDOWN=`markdown`,e.ADAPTIVE_CARD=`adaptiveCard`,e.PLAIN_TEXT=`plainText`,e}({}),Fe=e=>{try{let t=JSON.parse(e);return typeof t==`object`&&!!t}catch{return!1}},Ie=e=>{try{let t=JSON.parse(e);return t&&typeof t==`object`&&(t.type===`AdaptiveCard`||t.$schema?.includes(`adaptivecards.io`))}catch{return!1}},Le=e=>{let t=e.trim(),n=[/^<!DOCTYPE\s+html/i,/^<html[\s>]/i,/^<\?xml/i,/<(div|span|p|h[1-6]|table|ul|ol|li|a|img|br|hr|strong|em|b|i)[\s>]/i],r=/<[^>]+>/.test(t),i=/^<[^>]+>/.test(t),a=(t.match(/<(?!\/)[^>]+>/g)||[]).length;return n.some(e=>e.test(t))||r&&i&&a>0},Re=e=>{let t=e.trim(),n=[/^#{1,6}\s+.+$/m,/\*\*.*?\*\*/,/\*.*?\*/,/__.*?__/,/_.*?_/,/\[.*?\]\(.*?\)/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/`[^`]+`/,/^```/m,/^\|.*\|.*\|$/m,/^>\s+/m,/^\s*---\s*$/m].some(e=>e.test(t)),r=/^<[^>]+>/.test(t);return n&&!r},ze=(e,t,n=!1)=>{let r=t.filter(t=>t.test(e)).length/t.length;return n?1-r:r},Be=e=>{if(typeof e==`object`&&e){let t=e;if(t.type===`AdaptiveCard`||t.$schema?.includes(`adaptivecards.io`))return{type:H.ADAPTIVE_CARD,content:e,confidence:1};e=JSON.stringify(e,null,2)}let t=e,n=t.trim();if(!n||n.length<3)return{type:H.PLAIN_TEXT,content:t,confidence:1};if(Fe(n)&&Ie(n))return{type:H.ADAPTIVE_CARD,content:JSON.parse(n),confidence:1};if(Le(n)){let e=Math.max(.7,ze(n,[/^<!DOCTYPE\s+html/i,/^<html[\s>]/i,/<(div|span|p|h[1-6]|table|ul|ol|li)[\s>]/i]));return{type:H.HTML,content:t,confidence:e}}if(Re(n)){let e=Math.max(.6,ze(n,[/^#{1,6}\s+.+$/m,/\*\*.*?\*\*/,/\[.*?\]\(.*?\)/,/^\s*[-*+]\s+/m,/`[^`]+`/,/^```/m,/^\|.*\|.*\|$/m]));return{type:H.MARKDOWN,content:t,confidence:e}}return{type:H.PLAIN_TEXT,content:t,confidence:.5}},Ve=e=>Be(e).type,He=e=>{let{styles:n}=e,{getBaseStyles:r}=V();return{cardStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n]),bodyCardDefaultStyles:t.useMemo(()=>({display:`flex`,flexDirection:`column`,justifyContent:`start`,alignItems:`stretch`,overflow:`unset`}),[])}},Ue=e=>{let{className:r,cardBody:a,cardBodyClassName:o,cardHeader:s,cardHeaderClassName:l,cardHeaderImage:u,cardHeaderAction:d,cardHeaderDescription:f,cardFooterAction:p,cardFooterClassName:m,cardFooterContent:h,cardPreviewImage:g,cardPreviewLogo:_,cardPreviewPosition:v=`top`}=e,{cardStyles:y,bodyCardDefaultStyles:b}=He(e),x=t.useRef(null),[S,C]=t.useState(0),[w,T]=t.useState(0);return t.useEffect(()=>{let e;return x.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;C(e),T(n)}}),e.observe(x.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{ref:x,children:(0,n.jsxs)(i.Card,{className:r,style:y(S,w),...e,children:[g&&v===`top`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),s&&(0,n.jsx)(i.CardHeader,{className:l,image:u,header:s,description:f,action:d}),g&&v===`afterHeader`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),a&&(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(o),style:b,children:a}),g&&v===`bottom`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),h&&(0,n.jsx)(i.CardFooter,{action:p,className:m,children:h})]})})})},We=e=>{let{cols:n,verticalSpacing:r,horizontalSpacing:i,styles:a,gridItemAutoFlow:o,minItemWidth:s}=e,{getSpacing:c,getCurrentDevice:l,getBaseStyles:u}=V();return{gridStyles:t.useCallback((t,d)=>{let f=u(e,t,d),p=`${c(r,t,`vertical`)} ${c(i,t,`horizontal`)}`,m=l(t),h=`repeat(auto-${o??`fill`}, minmax(min(100%, ${s??250}px), 1fr))`;if(n&&n>0){let e=n??0;switch(m){case`ExtraSmall`:e=Math.min(n,1);break;case`Small`:e=Math.min(n,2);break;case`Medium`:e=Math.min(n,3);break;case`Large`:e=Math.min(n,4);break;case`ExtraLarge`:e=Math.min(n,4);break;case`ExtraExtraLarge`:e=Math.min(n,5);break;case`XXXLarge`:e=Math.min(n,6);break;default:e=0}h=`repeat(${e}, minmax(auto, 1fr))`}return{...f,display:`grid`,gridTemplateColumns:h,gap:p,overflow:`hidden`,...a}},[u,e,c,r,i,l,n,a,o,s])}},Ge=e=>{let{children:r,className:i}=e,{gridStyles:a}=We(e),o=t.useRef(null),[s,l]=t.useState(0),[u,d]=t.useState(0);return t.useEffect(()=>{let e;return o.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;l(e),d(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:i,style:a(s,u),ref:o,children:r})})},Ke=e=>{let{maxWith:n}=e,{getBaseStyles:r}=V();return{rootStyles:t.useCallback((t,i)=>({...r(e,t,i),maxWidth:n}),[r,n,e]),layoutGridStyles:(0,l.css)({display:`grid`,overflow:`hidden`})}},qe={areas:[`header header header`,`sidebar content sidebar`,`footer footer footer`],columns:`1fr 3fr 1fr`,rows:`auto 1fr auto`},Je=e=>{let{className:r,children:a,layoutConfig:o=qe}=e,s=t.useRef(null),[l,u]=t.useState(0),[d,f]=t.useState(0),{rootStyles:p,layoutGridStyles:m}=Ke({...e,layoutConfig:o}),h=((e,n)=>{let r;return t.useCallback((...t)=>{clearTimeout(r),r=setTimeout(()=>e(...t),n)},[e,n])})((e,t)=>{u(e),f(t)},200);return t.useEffect(()=>{if(!s.current)return;let e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(s.current),()=>e.disconnect()},[h]),(0,n.jsx)(`div`,{id:`-Layout`,className:(0,i.mergeClasses)(r,m),style:{...p(l,d),gridTemplateAreas:o.areas.join(` `),gridTemplateColumns:o.columns,gridTemplateRows:o.rows},ref:s,children:t.Children.map(a,(e,r)=>t.isValidElement(e)?(0,n.jsx)(`div`,{style:{gridArea:e.props?.area??`area-${r}`},children:e},r):e)})},Ye=e=>{let{area:t,children:r}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{style:{gridArea:t},children:r})})},Xe=e=>{let{verticalSpacing:n,horizontalSpacing:r}=e,{getSpacing:i}=V();return{spaceStyles:t.useCallback(e=>e?r?{width:i(r,e,`horizontal`)}:n?{height:i(n,e,`vertical`)}:{}:{},[i,r,n])}},Ze=e=>{let r=t.useRef(null),[i,a]=t.useState(0),{spaceStyles:o}=Xe(e);return t.useEffect(()=>{let e;return r.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e}=t.contentRect;a(e)}}),e.observe(r.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{id:`-space`,style:o(i),ref:r})})},Qe=e=>{let{horizontal:n,horizontalAlign:r,verticalAlign:i,verticalFill:a,wrap:o,columnGap:s,RowGap:c}=e,{getBaseStyles:l}=V();return{stackStyles:t.useCallback((t,u)=>{let d=i||`start`,f=n?r:`start`,p=n?{flexFlow:o?`row wrap`:`row nowrap`,height:`100%`}:{height:`100%`,maxHeight:`100%`},m=l(e,t,u);return{columnGap:s,rowGap:c,display:`flex`,flexDirection:n?`row`:`column`,alignItems:d,justifyContent:f,...p,height:a?`100%`:m.height,...m,...e.styles}},[l,n,r,e,i,a,o])}},U=e=>{let{children:r,className:i}=e,{stackStyles:a}=Qe(e),o=t.useRef(null),[s,l]=t.useState(0),[u,d]=t.useState(0);return t.useEffect(()=>{let e;return o.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;l(e),d(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:i,style:a(s,u),ref:o,children:r})})},$e=e=>{let{children:r,grow:i,disableShrink:a,shrink:o,order:s,alignSelf:l,verticalFill:u}=e,{getBaseStyles:d}=V(),f=t.useRef(null),[p,m]=t.useState(0),[h,g]=t.useState(0),_=d(e,p,h);return t.useEffect(()=>{let e;return f.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;m(e),g(n)}}),e.observe(f.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{ref:f,style:{..._,alignSelf:l,order:s,height:u?`100%`:`auto`,flexGrow:i?typeof i==`boolean`?1:i:void 0,flexShrink:a||!i&&!o?0:1,minWidth:0,minHeight:0,width:`auto`},children:r})})},et=({ratio:e,children:t,maxWidth:r,maxHeight:i,style:a={},...o})=>{let s={position:`relative`,width:`100%`,paddingTop:`${100/e}%`,maxWidth:r||`none`,maxHeight:i||`none`,...a},c={position:`absolute`,top:0,left:0,width:`100%`,height:`100%`};return(0,n.jsx)(`div`,{style:s,...o,children:(0,n.jsx)(`div`,{style:c,children:t})})},tt=e=>{let{styles:n}=e,{getBaseStyles:r}=V();return{aspectRatioStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n])}},nt=e=>{let{styles:n}=e,{getBaseStyles:r}=V();return{centerStyles:t.useCallback((t,i)=>({...r(e,t,i),...n,overflow:`hidden`,display:`flex`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`}),[r,e,n]),childrenStyles:(0,l.css)({justifyContent:`center`,textAlign:`center`})}},rt=e=>{let{className:r,children:i}=e,a=t.useRef(null),[o,s]=t.useState(0),[l,u]=t.useState(0),{centerStyles:d}=nt(e),f=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}};return t.useEffect(()=>{let e=f(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;s(e),u(n)}},200),t=new c.ResizeObserver(t=>{e(t)});return a.current&&t.observe(a.current),()=>{t.disconnect()}},[]),(0,n.jsx)(`div`,{id:`center`,className:r,style:{...d(o,l),display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`},ref:a,children:i})},it=e=>{let{maxWidth:n}=e,{getBaseStyles:r}=V();return{containerStyles:t.useCallback((t,i)=>!t||!i?{}:{...r(e,t,i),maxWidth:n},[r,n,e])}},at=e=>{let{className:r,children:i,style:a,alignItems:o=`center`,justifyContent:l=`center`,flexDirection:u=`row`,centerContent:d=!0}=e,f=t.useRef(null),[p,m]=t.useState(0),[h,g]=t.useState(0),{containerStyles:_}=it(e),v=t.useMemo(()=>(0,s.debounce)(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;m(e),g(n)}},200),[]);t.useEffect(()=>{let e=new c.ResizeObserver(e=>{v(e)});return f.current&&e.observe(f.current),()=>{e.disconnect(),v.cancel()}},[v]);let y=t.useMemo(()=>{if(!a)return;let{padding:e,margin:t,...n}=a;return n},[a]);return(0,n.jsx)(`div`,{id:`container`,className:r,style:{..._(p,h),display:`flex`,justifyContent:l,alignItems:o,flexDirection:u,...y},ref:f,children:d?(0,n.jsx)(rt,{children:i}):i})},ot=e=>{let[n,r]=(0,t.useState)(!0),[i,a]=(0,t.useState)(!0),o=(0,t.useCallback)(()=>{e&&e.scrollPrev()},[e]),s=(0,t.useCallback)(()=>{e&&e.scrollNext()},[e]),c=(0,t.useCallback)(e=>{r(!e.canScrollPrev()),a(!e.canScrollNext())},[]);return(0,t.useEffect)(()=>{e&&(c(e),e.on(`reInit`,c),e.on(`select`,c))},[e,c]),{prevBtnDisabled:n,nextBtnDisabled:i,onPrevButtonClick:o,onNextButtonClick:s}},st=(e,n)=>{let{getCurrentDevice:r}=V(),a=t.useCallback(()=>{let e=r(n),t=`95%`;switch(e){case`Medium`:t=`45%`;break;case`Large`:t=`calc(95% / 4)`;break;case`ExtraLarge`:t=`calc(95% / 5)`;break;case`ExtraExtraLarge`:t=`calc(95% / 6)`;break;default:t=`95%`;break}return t},[n,r]),o=t.useCallback(()=>{let e=r(n),t=i.tokens.spacingVerticalM;switch(e){case`Medium`:t=i.tokens.spacingVerticalM;break;case`Large`:t=i.tokens.spacingVerticalL;break;case`ExtraLarge`:t=i.tokens.spacingVerticalXL;break;default:t=i.tokens.spacingVerticalM;break}return t},[n,r]);return{enableControls:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:10,padding:5}),embla__viewport:(0,l.css)({overflow:`hidden`,paddingTop:`10px`,paddingBottom:`20px`}),embla__container:(0,l.css)({backfaceVisibility:`hidden`,display:`flex`,touchAction:`pan-y`}),embla:(0,l.css)({".embla":{}}),embla__slide:(0,l.css)({minWidth:0,flex:`0 0 ${a()}`,paddingLeft:`${o()}`}),embla__buttons:(0,l.css)({display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:0,alignItems:`center`})}},ct=e=>{let{styles:n}=e,{getBaseStyles:r}=V();return{carouselStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n])}},lt=()=>({titleStyles:(0,l.css)({display:`-webkit-box`,overflow:`hidden`,textOverflow:`ellipsis`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,textAlign:`start`,height:`25px`})}),ut=e=>{let{className:r,items:a,title:o}=e,s=t.useRef(null),[l,f]=t.useState(0),[p,m]=t.useState(0),{carouselStyles:h}=ct(e),[g,_]=(0,u.default)(),v=lt(),{enableControls:y,embla__slide:b,embla__container:x,embla__viewport:S,embla__buttons:C}=st(e,l),{prevBtnDisabled:w,nextBtnDisabled:T,onPrevButtonClick:E,onNextButtonClick:D}=ot(_);return t.useEffect(()=>{let e;return s.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;f(e),m(n)}}),f(s.current.clientWidth),m(s.current.clientHeight),e.observe(s.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{id:`-carousel`,className:(0,i.mergeClasses)(r,`embla`),style:{...h(l,p)},ref:s,children:[(0,n.jsxs)(`div`,{className:y,children:[(0,n.jsx)(i.Subtitle2,{className:v.titleStyles,children:o}),(0,n.jsxs)(`div`,{className:C,children:[(0,n.jsx)(i.Button,{onClick:E,disabled:w,appearance:`subtle`,icon:(0,n.jsx)(d.ChevronLeftRegular,{})}),(0,n.jsx)(i.Button,{onClick:D,disabled:T,appearance:`subtle`,icon:(0,n.jsx)(d.ChevronRightRegular,{})})]})]}),(0,n.jsx)(`div`,{className:S,ref:g,children:(0,n.jsx)(`div`,{className:x,children:a.map((e,t)=>(0,n.jsx)(`div`,{className:b,children:e},t))})})]})})},dt=e=>{let{direction:t=`horizontal`,resizerSize:n=6}=e,r=t===`horizontal`;return{root:(0,l.css)({position:`relative`,width:`100%`,height:`100%`}),pane:e=>{let t=e===void 0?void 0:typeof e==`number`?`${e}px`:e;return(0,l.css)({overflow:`auto`,position:`relative`,...r?{width:t,height:`100%`}:{height:t,width:`100%`}})},secondaryPane:(0,l.css)({flex:1,overflow:`auto`,position:`relative`,minWidth:0,minHeight:0}),resizer:(0,l.css)({flex:`0 0 auto`,...r?{width:n,cursor:`col-resize`,height:`100%`}:{height:n,cursor:`row-resize`,width:`100%`},backgroundColor:i.tokens.colorNeutralStroke1,transition:`background-color 150ms ease`,userSelect:`none`,zIndex:1}),resizerActive:(0,l.css)({backgroundColor:i.tokens.colorBrandStroke1}),resizerGrip:(0,l.css)({gap:`2px`}),gripDot:(0,l.css)({width:3,height:3,borderRadius:`50%`,backgroundColor:i.tokens.colorNeutralForeground3})}},W={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},G=t.default.memo(t.default.forwardRef(({direction:e=`vertical`,justifyContent:t=`flex-start`,alignItems:r=`stretch`,gap:a,columnGap:o,rowGap:s,margin:c,padding:u,marginTop:d,marginBottom:f,marginLeft:p,marginRight:m,paddingTop:h,paddingBottom:g,paddingLeft:_,paddingRight:v,width:y,height:b,wrap:x=!1,children:S,style:C,className:w,overflow:T,background:E},D)=>(0,n.jsx)(`div`,{ref:D,className:(0,i.mergeClasses)(w,(0,l.css)({display:`flex`,flexDirection:e===`horizontal`?`row`:`column`,justifyContent:t,alignItems:r,gap:a&&W[a]?W[a]:a,columnGap:o&&W[o]?W[o]:o,rowGap:s&&W[s]?W[s]:s,margin:c&&W[c]?W[c]:c,padding:u&&W[u]?W[u]:u,marginTop:d&&W[d]?W[d]:d,marginBottom:f&&W[f]?W[f]:f,marginLeft:p&&W[p]?W[p]:p,marginRight:m&&W[m]?W[m]:m,paddingTop:h&&W[h]?W[h]:h,paddingBottom:g&&W[g]?W[g]:g,paddingLeft:_&&W[_]?W[_]:_,paddingRight:v&&W[v]?W[v]:v,width:y,height:b,overflow:T,flexWrap:x?`wrap`:`nowrap`,backgroundColor:E,...C})),children:S}))),ft=e=>{let{direction:r=`horizontal`,defaultSize:i=`50%`,minSize:a=100,maxSize:o=1/0,minSecondarySize:s=100,resizable:c=!0,onResize:l,onResizeEnd:u,primaryContent:d,secondaryContent:f,className:p,styles:m}=e,h=dt(e),g=r===`horizontal`,_=t.useRef(null),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(!1),[C,w]=t.useState(!1);t.useEffect(()=>{if(y!==null||!_.current)return;let e=_.current.getBoundingClientRect(),t=g?e.width:e.height;if(typeof i==`number`)b(Math.min(Math.max(i,a),o));else if(typeof i==`string`&&i.endsWith(`%`)){let e=parseFloat(i)/100;b(Math.min(Math.max(t*e,a),o))}else b(t/2)},[i,a,o,g,y]);let T=t.useCallback(t=>{if(!_.current)return t;let n=_.current.getBoundingClientRect(),r=(g?n.width:n.height)-(e.resizerSize??6)-s;return Math.min(Math.max(t,a),Math.min(o,r))},[g,o,a,s,e.resizerSize]),E=t.useCallback(e=>{if(!c)return;e.preventDefault(),S(!0);let t=g?e.clientX:e.clientY,n=y??0,r=e=>{let r=T(n+((g?e.clientX:e.clientY)-t));b(r),l?.(r)},i=()=>{if(S(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),v.current){let e=g?v.current.getBoundingClientRect().width:v.current.getBoundingClientRect().height;u?.(e)}};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},[c,g,y,T,l,u]),D=t.useCallback(e=>{if(!c)return;S(!0);let t=e.touches[0],n=g?t.clientX:t.clientY,r=y??0,i=e=>{let t=e.touches[0],i=T(r+((g?t.clientX:t.clientY)-n));b(i),l?.(i)},a=()=>{if(S(!1),document.removeEventListener(`touchmove`,i),document.removeEventListener(`touchend`,a),v.current){let e=g?v.current.getBoundingClientRect().width:v.current.getBoundingClientRect().height;u?.(e)}};document.addEventListener(`touchmove`,i,{passive:!1}),document.addEventListener(`touchend`,a)},[c,g,y,T,l,u]),O=t.useCallback(e=>{if(!c||y===null)return;let t=e.shiftKey?50:10,n=0;if(g?e.key===`ArrowLeft`?n=-t:e.key===`ArrowRight`&&(n=t):e.key===`ArrowUp`?n=-t:e.key===`ArrowDown`&&(n=t),n!==0){e.preventDefault();let t=T(y+n);b(t),l?.(t),u?.(t)}},[c,y,g,T,l,u]);t.useEffect(()=>(x?(document.body.style.userSelect=`none`,document.body.style.cursor=g?`col-resize`:`row-resize`):(document.body.style.userSelect=``,document.body.style.cursor=``),()=>{document.body.style.userSelect=``,document.body.style.cursor=``}),[x,g]);let k=t.useRef(null),A=[h.resizer,C||x?h.resizerActive:``].filter(Boolean).join(` `);return t.useEffect(()=>{if(!c||!k.current)return;let e=k.current,t=e=>E(e),n=e=>D(e),r=e=>O(e),i=()=>w(!0),a=()=>w(!1);return e.addEventListener(`mousedown`,t),e.addEventListener(`touchstart`,n),e.addEventListener(`keydown`,r),e.addEventListener(`mouseenter`,i),e.addEventListener(`mouseleave`,a),()=>{e.removeEventListener(`mousedown`,t),e.removeEventListener(`touchstart`,n),e.removeEventListener(`keydown`,r),e.removeEventListener(`mouseenter`,i),e.removeEventListener(`mouseleave`,a)}},[c,E,D,O]),(0,n.jsxs)(G,{ref:_,className:[h.root,p].filter(Boolean).join(` `),style:{height:`100%`,width:`100%`,...m},direction:g?`horizontal`:`vertical`,overflow:`hidden`,children:[(0,n.jsx)(G,{ref:v,className:h.pane(y??void 0),style:{flex:`0 0 auto`},children:d}),c&&(0,n.jsx)(G,{ref:k,className:A,alignItems:`center`,justifyContent:`center`,style:{flex:`0 0 auto`},children:(0,n.jsxs)(G,{className:h.resizerGrip,direction:g?`vertical`:`horizontal`,alignItems:`center`,justifyContent:`center`,children:[(0,n.jsx)(G,{className:h.gripDot,children:``}),(0,n.jsx)(G,{className:h.gripDot,children:``}),(0,n.jsx)(G,{className:h.gripDot,children:``})]})}),(0,n.jsx)(G,{className:h.secondaryPane,style:{flex:1,minWidth:0,minHeight:0},children:f})]})},pt=({anchorPoint:e,isOpen:r,onClose:a,excludeRefs:o,children:s,theme:c})=>{let l=(0,t.useRef)(null),[u,d]=(0,t.useState)(null);(0,t.useLayoutEffect)(()=>{if(!r){d(null);return}if(l.current){let t=l.current.getBoundingClientRect(),n=e.left,r=e.top;n+t.width>window.innerWidth&&(n=window.innerWidth-t.width-10),r+t.height>window.innerHeight&&(r=window.innerHeight-t.height-10),d({left:n,top:r})}},[e,r,s]);let p=t.default.useCallback(e=>{let t=e.target;if(l.current&&!l.current.contains(t)){if(o&&o.some(e=>e.current&&e.current.contains(t)))return;a()}},[a,o]);if((0,t.useEffect)(()=>{if(!r)return;let e=requestAnimationFrame(()=>{document.addEventListener(`mousedown`,p)}),t=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,t),()=>{cancelAnimationFrame(e),document.removeEventListener(`mousedown`,p),document.removeEventListener(`keydown`,t)}},[r,p,a]),!r)return null;let m=u||e;return f.default.createPortal(c?(0,n.jsx)(i.FluentProvider,{theme:c,children:(0,n.jsx)(i.Card,{ref:l,style:{position:`fixed`,zIndex:1e3,top:m.top,left:m.left},children:s})}):(0,n.jsx)(i.Card,{ref:l,style:{position:`fixed`,zIndex:1e3,top:m.top,left:m.left},children:s}),document.body)},mt=(0,i.makeStyles)({labelContainer:{display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,...i.shorthands.gap(`6px`)},iconStyles:{width:`26px`},item:{paddingLeft:`15px`}}),ht=e=>{let{label:r,icon:a,isRequired:o}=e,s=mt();return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.labelContainer,children:[a&&t.isValidElement(a)?a:(0,n.jsx)(p.Icon,{icon:a,className:s.iconStyles,width:`20px`,height:`20px`,color:i.tokens.colorBrandForeground1}),(0,n.jsx)(i.Caption1,{style:{color:i.tokens.colorBrandForeground1},children:r}),(0,n.jsx)(i.Caption1,{style:{color:i.tokens.colorPaletteRedForeground1},children:o?` *`:``})]})})},gt=(0,i.makeStyles)({root:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`},spinner:{width:`100px`,height:`100px`}}),_t=e=>{let{size:t,label:r,labelPosition:a,style:o,className:s}=e,c=gt();return(0,n.jsx)(`div`,{className:c.root,children:(0,n.jsx)(i.Spinner,{style:o,className:(0,i.mergeClasses)(c.spinner,s),size:t,label:r,labelPosition:a})})},vt={xs:i.tokens.fontSizeBase200,s:i.tokens.fontSizeBase300,m:i.tokens.fontSizeBase400,l:i.tokens.fontSizeBase500,xl:i.tokens.fontSizeBase600,xxl:i.tokens.fontSizeHero700},K={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},yt={regular:i.tokens.fontWeightRegular,semibold:i.tokens.fontWeightSemibold,bold:i.tokens.fontWeightBold},bt=e=>{let{fontSize:t,fontFamily:r,fontWeight:a,numberOfLines:o,as:s,padding:c,paddingTop:u,paddingBottom:d,paddingLeft:f,paddingRight:p,margin:m,marginTop:h,marginBottom:g,marginLeft:_,marginRight:v,children:y,style:b,className:x,color:S,block:C,truncate:w,wrap:T}=e,E=(0,l.css)({color:S,padding:c&&K[c]?K[c]:c,paddingTop:u&&K[u]?K[u]:u,paddingBottom:d&&K[d]?K[d]:d,paddingLeft:f&&K[f]?K[f]:f,paddingRight:p&&K[p]?K[p]:p,margin:m&&K[m]?K[m]:m,marginTop:h&&K[h]?K[h]:h,marginBottom:g&&K[g]?K[g]:g,marginLeft:_&&K[_]?K[_]:_,marginRight:v&&K[v]?K[v]:v}),D={...b,...r?{fontFamily:r}:{},...t?{fontSize:vt[t]?vt[t]:t}:{},...a?{fontWeight:yt[a]?yt[a]:a}:{},...o?{display:`-webkit-box`,WebkitBoxOrient:`vertical`,overflow:`hidden`,WebkitLineClamp:o}:{}};return(0,n.jsx)(i.Text,{as:s,className:(0,i.mergeClasses)(x,E),style:D,block:C,truncate:w,wrap:T,children:y})},xt=e=>{let{onSelected:r,value:a,styles:o,options:s,apparence:c,shape:l,label:u}=e,d=t.useRef(),[f,p]=t.useState(a??s[0]),[m,h]=t.useState({option:[a?a?.key:s?.[0]?.key]}),g=t.useRef(null);t.useEffect(()=>{a!==void 0&&(p(a),h({option:[a.key]})),d.current=s.find(e=>e.key===(a?.key??s[0]?.key))?.icon},[a]);let[_,v]=t.useState(!1),y=t.useCallback((e,t)=>{v(t.open)},[]),b=t.useCallback(e=>e?.text??``,[]),x=t.useCallback((e,{name:t,checkedItems:n})=>{if(t===`option`){let e=n[0];p(s.find(t=>t.key===e)),h({option:n}),d.current=s.find(t=>t.key===e)?.icon,r(s.find(t=>t.key===e))}},[s,r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Field,{label:u,style:o,ref:g,children:(0,n.jsxs)(i.Menu,{open:_,onOpenChange:y,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:l??`circular`,icon:d.current,appearance:c??`secondary`,children:b(f)??`No data available`})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{onCheckedValueChange:x,checkedValues:m,style:{width:g.current?.offsetWidth},children:s.map(e=>(0,n.jsx)(i.MenuItemRadio,{name:`option`,value:e.key,icon:e.icon,disabled:e.disabled,children:b(e)},e.key))})})]})})})},St=()=>({styles:{container:(0,l.css)({display:`flex`,alignItems:`center`,alignContent:`center`,overflow:`hidden`,whiteSpace:`nowrap`,padding:`8px`,backgroundColor:`transparent`}),breadcrumbItem:(0,l.css)({minWidth:`fit-content`,padding:0,margin:`0px`}),separator:(0,l.css)({marginRight:`8px`})},getStyles:(e,t)=>{let{icon:n}=e;switch(t){case`small`:return(0,l.css)({fontSize:`12px`,padding:`4px`,paddingLeft:n?`0px`:`4px`});case`medium`:return(0,l.css)({fontSize:`14px`,padding:`6px`,paddingLeft:n?`0px`:`6px`});case`large`:return(0,l.css)({fontSize:`16px`,padding:`8px`,paddingLeft:n?`0px`:`8px`});case`current`:return(0,l.css)({fontWeight:i.tokens.fontWeightBold,cursor:`default`,display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,overflow:`hidden`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`,fontFamily:i.tokens.fontFamilyBase});default:return(0,l.css)({fontSize:`14px`,padding:`6px`,paddingLeft:n?`0px`:`6px`})}}}),Ct=({items:e,theme:r,size:a=`medium`})=>{let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),[u,p]=(0,t.useState)({top:0,left:0,position:`absolute`}),{getStyles:m}=St();return(0,t.useEffect)(()=>{let e=e=>{!c.current?.contains(e.target)&&!l.current?.contains(e.target)&&o&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[o]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Button,{ref:c,icon:(0,n.jsx)(d.MoreHorizontalRegular,{}),appearance:`transparent`,onClick:()=>{if(c.current){let e=c.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,r=l.current?.offsetWidth||200,i=l.current?.offsetHeight||100,a=e.bottom+window.scrollY,o=e.left+window.scrollX;o+r>t&&(o=t-r-10),a+i>n&&(a=e.top+window.scrollY-i),p({top:a,left:o,position:`absolute`}),s(e=>!e)}}}),o&&(0,f.createPortal)(r?(0,n.jsx)(i.FluentProvider,{theme:r,children:(0,n.jsx)(i.Card,{ref:l,style:{...u,zIndex:1e3,padding:`8px`,minWidth:`150px`},children:e.map((e,t)=>(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,onClick:()=>{e.onClick?.(),s(!1)},children:(0,n.jsx)(i.Text,{className:m(e,a),children:e.label})},`overflow-${t}`))})}):(0,n.jsx)(i.Card,{ref:l,style:{...u,zIndex:1e3,padding:`8px`,minWidth:`150px`},children:e.map((e,t)=>(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,onClick:()=>{e.onClick?.(),s(!1)},children:(0,n.jsx)(i.Text,{className:m(e,a),children:e.label})},`overflow-${t}`))}),document.body)]})},wt=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}},Tt=({items:e,maxWidth:r=`100%`,styles:a,theme:o,size:s=`medium`,currentIndex:l=e.length-1,className:u})=>{let{styles:f,getStyles:p}=St(),m=(0,t.useRef)(null),[h,g]=(0,t.useState)([]),[_,v]=(0,t.useState)([]);return(0,t.useEffect)(()=>{let t=()=>{if(!m.current)return;let t=m.current.offsetWidth,n=0,r=[],i=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):i.push(e)}),g(r),v(i)},n=wt(t,100),r=new c.ResizeObserver(()=>{n()});return m.current&&r.observe(m.current),t(),()=>{r.disconnect()}},[e]),(0,n.jsx)(`div`,{ref:m,className:(0,i.mergeClasses)(f.container,u),style:{maxWidth:r,...a},children:(0,n.jsxs)(U,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,children:[h.map((e,r)=>(0,n.jsxs)(t.default.Fragment,{children:[r===l?(0,n.jsxs)(U,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,columnGap:5,styles:{overflow:`hidden`},children:[e.icon?t.default.cloneElement(e.icon,{style:{fontSize:s===`large`?`20px`:s===`medium`?`16px`:`12px`}}):null,(0,n.jsx)(i.Text,{className:(0,i.mergeClasses)(f.breadcrumbItem,p(e,s),p(e,`current`)),"aria-current":`page`,children:e.label},e.label)]}):(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,className:`${f.breadcrumbItem}`,onClick:e.onClick,children:(0,n.jsx)(i.Text,{className:p(e,s),children:e.label})},e.label),r<h.length-1&&(0,n.jsx)(d.ChevronRightRegular,{style:{fontSize:s===`large`?`20px`:s===`medium`?`16px`:`12px`}})]},e.label??`breadcrumb-${r}`)),_.length>0&&(0,n.jsx)(Ct,{items:_,theme:o})]})})},Et=({icon:e,hoverIcon:r,imageSrc:a,width:o=24,height:s=24,color:c,hoverColor:l,onClick:u,enabled:d=!0})=>{let f=c||i.tokens.colorBrandBackground,p=l||i.tokens.colorBrandBackgroundHover,m=i.tokens.fontFamilyBase,[h,g]=(0,t.useState)(!1),_=(0,t.useCallback)(()=>{d&&g(!0)},[d]),v=(0,t.useCallback)(()=>{d&&g(!1)},[d]),y=(0,t.useMemo)(()=>d&&h&&r?r:e,[h,r,e,d]),b=(0,t.useMemo)(()=>({width:o,height:s,color:h?p:f,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:d?1:.5,fontFamily:m,fontSize:`inherit`}),[o,s,h,p,f,d,m]),x=(0,t.useMemo)(()=>({border:`none`,background:`none`,padding:0,cursor:d?`pointer`:`default`}),[d]),S=(0,t.useMemo)(()=>({width:o,height:s,objectFit:`contain`,opacity:d?1:.5}),[o,s,d]);return(0,n.jsx)(`button`,{onClick:d?u:void 0,onMouseEnter:_,onMouseLeave:v,disabled:!d,style:x,children:a?(0,n.jsx)(`img`,{src:a,alt:`icon`,style:S}):t.default.cloneElement(y,{style:{...y.props.style,...b}})})},Dt=t.default.memo(Et),Ot=()=>({getSpanSlots:t.useCallback((e,t)=>{let n=new Date(e),r=new Date(t),i=n.getHours(),a=n.getMinutes(),o=i*2+(a>=1?1:0),s=r.getHours(),c=r.getMinutes(),l=s*2+(c>=1?2:0);return{spanSlots:l-o,startSlot:o,endSlot:l}},[]),generateLightAndHoverColors:t.useCallback((e,t=20,n=10)=>{let r=e=>{let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=i-a,s=0,c=0,l=(i+a)/2;if(o!==0){switch(c=l>.5?o/(2-i-a):o/(i+a),i){case t:s=(n-r)/o+(n<r?6:0);break;case n:s=(r-t)/o+2;break;case r:s=(t-n)/o+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}},i=(e,t,n)=>{let r=t*Math.min(n,100-n)/100,i=t=>{let i=(t+e/30)%12,a=n-r*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*a).toString(16).padStart(2,`0`)};return`#${i(0)}${i(8)}${i(4)}`},{h:a,s:o,l:s}=r(e);return{lightColor:i(a,o,Math.min(s+t,100)),hoverColor:i(a,o,Math.min(s+n,100))}},[]),getEventColors:t.useCallback(e=>{let t={backgroundColor:i.tokens.colorNeutralBackground3,hoverColor:i.tokens.colorNeutralBackground3Hover};return{"no category":t,meeting:{backgroundColor:i.tokens.colorPaletteBlueBackground2,hoverColor:i.tokens.colorPaletteBlueBorderActive},appointment:{backgroundColor:i.tokens.colorPaletteGreenBackground2,hoverColor:i.tokens.colorPaletteGreenBorderActive},task:{backgroundColor:i.tokens.colorPaletteRedBackground2,hoverColor:i.tokens.colorPaletteRedBorderActive},deadline:{backgroundColor:i.tokens.colorPaletteYellowBackground2,hoverColor:i.tokens.colorPaletteYellowBorderActive},holiday:{backgroundColor:i.tokens.colorPalettePurpleBackground2,hoverColor:i.tokens.colorPalettePurpleBorderActive},celebration:{backgroundColor:i.tokens.colorPaletteDarkOrangeBackground2,hoverColor:i.tokens.colorPaletteDarkOrangeBorderActive},reminder:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},workshop:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},webinar:{backgroundColor:i.tokens.colorPaletteMagentaBackground2,hoverColor:i.tokens.colorPaletteMagentaBorderActive},conference:{backgroundColor:i.tokens.colorPaletteBrownBackground2,hoverColor:i.tokens.colorPaletteBrownBorderActive}}[e.toLowerCase()]||t},[]),generateColor:t.useCallback(e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);let n=(t&16777215).toString(16).toUpperCase();return`#${`00000`.substring(0,6-n.length)+n}`},[]),getCalendarColors:t.useCallback(e=>{let t={beige:{backgroundColor:i.tokens.colorPaletteBeigeBackground2,hoverColor:i.tokens.colorPaletteBeigeBorderActive},blue:{backgroundColor:i.tokens.colorPaletteBlueBackground2,hoverColor:i.tokens.colorPaletteBlueBorderActive},brown:{backgroundColor:i.tokens.colorPaletteBrownBackground2,hoverColor:i.tokens.colorPaletteBrownBorderActive},gold:{backgroundColor:i.tokens.colorPaletteGoldBackground2,hoverColor:i.tokens.colorPaletteGoldBorderActive},lavender:{backgroundColor:i.tokens.colorPaletteLavenderBackground2,hoverColor:i.tokens.colorPaletteLavenderBorderActive},magenta:{backgroundColor:i.tokens.colorPaletteMagentaBackground2,hoverColor:i.tokens.colorPaletteMagentaBorderActive},navy:{backgroundColor:i.tokens.colorPaletteNavyBackground2,hoverColor:i.tokens.colorPaletteNavyBorderActive},pink:{backgroundColor:i.tokens.colorPalettePinkBackground2,hoverColor:i.tokens.colorPalettePinkBorderActive},plum:{backgroundColor:i.tokens.colorPalettePlumBackground2,hoverColor:i.tokens.colorPalettePlumBorderActive},purple:{backgroundColor:i.tokens.colorPalettePurpleBackground2,hoverColor:i.tokens.colorPalettePurpleBorderActive},red:{backgroundColor:i.tokens.colorPaletteRedBackground2,hoverColor:i.tokens.colorPaletteRedBorderActive},teal:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},anchor:{backgroundColor:i.tokens.colorPaletteAnchorBackground2,hoverColor:i.tokens.colorPaletteAnchorBorderActive},"dark-red":{backgroundColor:i.tokens.colorPaletteDarkRedBackground2,hoverColor:i.tokens.colorPaletteDarkRedBorderActive},cranberry:{backgroundColor:i.tokens.colorPaletteCranberryBackground2,hoverColor:i.tokens.colorPaletteCranberryBorderActive},pumpkin:{backgroundColor:i.tokens.colorPalettePumpkinBackground2,hoverColor:i.tokens.colorPalettePumpkinBorderActive},peach:{backgroundColor:i.tokens.colorPalettePeachBackground2,hoverColor:i.tokens.colorPalettePeachBorderActive},marigold:{backgroundColor:i.tokens.colorPaletteMarigoldBackground2,hoverColor:i.tokens.colorPaletteMarigoldBorderActive},brass:{backgroundColor:i.tokens.colorPaletteBrassBackground2,hoverColor:i.tokens.colorPaletteBrassBorderActive},forest:{backgroundColor:i.tokens.colorPaletteForestBackground2,hoverColor:i.tokens.colorPaletteForestBorderActive},seafoam:{backgroundColor:i.tokens.colorPaletteSeafoamBackground2,hoverColor:i.tokens.colorPaletteSeafoamBorderActive},"dark-green":{backgroundColor:i.tokens.colorPaletteDarkGreenBackground2,hoverColor:i.tokens.colorPaletteDarkGreenBorderActive},"light-teal":{backgroundColor:i.tokens.colorPaletteLightTealBackground2,hoverColor:i.tokens.colorPaletteLightTealBorderActive},steel:{backgroundColor:i.tokens.colorPaletteSteelBackground2,hoverColor:i.tokens.colorPaletteSteelBorderActive},"royal-blue":{backgroundColor:i.tokens.colorPaletteRoyalBlueBackground2,hoverColor:i.tokens.colorPaletteRoyalBlueBorderActive},cornflower:{backgroundColor:i.tokens.colorPaletteCornflowerBackground2,hoverColor:i.tokens.colorPaletteCornflowerBorderActive},grape:{backgroundColor:i.tokens.colorPaletteGrapeBackground2,hoverColor:i.tokens.colorPaletteGrapeBorderActive},lilac:{backgroundColor:i.tokens.colorPaletteLilacBackground2,hoverColor:i.tokens.colorPaletteLilacBorderActive},mink:{backgroundColor:i.tokens.colorPaletteMinkBackground2,hoverColor:i.tokens.colorPaletteMinkBorderActive},platinum:{backgroundColor:i.tokens.colorPalettePlatinumBackground2,hoverColor:i.tokens.colorPalettePlatinumBorderActive}},n=t[`royal-blue`];return t[e]||n},[]),formatDate:t.useCallback((e,t)=>(0,a.format)((0,a.parseISO)(e),t),[])}),kt={start:`Start`,end:`End`,location:`Location`,attendees:`Attendees`,details:`Details`},At=`32px`,jt=e=>({styles:{banner:(0,l.css)({display:`flex`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,padding:`5px 10px 0px 10px`}),fieldContainer:(0,l.css)({paddingLeft:At}),title:(0,l.css)({lineClamp:2,overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,wordBreak:`break-word`,WebkitLineClamp:2})}}),Mt=({fieldLabel:e,fieldValue:t,icon:r})=>(0,n.jsxs)(U,{children:[(0,n.jsx)(ht,{label:e,icon:r}),(0,n.jsx)(U,{paddingLeft:At,children:(0,n.jsx)(i.Body1,{children:t})})]}),Nt=e=>{let{event:r,strings:a=kt}=e,{title:o,start:s,end:c,location:l,category:u,attendees:d,weblink:f}=r,{styles:p}=jt(r),{formatDate:m}=Ot(),h=m(s,`PPp`),g=m(c,`PPp`),_=(0,i.partitionAvatarGroupItems)({items:d?.map(e=>e.id)||[]}),v=t.useCallback(e=>d?.find(t=>t.id===e)||void 0,[d]),y=t.useCallback(()=>(0,n.jsxs)(U,{children:[(0,n.jsx)(ht,{label:a.attendees,icon:`ph:users-three`}),(0,n.jsx)(U,{paddingLeft:At,children:(0,n.jsxs)(i.AvatarGroup,{layout:`stack`,children:[_.inlineItems.map(e=>(0,n.jsx)(i.AvatarGroupItem,{name:v(e)?.name,image:{src:v(e)?.imageUrl}},e)),_.overflowItems&&(0,n.jsx)(i.AvatarGroupPopover,{children:_.overflowItems.map(e=>(0,n.jsx)(i.AvatarGroupItem,{name:v(e)?.name,image:{src:v(e)?.imageUrl}},e))})]})})]}),[_,v,a.attendees]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Ue,{appearance:`subtle`,padding:`m`,paddingTop:`s`,width:`250px`,cardBody:(0,n.jsxs)(U,{RowGap:10,children:[(0,n.jsx)(`div`,{className:p.banner,children:(0,n.jsx)(i.Subtitle1,{className:p.title,children:o})}),(0,n.jsx)(i.Divider,{}),u&&(0,n.jsx)(U,{horizontal:!0,horizontalAlign:`end`,width:`100%`,children:(0,n.jsx)(i.Badge,{appearance:`filled`,children:u})}),(0,n.jsx)(Mt,{fieldLabel:a.start,fieldValue:h,icon:`mingcute:time-line`}),(0,n.jsx)(Mt,{fieldLabel:a.end,fieldValue:g,icon:`mingcute:time-line`}),(0,n.jsx)(Mt,{fieldLabel:a.location,fieldValue:l,icon:`mingcute:location-line`}),(0,n.jsx)(y,{})]}),cardFooterContent:(0,n.jsx)(U,{horizontal:!0,horizontalAlign:`end`,width:`100%`,children:(0,n.jsx)(i.Button,{appearance:`subtle`,onClick:()=>{window.open(f,`_blank`)},children:a.details})})})})},Pt=()=>({styles:{calendarWrapper:(0,l.css)({padding:`20px`,paddingTop:`10px`,overflow:`auto`,flex:1,display:`grid`,gridTemplateColumns:`repeat(7, 1fr)`,gridTemplateRows:`auto`,gridAutoRows:`minmax(100px, 1fr)`,gap:`1px`,width:`calc(100% - 40px)`}),header:(0,l.css)({display:`flex`,justifyContent:`start`,gap:`10px`,alignItems:`center`,padding:`16px`}),dayHeader:(0,l.css)({textAlign:`start`,padding:`8px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),day:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,backgroundColor:i.tokens.colorNeutralBackground1,position:`relative`}),otherMonthDay:(0,l.css)({color:i.tokens.colorNeutralStroke2,backgroundColor:i.tokens.colorNeutralBackground2}),cardDay:(0,l.css)({height:`100%`,minHeight:100,borderRadius:0,overflow:`hidden !important`,rowGap:5}),cardDayOnHover:(0,l.css)({":hover":{backgroundColor:i.tokens.colorNeutralBackground2}}),currentDay:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),currentDayLabel:(0,l.css)({color:i.tokens.colorBrandBackground,fontWeight:600}),eventCard:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,zIndex:1}),eventContainer:(0,l.css)({display:`flex`,flexDirection:`column`,overflowY:`auto`,paddingTop:`5px`,paddingBottom:`5px`,paddingLeft:`5px`,paddingRight:`5px`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),eventCardWeekView:(0,l.css)({backgroundColor:i.tokens.colorBrandBackground,color:i.tokens.colorNeutralForegroundOnBrand,borderRadius:`4px`,padding:`4px`,margin:`2px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,height:`100%`}),popoverContent:(0,l.css)({padding:0,borderTopWidth:20,borderTopStyle:`solid`}),cardMonthTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`})},applyEventHouverColorClass:(e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}})}),Ft=e=>{let r=(0,i.useId)(),{events:o,date:s,onCardHoverChange:c,columnHeight:l}=e,{styles:u,applyEventHouverColorClass:d}=Pt(),f=t.useRef(null),{getEventColors:p,getCalendarColors:m}=Ot(),h=t.useCallback(e=>{c&&c(!0,e)},[c]),g=t.useCallback(e=>{c&&c(!1,e)},[c]),_=t.useCallback(e=>{f.current?.setTarget(e)},[f]),v=t.useCallback((e,t,r)=>(0,n.jsx)(`div`,{ref:_,children:(0,n.jsx)(Ue,{className:(0,i.mergeClasses)(u.eventCard,d(r.backgroundColor,r.backgroundColor)),paddingTop:`4px`,paddingBottom:`4px`,paddingLeft:`8px`,paddingRight:`8px`,marginTop:e===0?`0px`:`5px`,cardHeader:(0,n.jsx)(i.Caption1,{className:u.cardMonthTitle,children:t.title}),onMouseEnter:()=>h(t.title),onMouseLeave:()=>g(t.title)})},t.id??`card-${e}`),[h,g,d]),y=t.useCallback((e,t,a)=>(0,n.jsxs)(i.Popover,{withArrow:!0,mouseLeaveDelay:30,closeOnScroll:!0,closeOnIframeFocus:!0,openOnHover:!0,children:[(0,n.jsx)(i.PopoverTrigger,{children:v(t,e,a)}),(0,n.jsx)(i.PopoverSurface,{"aria-labelledby":r,className:(0,i.mergeClasses)(u.popoverContent),children:(0,n.jsx)(Nt,{event:e})})]},t),[v,r,u.popoverContent]);return!o||!o?.length?(0,n.jsx)(n.Fragment,{children:` `}):(0,n.jsx)(`div`,{style:{height:l},className:u.eventContainer,children:o.map((e,n)=>{if(!(0,a.isWithinInterval)(s,{start:(0,a.startOfDay)(new Date(e.start)),end:(0,a.endOfDay)(new Date(e.end))}))return null;let r;r=e.color?m(e.color):p(e.category);let o=e.onRenderInMonthView?.(e),c=e.id??`event-${n}`;return t.isValidElement(o)?t.cloneElement(o,{key:c,className:(0,i.mergeClasses)(o.props.className,u.eventCard)}):e.enableOnHouver?y(e,n,r):v(n,e,r)})})},It=e=>{let{day:r,currentMonth:o,events:s,date:c,columnHeight:l,onDayClick:u}=e,{styles:d}=Pt(),f=new Date,[p,m]=t.useState(!1),h=t.useMemo(()=>(0,a.isSameDay)(c,f),[c,f]),g=t.useMemo(()=>(0,n.jsx)(U,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,paddingLeft:`m`,paddingRight:`m`,children:(0,n.jsxs)(i.Body2,{className:d.currentDayLabel,children:[r,` `,f.toLocaleString(`default`,{month:`short`})]})}),[r]),_=t.useCallback(e=>{m(e)},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Ue,{onClick:u?()=>u(c):void 0,className:(0,i.mergeClasses)(d.cardDay,o?``:d.otherMonthDay,h?d.currentDay:``,p?``:d.cardDayOnHover),cardHeader:h?g:(0,n.jsx)(U,{horizontal:!0,paddingLeft:`m`,paddingRight:`m`,children:(0,n.jsx)(i.Body2,{children:r})}),paddingTop:`m`,paddingBottom:`m`,paddingLeft:`0px`,paddingRight:`0px`,cardBody:(0,n.jsx)(Ft,{events:s,date:c,onCardHoverChange:_,columnHeight:l-60})})})},Lt=()=>({styles:{container:(0,l.css)({display:`flex`,flexDirection:`column`,width:`calc(100% - 40px)`,height:`100vh`,overflow:`hidden`,padding:`20px`}),header:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`16px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),weekGrid:(0,l.css)({display:`grid`,gridTemplateColumns:`80px repeat(7, 1fr)`,gridTemplateRows:`50px 40px repeat(48, 33px)`,height:`fit-content`,overflowY:`auto`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,maxHeight:`calc(100vh - 100px)`,scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground1}`,"&::-webkit-scrollbar":{width:`8px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground1},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:`4px`},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}),blankHeader:(0,l.css)({gridColumn:`1`,backgroundColor:i.tokens.colorNeutralBackground3,borderBottom:`3px solid ${i.tokens.colorNeutralStroke3}`,position:`sticky`,top:0,zIndex:10}),timeColumn:(0,l.css)({gridColumn:`1`,gridRow:`3 / span 49`,display:`flex`,flexDirection:`column`,backgroundColor:i.tokens.colorNeutralBackground1,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`}),timeCell:(0,l.css)({height:`100%`,display:`flex`,alignItems:`center`,fontSize:`12px`,color:i.tokens.colorNeutralForeground3,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,justifyContent:`center`}),fullDayRow:(0,l.css)({gridRow:`2`,display:`grid`,gridTemplateColumns:`80px repeat(7, 1fr)`,gap:`0`,padding:`0`,backgroundColor:i.tokens.colorNeutralBackground2,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayLabel:(0,l.css)({gridColumn:`1`,display:`flex`,alignItems:`center`,justifyContent:`center`,alignContent:`center`,color:i.tokens.colorBrandBackground,padding:`5px`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayCell:(0,l.css)({borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,display:`flex`,flexDirection:`row`,gap:`0px`,padding:`4px`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`,overflow:`hidden`}),fullDayEvent:(0,l.css)({flex:`1 1 auto`,minWidth:`24px`,height:`24px`,padding:`4px 8px`,backgroundColor:i.tokens.colorBrandBackground,borderRadius:`4px`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`}),dayHeaderCell:(0,l.css)({textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground2,padding:`8px`,fontWeight:`bold`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`sticky`,top:0,zIndex:10}),todayHeaderCell:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),eventCard:(0,l.css)({padding:2,alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,overflow:`hidden`,":hover":{pointerEvents:`auto`,cursor:`pointer`}}),event:(0,l.css)({height:`100%`,backgroundColor:i.tokens.colorBrandBackground,borderRadius:`4px`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,":hover":{pointerEvents:`auto`,cursor:`pointer`}}),dayCell:(0,l.css)({borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`relative`,overflow:`visible`,FlexDirection:`column`,gap:`4px`}),currentTimeIndicator:(0,l.css)({position:`absolute`,left:0,height:`2px`,backgroundColor:i.tokens.colorPaletteRedBorderActive,width:`100%`,zIndex:1}),currentHalfHourCell:(0,l.css)({border:`2px solid ${i.tokens.colorPaletteRedBorderActive}`}),eventTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`}),popoverContent:(0,l.css)({padding:0,borderTopWidth:20,borderTopStyle:`solid`})},applyEventHouverColorClass:t.default.useCallback((e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}}),[i.tokens.colorBrandBackground,i.tokens.colorBrandBackgroundHover]),appyDynamicStyles:t.default.useCallback((e,t,n,r)=>(0,l.css)({flex:`0 0 calc(100% / ${t})`,height:`${n*r}px`,left:`${e*10}%`,width:`calc(${100-e*10}% - 8px)`,margin:4,marginTop:0,marginBottom:0}),[])}),Rt={timeSeparator:` - `,hourSuffix:`H`},zt=({event:e,colors:r,spanSlots:a,rowHeight:o,eventIndex:s,eventCount:c,strings:l=Rt})=>{let u=(0,i.useId)(),{styles:d,applyEventHouverColorClass:f,appyDynamicStyles:p}=Lt(),m=t.useRef(null),{formatDate:h}=Ot(),g=t.useMemo(()=>(0,n.jsx)(`div`,{children:(0,n.jsxs)(U,{columnGap:4,verticalAlign:`center`,children:[(0,n.jsx)(i.Caption1Strong,{className:d.eventTitle,children:e.title}),(0,n.jsxs)(U,{columnGap:4,horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,children:[(0,n.jsxs)(i.Caption1,{children:[h(e.start,`HH:mm`),l.hourSuffix]}),l.timeSeparator,(0,n.jsxs)(i.Caption1,{children:[h(e.end,`HH:mm`),l.hourSuffix]})]})]})}),[e,h,l,d.eventTitle]);return(0,n.jsx)(i.Card,{ref:m,className:(0,i.mergeClasses)(d.eventCard,f(r.backgroundColor,r.backgroundColor),p(s,c,o,a)),children:e.enableOnHouver?(0,n.jsxs)(i.Popover,{withArrow:!0,mouseLeaveDelay:50,closeOnScroll:!0,closeOnIframeFocus:!0,openOnHover:!0,children:[(0,n.jsx)(i.PopoverTrigger,{children:g}),(0,n.jsx)(i.PopoverSurface,{"aria-labelledby":u,className:(0,i.mergeClasses)(d.popoverContent),children:(0,n.jsx)(Nt,{event:e})})]}):g},e.id)},Bt=({event:e,eventCount:r,spanSlots:a,rowHeight:o,eventIndex:s,view:c})=>{let{styles:l,appyDynamicStyles:u}=Lt(),{getEventColors:d,getCalendarColors:f}=Ot(),p=e.color?f(e.color):d(e.category),m=c===`day`?e.onRenderInDayView?.(e):e.onRenderInWeekView?.(e);return t.isValidElement(m)?t.cloneElement(m,{event:e,className:(0,i.mergeClasses)(m.props.className,l.eventCard,u(s,r,o,a)),style:{...m.props.style}}):(0,n.jsx)(zt,{event:e,colors:p,spanSlots:a,rowHeight:o,eventIndex:s,eventCount:r},e.id)},Vt=e=>{let n=(0,t.useCallback)(e=>e.map(e=>({...e,id:e.id||(0,m.v4)()})),[]),r=(0,t.useCallback)(t=>new Date(new Date(t).toLocaleString(void 0,{timeZone:e})),[e]);return{getMonthCalendar:(0,t.useCallback)((e,t,i)=>{let o=n(e),s=new Date(t,i+1,0).getDate(),c={};for(let e=1;e<=s;e++){let n=(0,a.format)(new Date(t,i,e),`yyyy-MM-dd`);c[n]=[]}return o.forEach(e=>{let t=r(e.start),n=r(e.end),i=new Date(t);for(;i<=n;){let t=(0,a.format)(i,`yyyy-MM-dd`);c[t]&&c[t].push(e),i.setDate(i.getDate()+1)}}),c},[r]),getWeekEvents:(0,t.useCallback)((e,t)=>{let i=[],o=r(t),s=n(e);for(let e=0;e<7;e++){let t=new Date(o);t.setDate(o.getDate()+e);let n=(0,a.format)(t,`yyyy-MM-dd`),c=Array.from({length:48},(e,t)=>({time:`${String(Math.floor(t/2)).padStart(2,`0`)}:${t%2==0?`00`:`30`}`,events:[]})),l=[];s.forEach(e=>{let t=r(e.start),i=r(e.end);if(e.isFullDay){(0,a.format)(t,`yyyy-MM-dd`)<=n&&(0,a.format)(i,`yyyy-MM-dd`)>=n&&l.push(e);return}if((0,a.format)(t,`yyyy-MM-dd`)<=n&&(0,a.format)(i,`yyyy-MM-dd`)>=n){let r=new Date(t);for(;r<=i;){if((0,a.format)(r,`yyyy-MM-dd`)===n){let t=r.getHours()*2+(r.getMinutes()>=30?1:0);c[t]&&c[t].events.push(e)}r.setMinutes(r.getMinutes()+30)}}}),i.push({date:n,fullDayEvents:l,timeSlots:c})}return i},[r])}},Ht=()=>({styles:{container:(0,l.css)({display:`flex`,flexDirection:`column`,width:`calc(100% - 40px)`,height:`100vh`,overflow:`hidden`,padding:`20px`}),header:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`16px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),dayGrid:(0,l.css)({display:`grid`,gridTemplateColumns:`80px 1fr`,gridTemplateRows:`50px 40px repeat(48, 33px)`,height:`calc(100vh - 100px)`,overflowY:`auto`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,maxHeight:`fit-content`,scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground1}`,"&::-webkit-scrollbar":{width:`8px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground1},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:`4px`},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}),blankHeader:(0,l.css)({gridColumn:`1`,backgroundColor:i.tokens.colorNeutralBackground3,borderBottom:`3px solid ${i.tokens.colorNeutralStroke3}`}),timeColumn:(0,l.css)({gridColumn:`1`,gridRow:`3 / span 49`,display:`flex`,flexDirection:`column`,backgroundColor:i.tokens.colorNeutralBackground1,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`}),timeCell:(0,l.css)({height:`100%`,maxHeight:`32px`,minHeight:`32px`,display:`flex`,alignItems:`center`,fontSize:`12px`,color:i.tokens.colorNeutralForeground3,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,justifyContent:`center`}),fullDayRow:(0,l.css)({gridRow:`2`,display:`grid`,gridTemplateColumns:`80px 33px`,gap:`0`,padding:`0`,backgroundColor:i.tokens.colorNeutralBackground2,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayLabel:(0,l.css)({gridColumn:`1`,display:`flex`,alignItems:`center`,justifyContent:`center`,alignContent:`center`,color:i.tokens.colorBrandBackground,padding:`5px`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayCell:(0,l.css)({borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,display:`flex`,flexDirection:`row`,gap:`2px`,padding:`4px`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`,overflow:`hidden`}),fullDayEvent:(0,l.css)({flex:`1 1 auto`,minWidth:`24px`,height:`24px`,padding:`4px 8px`,backgroundColor:i.tokens.colorBrandBackground,color:i.tokens.colorNeutralForegroundOnBrand,borderRadius:`4px`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`}),dayHeaderCell:(0,l.css)({textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground2,padding:`8px`,fontWeight:`bold`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),todayHeaderCell:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),eventCard:(0,l.css)({alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,overflow:`hidden`}),dayCell:(0,l.css)({borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`relative`,overflow:`visible`,FlexDirection:`column`,gap:`4px`}),currentTimeIndicator:(0,l.css)({position:`absolute`,left:0,height:`2px`,backgroundColor:i.tokens.colorPaletteRedBorderActive,width:`100%`,zIndex:1}),currentHalfHourCell:(0,l.css)({border:`2px solid ${i.tokens.colorPaletteRedBorderActive}`}),eventTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`})},applyEventHouverColorClass:(e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}})}),Ut={allDay:`All Day`},Wt=33,Gt=e=>{let{events:r,currentDay:o,height:s,strings:c=Ut}=e,{styles:l}=Ht(),u=(0,t.useRef)(null),{getSpanSlots:d,getEventColors:f,getCalendarColors:p}=Ot(),m=Intl.DateTimeFormat().resolvedOptions().timeZone,{getWeekEvents:h}=Vt(m),g=t.useCallback(()=>Array.from({length:24},(e,r)=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{className:l.timeCell,children:(0,n.jsxs)(i.Body1Strong,{children:[r,`:00`]})}),(0,n.jsx)(`div`,{className:l.timeCell})]},r)),[l.timeCell]),_=t.useCallback(()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:l.blankHeader}),Array.from({length:1},(e,t)=>{let r=(0,a.addDays)(o,t),s=(0,a.isToday)(r)?l.todayHeaderCell:``;return(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(l.dayHeaderCell,s),children:[(0,n.jsx)(i.Text,{weight:`semibold`,size:600,style:{paddingRight:10},children:(0,a.format)(r,`dd`)}),(0,n.jsx)(i.Subtitle1,{children:(0,a.format)(r,`LLLL, yyyy`)})]},t)})]}),[o,l.blankHeader,l.dayHeaderCell,l.todayHeaderCell]),v=t.useCallback(()=>{let e=h(r,o.toISOString());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:l.fullDayLabel,children:(0,n.jsx)(i.Body1,{children:c.allDay})}),Array.from({length:1},(t,r)=>{let s=(0,a.format)((0,a.addDays)(o,r),`yyyy-MM-dd`),c=e.find(e=>e.date===s)?.fullDayEvents||[];return(0,n.jsx)(`div`,{className:l.fullDayCell,children:c.map(e=>(0,n.jsx)(`div`,{className:l.fullDayEvent,style:{gridColumn:`${r+2}`,backgroundColor:e.color?p(e.color).backgroundColor:f(e.category).backgroundColor},children:(0,n.jsx)(i.Caption1Strong,{className:l.eventTitle,children:e.title})},e.id))},r)})]})},[o,h,l.fullDayCell,l.fullDayEvent,l.fullDayLabel,l.eventTitle,p,f,r,c.allDay]),y=t.useCallback(()=>{let e=h(r,o.toISOString());return Array.from({length:1},(r,i)=>{let s=(0,a.format)((0,a.addDays)(o,i),`yyyy-MM-dd`),c=e.find(e=>e.date===s);return(0,n.jsx)(t.Fragment,{children:c?.timeSlots.map((e,t)=>{let r=e.events.length;return(0,n.jsx)(`div`,{className:l.dayCell,style:{gridRow:t+3},children:e.events.map((e,i)=>{let{spanSlots:a,startSlot:o}=d(new Date(e.start),new Date(e.end));return t===o?(0,n.jsx)(Bt,{event:e,eventCount:r,spanSlots:a,rowHeight:Wt,eventIndex:i,view:`day`},e.id):null})},t)})},i)})},[o,d,h,l.dayCell,r]);return(0,n.jsx)(`div`,{className:l.container,style:{height:s},children:(0,n.jsxs)(`div`,{ref:u,className:l.dayGrid,children:[(0,n.jsx)(`div`,{className:l.timeColumn,children:g()}),_(),v(),y()]})})},q=function(e){return e.Day=`day`,e.Week=`week`,e.Month=`month`,e}({}),Kt={month:`Month`,week:`Week`,day:`Day`},qt=e=>{let{onSelected:r,value:a,strings:o=Kt}=e,[s,c]=t.useState(a??q.Month),[l,u]=t.useState({view:[a??q.Month]}),f=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarDayFilled,d.CalendarDayRegular),[]),p=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),m=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarWorkWeekFilled,d.CalendarWorkWeekRegular),[]);t.useEffect(()=>{a!==void 0&&(c(a),u({view:[a]}))},[a]);let[h,g]=t.useState(!1),_=t.useCallback((e,t)=>{g(t.open)},[]),v=t.useCallback(()=>{switch(s){case q.Month:return(0,n.jsx)(p,{});case q.Week:return(0,n.jsx)(m,{});case q.Day:return(0,n.jsx)(f,{});default:return(0,n.jsx)(p,{})}},[s]),y=t.useCallback(e=>{switch(e){case q.Month:return o.month;case q.Week:return o.week;case q.Day:return o.day;default:return o.month}},[o]),b=t.useCallback((e,{name:t,checkedItems:n})=>{if(t===`view`){let e=n[0];c(e),u({view:n}),r(e)}},[r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Menu,{open:h,onOpenChange:_,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:v(),style:{minWidth:`150px`},children:y(s)})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsxs)(i.MenuList,{onCheckedValueChange:b,checkedValues:l,children:[(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(f,{}),name:`view`,value:q.Day,children:o.day}),(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(m,{}),name:`view`,value:q.Week,children:o.week}),(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(p,{}),name:`view`,value:q.Month,children:o.month})]})})]})})},Jt=t.memo(e=>{let{onSelected:a,value:o}=e,[s,c]=t.useState(o??new Date),[l,u]=t.useState(()=>(0,r.format)(o??new Date,`dd MMM, yyyy`)),[f,p]=t.useState(!1),m=t.useCallback((e,t)=>{p(t.open)},[]),g=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),_=t.useCallback(e=>{if(e){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.utcToZonedTime)(e,t);c(n),u((0,r.format)(n,`dd MMM, yyyy`)),a(n),p(!1)}},[a]);return(0,n.jsxs)(i.Menu,{open:f,onOpenChange:m,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(g,{}),style:{minWidth:`200px`},children:l})}),(0,n.jsx)(i.MenuPopover,{style:{maxWidth:`fit-content`},children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(h.Calendar,{highlightSelectedMonth:!0,showGoToToday:!0,onSelectDate:_,value:s})})})]})}),Yt=()=>({root:(0,l.css)({outline:`none`})}),Xt={months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],goToToday:`Go to today`},Zt=e=>{let{onDateChange:r,defaultSelectedDate:i,onDismiss:a,strings:o=Xt}=e,s=Yt(),[c,l]=t.useState(i??new Date),u=t.useCallback((e,t)=>{l(e),r(e),a()},[r,a]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(h.Calendar,{className:s.root,dateRangeType:h.DateRangeType.Month,highlightSelectedMonth:!0,isDayPickerVisible:!1,onSelectDate:u,value:c,onDismiss:a,showGoToToday:!1,allFocusable:!1,strings:o})})},Qt=e=>{let{onSelected:r,value:o}=e,s=(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[c,l]=t.useState(o??new Date);t.useEffect(()=>{r(o??new Date),l(o??new Date)},[o]);let[u,f]=t.useState(!1),p=(e,t)=>{f(t.open)},m=t.useCallback(e=>{r(e),l(e)},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Menu,{open:u,onOpenChange:p,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(s,{}),style:{minWidth:`200px`},children:(0,a.format)(c,`MMMM yyyy`)})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(Zt,{onDateChange:m,defaultSelectedDate:c,onDismiss:()=>{f(!1)}})})})]})})},$t={selectWeekPlaceholder:`Select a week`},en=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.format)(e.start,`MMM`,{timeZone:t}),i=(0,r.format)(e.end,`MMM`,{timeZone:t});return(0,r.format)(e.start,`yyyy`,{timeZone:t})===(0,r.format)(e.end,`yyyy`,{timeZone:t})?n===i?`${(0,r.format)(e.start,`dd`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`:`${(0,r.format)(e.start,`dd MMM`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`:`${(0,r.format)(e.start,`dd MMM yyyy`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`},tn=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.utcToZonedTime)(e,t),i=new Date(n);i.setDate(n.getDate()-n.getDay());let a=new Date(i);return a.setDate(i.getDate()+6),{start:(0,r.utcToZonedTime)(i,t),end:(0,r.utcToZonedTime)(a,t)}},nn=t.memo(e=>{let{onSelected:r,value:a,strings:o=$t}=e,s=h.DateRangeType.Week,[c,l]=t.useState(a??new Date),[u,f]=t.useState(()=>{let e=a??new Date;return e?en(tn(e)):o.selectWeekPlaceholder}),[p,m]=t.useState(!1),g=t.useCallback((e,t)=>{m(t.open)},[]),_=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),v=t.useCallback(e=>{if(e){l(e);let t=tn(e);f(en(t)),r({startDate:t.start,endDate:t.end}),m(!1)}},[r]),y=t.useMemo(()=>0,[]);return(0,n.jsxs)(i.Menu,{open:p,onOpenChange:g,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(_,{}),style:{minWidth:`200px`},children:u})}),(0,n.jsx)(i.MenuPopover,{style:{maxWidth:`fit-content`},children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(h.Calendar,{dateRangeType:s,highlightSelectedMonth:!0,showGoToToday:!0,onSelectDate:v,value:c,firstDayOfWeek:y})})})]})}),rn={today:`Today`,previous:`Previous`,next:`Next`},an=t.memo(({selectedView:e,onSelectedView:r,currentDate:a,setCurrentDate:o,onWeekChange:s,onMonthChange:c,onDayChange:l,strings:u=rn})=>{let f=t.useMemo(()=>(0,d.bundleIcon)(d.ArrowDownFilled,d.ArrowDownRegular),[]),p=t.useMemo(()=>(0,d.bundleIcon)(d.ArrowUpFilled,d.ArrowUpRegular),[]),m=t.useCallback(e=>{s(e.startDate),o(e.startDate)},[s,o]),h=t.useCallback(e=>{c(e),o(e)},[c,o]),g=t.useCallback(e=>{l(e),o(e)},[l,o]),_=t.useCallback(()=>{switch(e){case q.Month:return(0,n.jsx)(Qt,{onSelected:h,value:a});case q.Week:return(0,n.jsx)(nn,{onSelected:m,value:a});case q.Day:return(0,n.jsx)(Jt,{onSelected:g,value:a});default:return(0,n.jsx)(Qt,{onSelected:h,value:a})}},[e,h,m,g,a]),v=t.useCallback(()=>(0,n.jsx)(i.Tooltip,{content:u.today,relationship:`label`,children:(0,n.jsx)(i.Button,{shape:`circular`,icon:(0,n.jsx)(d.CalendarTodayRegular,{}),size:`medium`,onClick:()=>l(new Date),children:u.today})}),[l,u.today]),y=t.useCallback(t=>{let n=new Date(a);switch(e){case q.Month:n.setMonth(n.getMonth()+t),c(n);break;case q.Week:n.setDate(n.getDate()+t*7),s(n);break;case q.Day:n.setDate(n.getDate()+t),l(n);break;default:break}o(n)},[a,e,c,s,l,o]);return(0,n.jsxs)(U,{width:`calc(100% - 40px)`,height:`fit-content`,horizontal:!0,horizontalAlign:`space-between`,verticalAlign:`center`,paddingLeft:`20px`,paddingRight:`20px`,paddingBottom:`10px`,paddingTop:`10px`,columnGap:10,styles:{overflow:`hidden`},children:[(0,n.jsxs)(U,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,columnGap:10,children:[(0,n.jsx)(v,{}),(0,n.jsx)(_,{}),(0,n.jsx)(i.Tooltip,{content:u.previous,relationship:`label`,children:(0,n.jsx)(i.Button,{size:`medium`,icon:(0,n.jsx)(p,{fontSize:14}),onClick:()=>y(-1)})}),(0,n.jsx)(i.Tooltip,{content:u.next,relationship:`label`,children:(0,n.jsx)(i.Button,{size:`medium`,icon:(0,n.jsx)(f,{fontSize:14}),onClick:()=>y(1)})})]}),(0,n.jsx)(U,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,columnGap:10,children:(0,n.jsx)(qt,{onSelected:r,value:e})})]})}),on={allDay:`All Day`},sn=e=>{let{events:r,currentDay:o,height:s,strings:l=on}=e,{styles:u}=Lt(),[d]=(0,t.useState)(o),[f,p]=(0,t.useState)(32),m=(0,t.useRef)(null),{getSpanSlots:h,getEventColors:g,getCalendarColors:_,formatDate:v}=Ot(),y=(0,a.startOfWeek)(d,{weekStartsOn:0}),b=Intl.DateTimeFormat().resolvedOptions().timeZone,{getWeekEvents:x}=Vt(b);(0,t.useEffect)(()=>{let e=new c.ResizeObserver(()=>{if(m.current){let e=m.current.querySelector(`.dayCell`);e&&p(e.offsetHeight)}});return m.current&&e.observe(m.current),()=>{e.disconnect()}},[]);let S=t.useCallback(()=>Array.from({length:24},(e,r)=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{className:u.timeCell,children:(0,n.jsxs)(i.Body1Strong,{children:[r,`:00`]})}),(0,n.jsx)(`div`,{className:u.timeCell})]},r)),[u.timeCell]),C=t.useCallback(()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:u.blankHeader}),Array.from({length:7},(e,t)=>{let r=(0,a.addDays)(y,t),o=(0,a.isToday)(r)?u.todayHeaderCell:``;return(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(u.dayHeaderCell,o),children:[(0,n.jsx)(i.Text,{weight:`regular`,size:600,style:{paddingRight:10},children:v(r.toISOString(),`dd`)}),(0,n.jsx)(i.Body1,{children:v(r.toISOString(),`EEE`)})]},t)})]}),[y,u,v]),w=t.useCallback(()=>{let e=x(r,y.toISOString());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:u.fullDayLabel,children:(0,n.jsx)(i.Body1,{children:l.allDay})}),Array.from({length:7},(t,r)=>{let o=v((0,a.addDays)(y,r).toISOString(),`yyyy-MM-dd`),s=e.find(e=>e.date===o)?.fullDayEvents||[];return(0,n.jsx)(`div`,{className:u.fullDayCell,children:s.map(e=>(0,n.jsx)(`div`,{className:u.fullDayEvent,style:{gridColumn:`${r+2}`,backgroundColor:e.color?_(e.color).backgroundColor:g(e.category).backgroundColor},children:(0,n.jsx)(i.Caption1Strong,{className:u.eventTitle,children:e.title})},e.id))},r)})]})},[y,u,x,_,g,r,v,l.allDay]),T=t.useCallback(()=>{let e=x(r,y.toISOString());return Array.from({length:7},(t,r)=>{let i=(0,a.format)((0,a.addDays)(y,r),`yyyy-MM-dd`);return(0,n.jsx)(n.Fragment,{children:e.find(e=>e.date===i)?.timeSlots.map((e,t)=>{let r=e.events.length;return(0,n.jsx)(`div`,{className:u.dayCell,style:{gridRow:t+3},children:e.events.map((e,i)=>{let{spanSlots:a,startSlot:o}=h(new Date(e.start),new Date(e.end));return t===o?(0,n.jsx)(Bt,{event:e,eventCount:r,spanSlots:a,rowHeight:f,eventIndex:i,view:`week`},e.id):null})},t)})})})},[y,u,x,h,f,r]);return(0,n.jsx)(`div`,{className:u.container,style:{height:s},children:(0,n.jsxs)(`div`,{ref:m,className:u.weekGrid,children:[(0,n.jsx)(`div`,{className:u.timeColumn,children:S()}),C(),w(),T()]})})},cn={daysOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},ln=({currentDate:e,rowHeight:t,getCalendarDays:r,getEventsForDay:a,styles:o,onDaySlotClick:s,height:c,calendarRef:l,strings:u})=>{let d=u?.daysOfWeek||cn.daysOfWeek;return(0,n.jsx)(U,{height:c,width:`100%`,verticalAlign:`start`,horizontalAlign:`start`,children:(0,n.jsxs)(`div`,{className:o.calendarWrapper,ref:l,children:[d.map(e=>(0,n.jsx)(i.Body1,{className:o.dayHeader,children:e},e)),r(e).map((e,r)=>{let{day:i,currentMonth:o}=e,c=o?a(e):[];return(0,n.jsx)(It,{day:i,date:e.date,currentMonth:e.currentMonth,events:c,columnHeight:t||0,onDayClick:s},r)})]})})},un=t.memo(({events:e,currentDay:t,height:r,strings:i})=>(0,n.jsx)(sn,{events:e,currentDay:t,height:r,strings:i})),dn=t.memo(({events:e,currentDay:t,height:r,strings:i})=>(0,n.jsx)(Gt,{currentDay:t,events:e,height:r,strings:i})),fn=({events:e,height:r=800,theme:o,onDayChange:s,onMonthChange:l,onWeekChange:u,onViewChange:d,onDaySlotClick:f,defaultView:p,strings:m})=>{let{styles:h}=Pt(),g=(0,t.useRef)(null),[_,v]=(0,t.useState)(null),y=(0,t.useRef)(0),[b,x]=(0,t.useState)(new Date),[S,C]=(0,t.useState)(p??q.Month),{getMonthCalendar:w}=Vt(Intl.DateTimeFormat().resolvedOptions().timeZone),T=t.useCallback(e=>{let t=e.getMonth(),n=(0,a.startOfWeek)((0,a.startOfMonth)(e));return Array.from({length:42},(e,r)=>{let i=(0,a.addDays)(n,r);return{day:i.getDate(),currentMonth:i.getMonth()===t,date:i}})},[42]),E=t.useCallback(e=>{l&&l(e),x(e)},[l]),D=t.useCallback(e=>{s&&s(e),x(e)},[s]),O=t.useCallback(e=>{u&&u(e),x(e)},[u]),k=t.useCallback(e=>{d&&d(e),C(e)},[d]),A=t.useCallback(t=>{let{date:n}=t;return w(e,b.getFullYear(),b.getMonth())[(0,a.format)(n,`yyyy-MM-dd`)]?.flatMap(e=>e)||[]},[b,e]),j=t.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){let e=g.current.querySelector(`.${h.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),y.current=e.offsetHeight)}})},[h.calendarWrapper]);(0,t.useEffect)(()=>{let e=new c.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener(`resize`,j),()=>{e.disconnect(),window.removeEventListener(`resize`,j)}},[j,S]),(0,t.useEffect)(()=>{C(p||q.Month)},[p]);let M=t.useCallback(()=>{switch(S){case q.Month:return(0,n.jsx)(ln,{events:e,currentDate:b,rowHeight:_,getCalendarDays:T,getEventsForDay:A,styles:h,onDaySlotClick:f,height:r,calendarRef:g,strings:m?.calendarControl});case q.Week:return(0,n.jsx)(un,{events:e,currentDay:b,height:r,strings:m?.weekView});case q.Day:return(0,n.jsx)(dn,{events:e,currentDay:b,height:r,strings:m?.dayView});default:return(0,n.jsx)(ln,{events:e,currentDate:b,rowHeight:_,getCalendarDays:T,getEventsForDay:A,styles:h,onDaySlotClick:f,height:r,calendarRef:g,strings:m?.calendarControl})}},[S,e,b,_,T,A,h,f,r]),N=(0,n.jsxs)(U,{height:`100%`,verticalAlign:`start`,children:[(0,n.jsx)(an,{selectedView:S,onSelectedView:k,currentDate:b,setCurrentDate:x,onWeekChange:O,onMonthChange:E,onDayChange:D,strings:m?.toolbar}),(0,n.jsx)(M,{})]});return(0,n.jsx)(i.IdPrefixProvider,{value:`calendarControl-`,children:o?(0,n.jsx)(i.FluentProvider,{theme:o,applyStylesToPortals:!0,style:{width:`100%`},children:N}):(0,n.jsx)(`div`,{style:{width:`100%`},children:N})})},pn=()=>({tagPickerControl:(0,l.css)({border:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${i.tokens.colorNeutralBackground1} !important`,padding:`0px 10px`,boxShadow:`none`,transition:`all 0.2s ease !important`,"&::after":{display:`none !important`},"&:hover":{borderColor:`${i.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${i.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${i.tokens.colorBrandBackground2} !important`}})}),mn=({options:e,onChange:r,renderItem:a,validate:o,label:s,placeholder:c,defaultValue:l,message:u,messageType:f,required:p,size:m,hint:h})=>{let g=l?e.find(e=>e.value===l):void 0,[_,v]=(0,t.useState)(l||``),[y,b]=(0,t.useState)(g?.text||``),[x,S]=(0,t.useState)(``),C=pn(),w=(e,t)=>{let n=t.optionValue||``,i=t.optionText||``;v(n),b(i);let a=o?o(n):``;S(a),!a&&r&&r(n)},T=t.useMemo(()=>x?`error`:f===`warning`?`warning`:f===`info`?`success`:`none`,[x,f]);return(0,n.jsx)(i.Field,{label:s,required:p,validationMessage:t.useMemo(()=>x||u,[x,u]),validationMessageIcon:t.useCallback(()=>{switch(T){case`error`:return(0,n.jsx)(d.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(d.Warning12Filled,{});case`success`:return(0,n.jsx)(d.CheckmarkCircle12Filled,{});default:return null}},[T])(),size:m,hint:h,validationState:T,children:(0,n.jsx)(i.Dropdown,{placeholder:c,onOptionSelect:w,value:y,selectedOptions:_?[_]:[],className:C.tagPickerControl,children:e.map(e=>{let t=e.icon??e.checkIcon;return(0,n.jsx)(i.Option,{value:e.value,disabled:e.disabled,as:e.as,text:e.text||``,children:a?a(e):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(`span`,{style:{marginRight:4,display:`inline-flex`,alignItems:`center`},children:t}),e.text]})},e.value)})})})},hn=()=>({inputRoot:(0,l.css)({border:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${i.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${i.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${i.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${i.tokens.colorBrandBackground2} !important`}})}),gn=({value:r,type:a=`text`,shape:o=`normal`,onChange:s,validate:c,label:l,placeholder:u,message:f,messageType:p,required:m,size:h,hint:g,disabled:_,readOnly:v,min:y,max:b,step:x,contentBefore:S,contentAfter:C})=>{let[w,T]=(0,t.useState)(r===void 0?``:String(r)),[E,D]=(0,t.useState)(``),O=hn(),k=e.c(),A=r!==void 0,j=A?String(r):w,M=(0,t.useCallback)(e=>{if(m&&e.trim()===``)return a===`number`?k.numberRequired:k.fieldRequired;if(a===`number`&&e.trim()!==``){let t=Number(e);if(isNaN(t))return k.invalidNumber;if(y!==void 0&&t<y)return k.valueMustBeAtLeast.replace(`{0}`,String(y));if(b!==void 0&&t>b)return k.valueMustBeAtMost.replace(`{0}`,String(b))}return c?c(a===`number`&&e.trim()!==``?Number(e):e):``},[m,a,c,y,b,k]),N=(0,t.useCallback)((e,t)=>{let n=t.value;if(a===`number`&&n!==``&&!/^-?\d*\.?\d*$/.test(n))return;A||T(n);let r=M(n);D(r),!r&&s&&s(a===`number`&&n.trim()!==``?Number(n):n)},[a,A,M,s]),P=(0,t.useCallback)(()=>{D(M(j))},[M,j]),F=(0,t.useMemo)(()=>E?`error`:p===`warning`?`warning`:p===`info`?`success`:`none`,[E,p]),I=(0,t.useMemo)(()=>E||f,[E,f]),L=(0,t.useCallback)(()=>{switch(F){case`error`:return(0,n.jsx)(d.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(d.Warning12Filled,{});case`success`:return(0,n.jsx)(d.CheckmarkCircle12Filled,{});default:return null}},[F]),R=o===`circular`?O.inputRoot:void 0;return(0,n.jsx)(i.Field,{label:l,required:m,validationMessage:I,validationMessageIcon:L(),size:h,hint:g,validationState:F,children:(0,n.jsx)(i.Input,{value:j,placeholder:u,onChange:N,onBlur:P,disabled:_,readOnly:v,type:`text`,inputMode:a===`number`?`decimal`:`text`,step:a===`number`?x:void 0,className:R,contentBefore:S,contentAfter:C})})},_n=()=>({searchBoxStyles:g.css`
|
|
15
|
+
}`,o=document.createElement(`style`);o.setAttribute(`data-brand-font`,e.name),o.textContent=a,document.head.appendChild(o),se.add(n)})}function le(e){if(e){if(e.d)return e.d;if(e.BrandFontLibraryUrl||e.SiteUrl)return e}}var ue=new Set([`woff2`,`woff`,`ttf`,`otf`,`eot`]),de={thin:100,hairline:100,extralight:200,ultralight:200,light:300,regular:400,normal:400,medium:500,semibold:600,demibold:600,bold:700,extrabold:800,ultrabold:800,black:900,heavy:900};function fe(e,t){let n=(e?.trim()||t.replace(/\.[^.]+$/,``)).toLowerCase(),r=n.includes(`italic`)||n.includes(`oblique`),i=n.replace(/italic|oblique/gi,``).trim().replace(/[\s_-]+/g,``),a=de[i]??400;if(a===400&&i!==`regular`&&i!==`normal`&&i!==``){for(let[e,t]of Object.entries(de))if(i.includes(e)){a=t;break}}return{fontWeight:a,fontStyle:r?`italic`:`normal`}}var pe=`_SPFontFamilyName`,me=`_SPFontFaces`,he=`_spFontVisible`,ge=[{id:`fluent-base`,name:`'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif`,isDefault:!0,fontFaces:[]},{id:`fluent-monospace`,name:`'Cascadia Code', 'Cascadia Mono', Consolas, 'Courier New', monospace`,isDefault:!1,fontFaces:[]},{id:`fluent-numeric`,name:`'Bahnschrift', 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif`,isDefault:!1,fontFaces:[]}],_e=(e={})=>{let{siteUrl:n,disabled:r,fonts:i}=e,a=R(),{warn:o,error:s}=z(),[c,l]=(0,t.useState)(i??[]),[u,d]=(0,t.useState)(!r&&!i),[f,p]=(0,t.useState)(),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(!1),_=(0,t.useCallback)(async()=>{if(r)return;let e=n??a?.pageContext?.web?.absoluteUrl;if(!e){let e=`useBrandCenterFonts: no siteUrl provided and pageContext.web.absoluteUrl is not available.`;o(e),p(e),d(!1);return}d(!0),p(void 0);try{let t=`${e}/_api/SP.BrandCenter/Configuration`,n=async t=>{if(a?.graphClient)return a.graphClient.get(t);let n={Accept:`application/json;odata=nometadata`};a?.authProvider&&(n.Authorization=`Bearer ${await a.authProvider.getAccessToken([`${new URL(e).origin}/.default`])}`);let r=await fetch(t,{credentials:a?.authProvider?void 0:`include`,headers:n});if(!r.ok)throw Error(`SharePoint REST returned ${r.status}: ${t}`);return await r.json()},r=le(await n(t)),i=r?.BrandFontLibraryUrl,s=typeof i==`string`?i:i?.DecodedUrl,c=r?.IsBrandCenterSiteFeatureEnabled===!0||String(r?.IsBrandCenterSiteFeatureEnabled).toLowerCase()===`true`;if(!s||!c){o(`useBrandCenterFonts: Brand Center is not configured for this tenant — using Fluent UI 9 defaults.`),h(!1),l(ge),d(!1);return}let u=r?.SiteUrl,f=typeof u==`string`?u:u?.DecodedUrl??e,p=new URL(f).origin,m=s.startsWith(`http`)?new URL(s).pathname:s,g=await n(`${f}/_api/web/GetList('${encodeURIComponent(m)}')/items?$select=Id,FileLeafRef,FileRef,${pe},${me},${he},File/Name,File/ServerRelativeUrl&$expand=File&$top=5000`),_=g.d?.results??g.value??[],v=new Map;for(let e of _){let t=e.File?.Name??e.FileLeafRef??``,n=t.split(`.`).pop()?.toLowerCase()??``;if(!ue.has(n)||e[he]===!1)continue;let r=e[pe]??t.replace(/\.[^.]+$/,``).split(/[-_]/)[0]??t,i=v.get(r);i?i.items.push(e):v.set(r,{items:[e]})}let y=[];for(let[e,t]of v){let n=[];for(let e of t.items){let t=e.File?.Name??e.FileLeafRef??``,r=e.File?.ServerRelativeUrl??e.FileRef??``;if(!r)continue;let i=e[me],{fontWeight:a,fontStyle:o}=fe(i,t),s=`${p}${r}`;n.push({url:s,fontWeight:a,fontStyle:o})}n.length>0&&y.push({id:e,name:e,isDefault:!1,fontFaces:n})}y.length>0&&!y.some(e=>e.isDefault)&&(y[0].isDefault=!0),y.forEach(ce),l(y),h(!0)}catch(e){let t=e instanceof Error?e.message:String(e);s(`useBrandCenterFonts: failed to load fonts — falling back to Fluent UI 9 defaults`,e instanceof Error?e:void 0),p(t),h(!1),l(ge)}finally{d(!1)}},[r,n,a?.pageContext?.web?.absoluteUrl,a?.graphClient,a?.authProvider]);(0,t.useEffect)(()=>{if(i){i.forEach(ce);return}!g.current&&!r&&(g.current=!0,_())},[_,i,r]);let v=c.find(e=>e.isDefault);return{fonts:c,fontFamilyNames:c.map(e=>e.name),defaultFont:v,loading:u,error:f,isBrandCenterAvailable:m,refresh:_}},B=()=>{let e=t.useCallback((e,t)=>`${e}${t}`,[]),n=t.useCallback(e=>{if(!e)return!1;try{return!!new URL(e)}catch{return!1}},[]),r=e=>e.charAt(0)===`/`&&e.charAt(1)===`/`?e.substring(1,e.length):e,a=t.useCallback(e=>e?new RegExp(/^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$/).test(e)===!0:!1,[]),o=t.useCallback(e=>{if(!e)return``;let t=e.split(`/`);return t[t.length-1]},[]),s=t.useCallback(e=>{let t=window.location.hostname,n=`https://${t}`;if(e.indexOf(`${n}/sites/`)>-1||e.indexOf(`${n}/teams/`)>-1){let r=e.split(t)[1].split(`/`)[2],i=`https://${t}/sites/${r}`;return e.indexOf(`${n}/teams/`)>-1&&(i=`https://${t}/teams/${r}`),i}return n},[]),c=t.useCallback(e=>{let t=e.split(window.location.hostname)[1];return t=r(t),t},[]),l=t.useCallback(e=>encodeURIComponent(e.replace(/[%]/g,`%25`)).replace(/[']/g,`%27%27`).replace(/[&]/g,`%26`).replace(/[#]/g,`%23`).replace(/[?]/g,`%3F`).replace(/[/]/g,`%2F`).replace(/[+]/g,`%2B`),[]),u=t.useCallback(e=>e==null?!1:Object.prototype.hasOwnProperty.call(e,`extraSmall`)||Object.prototype.hasOwnProperty.call(e,`small`)||Object.prototype.hasOwnProperty.call(e,`medium`)||Object.prototype.hasOwnProperty.call(e,`large`)||Object.prototype.hasOwnProperty.call(e,`extraLarge`),[]),d=t.useCallback((e,t)=>e[t.toString().toLowerCase()],[]),f=t.useCallback(e=>e>=P.XXXLarge?`XXXLarge`:e>=P.ExtraExtraLarge?`ExtraExtraLarge`:e>=P.ExtraLarge?`ExtraLarge`:e>=Number(P.Large)?`Large`:e>=Number(P.Medium)?`Medium`:e>=Number(P.Small)?`Small`:`ExtraSmall`,[]),p=t.useCallback((e,t)=>{let n=f(t),r={ExtraSmall:`xs`,Small:`s`,Medium:`m`,Large:`l`,ExtraLarge:`xl`,ExtraExtraLarge:`xxl`},i=e;return u(e)&&(i=d(e,n??`Medium`)||r[n]),i},[f,u,d]),m=t.useCallback((e,t,n)=>{if(!e)return`none`;if(typeof e==`string`&&(/^\d+px$/.test(e)||/^\d+%$/.test(e)))return e;let r=n,a={padding:`spacingHorizontal`,vertical:`spacingVertical`,horizontal:`spacingHorizontal`};switch(p(e,t)){case`none`:return i.tokens[`${a[r]}None`];case`xxs`:return i.tokens[`${a[r]}XXS`];case`xs`:return i.tokens[`${a[r]}XS`];case`sNudge`:return i.tokens[`${a[r]}SNudge`];case`s`:return i.tokens[`${a[r]}S`];case`mNudge`:return i.tokens[`${a[r]}MNudge`];case`m`:return i.tokens[`${a[r]}M`];case`l`:return i.tokens[`${a[r]}L`];case`xl`:return i.tokens[`${a[r]}XL`];case`xxl`:return i.tokens[`${a[r]}XXL`];case`xxxl`:return i.tokens[`${a[r]}XXXL`];default:return i.tokens[`${a[r]}M`]}},[p]);return{getCacheKey:e,validateUrl:n,trimBeginDoubleSlash:r,isValidGUID:a,getPageNameFromUrl:o,getSPSiteAbsoluteUrl:s,getFileServerRelativeUrlFromAbsoluteUrl:c,encodeRestUrl:l,getSpacing:m,getCurrentDevice:f,getBaseStyles:t.useCallback((e,t,n)=>{let{verticalSpacing:r,horizontalSpacing:i,paddingLeft:a,paddingRight:o,paddingBottom:s,background:c,width:l,maxWidth:u,height:d,maxHeight:f,marginLeft:p,marginRight:h,marginTop:g,marginBottom:_,paddingTop:v,padding:y,margin:b,styles:x}=e,S=m(v,t,`padding`),C=m(a,t,`padding`),w=m(o,t,`padding`),T=m(s,t,`padding`),E=m(y,t,`padding`),D=m(p,t,`padding`),O=m(h,t,`padding`),k=m(g,t,`padding`),A=m(_,t,`padding`),j=m(b,t,`padding`);E&&(S=S===`none`?E:S,C=C===`none`?E:C,w=w===`none`?E:w,T=T===`none`?E:T),j&&(D=D===`none`?j:D,O=O===`none`?j:O,k=k===`none`?j:k,A=A===`none`?j:A);let M=`${m(r,t,`vertical`)} ${m(i,t,`horizontal`)}`,{padding:N,margin:ee,paddingTop:P,paddingLeft:F,paddingRight:I,paddingBottom:L,marginTop:R,marginLeft:z,marginRight:te,marginBottom:ne,...re}=x??{};return{...re,gap:M,paddingTop:S,paddingLeft:C,paddingRight:w,paddingBottom:T,marginLeft:D,marginRight:O,marginTop:k,marginBottom:A,background:c,width:l??void 0,height:d??void 0,maxWidth:u??void 0,maxHeight:f??void 0,overflow:`auto`}},[m]),getLayoutBreakPoint:t.useCallback((e,t)=>{let n=f(t),r=e;return u(e)&&(r=d(e,n??`Medium`)||``),r},[f,u,d])}},ve={"en-US":o.enUS,"es-ES":o.es,"fr-FR":o.fr,"de-DE":o.de,"it-IT":o.it,"pt-BR":o.pt,"pt-PT":o.pt,"ja-JP":o.ja,"ko-KR":o.ko,"zh-CN":o.zhCN},ye=(e,t)=>{let n=t&&ve[t]||o.enUS,{error:r}=z();return{getFormatRelative:e=>{try{return(0,a.formatDistanceToNow)(typeof e==`string`?(0,a.parseISO)(e):e,{addSuffix:!0,locale:n})}catch(e){return r(`Error formatting relative time:`,e instanceof Error?e:void 0),``}},convertDateToUTC:e=>{try{let t=typeof e==`string`?(0,a.parseISO)(e):e;return new Date(t.toUTCString())}catch(e){return r(`Error converting to UTC:`,e instanceof Error?e:void 0),new Date}},formatDate:(e,t=`PPpp`)=>{try{return(0,a.format)(typeof e==`string`?(0,a.parseISO)(e):e,t,{locale:n})}catch(e){return r(`Error formatting date:`,e instanceof Error?e:void 0),``}},getTimezoneOffset:()=>new Date().getTimezoneOffset(),convertToTimezone:(n,i)=>{try{let r=typeof n==`string`?(0,a.parseISO)(n):n,o=i||e||Intl.DateTimeFormat().resolvedOptions().timeZone;return r.toLocaleString(t||`en-US`,{timeZone:o})}catch(e){return r(`Error converting timezone:`,e instanceof Error?e:void 0),(typeof n==`string`?new Date(n):n).toString()}}}},be=(e,t,n)=>{let{getFormatRelative:r,formatDate:i}=ye(t,e);return{formatUtcDate:(e,t=`PP`)=>{let n=(0,a.differenceInDays)(new Date,(0,a.parseISO)(e)),o=``;return e!==void 0&&(o=n>7?i(e,t):r(e)),o},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{let r=typeof n==`string`?new Date(n):n,i=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),a,o,s,c,l,u;for(let e of i)switch(e.type){case`year`:a=e.value;break;case`month`:o=e.value;break;case`day`:s=e.value;break;case`hour`:c=e.value;break;case`minute`:l=e.value;break;case`second`:u=e.value;break;default:break}let d=`${a}-${o}-${s}T${c}:${l}:${u}Z`;return new Date(d)}}},xe=process.env.NODE_ENV!==`production`,Se=`data:image/`,Ce=()=>{let{error:e}=z(),n=(0,t.useCallback)(async e=>{let t=await fetch(e).then(e=>e.text());return`data:image/svg+xml;base64,`+btoa(t)},[]),r=(0,t.useCallback)(async(t,n,r)=>new Promise((i,a)=>{let o=new Image;o.crossOrigin=`anonymous`,o.addEventListener(`load`,()=>{let t=document.createElement(`canvas`);t.width=n??o.width,t.height=r??o.height,t?.getContext(`2d`)?.drawImage(o,0,0,n??o.width,r??o.height);let s;try{s=t.toDataURL(`image/png`,1),i(s)}catch(t){xe&&e(`[ImageService.getBase64Image]: Err='${t.message}'`),a(t)}}),o.addEventListener(`error`,t=>{xe&&e(`[ImageService.getBase64Image]: Image load error='${t.message}'`),a(t)}),o.src=t}),[]),i=(0,t.useCallback)(e=>!(0,s.isEmpty)(e)&&e.indexOf(Se)>=0,[]);return{getBase64ImageFromDOMImg:(0,t.useCallback)(t=>{try{let e=document.getElementById(t),n=document.createElement(`canvas`);return n.width=e.width,n.height=e.height,n.getContext(`2d`)?.drawImage(e,0,0),n.toDataURL(`image/png`)}catch(t){xe&&e(`[getBase64ImageFromDOMImg]: Err='${t.message}'`);return}},[]),isBase64Image:i,getImageBase64:r,base64FromSVGUrl:n}};function we(e,t=0){let n=null;return function(...r){let i=this;n&&clearTimeout(n),n=setTimeout(()=>{e.apply(i,r)},t)}}function Te(e,t=0){let n=null,r=0;return function(...i){let a=this,o=Date.now();r||=o;let s=t-(o-r);s<=0||s>t?(n&&=(clearTimeout(n),null),r=o,e.apply(a,i)):n||=setTimeout(()=>{r=Date.now(),n=null,e.apply(a,i)},s)}}function Ee(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)return e.map(e=>Ee(e));if(e instanceof Object){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n]=Ee(e[n]));return t}return e}function De(e){return e==null?!0:typeof e==`string`||Array.isArray(e)?e.length===0:typeof e==`object`?Object.keys(e).length===0:!1}function Oe(e,t,n){let r=Array.isArray(t)?t:t.split(`.`),i=e;for(let e of r){if(i==null)return n;i=i[e]}return i===void 0?n:i}function ke(e,t,n){let r=Array.isArray(t)?t:t.split(`.`),i=r.pop();if(!i)return e;let a=e;for(let e of r)(!(e in a)||typeof a[e]!=`object`)&&(a[e]={}),a=a[e];return a[i]=n,e}function Ae(e){return Array.from(new Set(e))}function je(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function Me(e,t){return e.reduce((e,n)=>{let r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})}function Ne(e,t){return e.map(t)}function Pe(e,t){return e.filter(t)}function Fe(e,t){return e.some(t)}function Ie(e,t){return e.every(t)}var V=function(e){return e.HTML=`html`,e.MARKDOWN=`markdown`,e.ADAPTIVE_CARD=`adaptiveCard`,e.PLAIN_TEXT=`plainText`,e}({}),Le=e=>{try{let t=JSON.parse(e);return typeof t==`object`&&!!t}catch{return!1}},Re=e=>{try{let t=JSON.parse(e);return t&&typeof t==`object`&&(t.type===`AdaptiveCard`||t.$schema?.includes(`adaptivecards.io`))}catch{return!1}},ze=e=>{let t=e.trim(),n=[/^<!DOCTYPE\s+html/i,/^<html[\s>]/i,/^<\?xml/i,/<(div|span|p|h[1-6]|table|ul|ol|li|a|img|br|hr|strong|em|b|i)[\s>]/i],r=/<[^>]+>/.test(t),i=/^<[^>]+>/.test(t),a=(t.match(/<(?!\/)[^>]+>/g)||[]).length;return n.some(e=>e.test(t))||r&&i&&a>0},Be=e=>{let t=e.trim(),n=[/^#{1,6}\s+.+$/m,/\*\*.*?\*\*/,/\*.*?\*/,/__.*?__/,/_.*?_/,/\[.*?\]\(.*?\)/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/`[^`]+`/,/^```/m,/^\|.*\|.*\|$/m,/^>\s+/m,/^\s*---\s*$/m].some(e=>e.test(t)),r=/^<[^>]+>/.test(t);return n&&!r},Ve=(e,t,n=!1)=>{let r=t.filter(t=>t.test(e)).length/t.length;return n?1-r:r},He=e=>{if(typeof e==`object`&&e){let t=e;if(t.type===`AdaptiveCard`||t.$schema?.includes(`adaptivecards.io`))return{type:V.ADAPTIVE_CARD,content:e,confidence:1};e=JSON.stringify(e,null,2)}let t=e,n=t.trim();if(!n||n.length<3)return{type:V.PLAIN_TEXT,content:t,confidence:1};if(Le(n)&&Re(n))return{type:V.ADAPTIVE_CARD,content:JSON.parse(n),confidence:1};if(ze(n)){let e=Math.max(.7,Ve(n,[/^<!DOCTYPE\s+html/i,/^<html[\s>]/i,/<(div|span|p|h[1-6]|table|ul|ol|li)[\s>]/i]));return{type:V.HTML,content:t,confidence:e}}if(Be(n)){let e=Math.max(.6,Ve(n,[/^#{1,6}\s+.+$/m,/\*\*.*?\*\*/,/\[.*?\]\(.*?\)/,/^\s*[-*+]\s+/m,/`[^`]+`/,/^```/m,/^\|.*\|.*\|$/m]));return{type:V.MARKDOWN,content:t,confidence:e}}return{type:V.PLAIN_TEXT,content:t,confidence:.5}},Ue=e=>He(e).type,We=e=>{let{styles:n}=e,{getBaseStyles:r}=B();return{cardStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n]),bodyCardDefaultStyles:t.useMemo(()=>({display:`flex`,flexDirection:`column`,justifyContent:`start`,alignItems:`stretch`,overflow:`unset`}),[])}},Ge=e=>{let{className:r,cardBody:a,cardBodyClassName:o,cardHeader:s,cardHeaderClassName:l,cardHeaderImage:u,cardHeaderAction:d,cardHeaderDescription:f,cardFooterAction:p,cardFooterClassName:m,cardFooterContent:h,cardPreviewImage:g,cardPreviewLogo:_,cardPreviewPosition:v=`top`}=e,{cardStyles:y,bodyCardDefaultStyles:b}=We(e),x=t.useRef(null),[S,C]=t.useState(0),[w,T]=t.useState(0);return t.useEffect(()=>{let e;return x.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;C(e),T(n)}}),e.observe(x.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{ref:x,children:(0,n.jsxs)(i.Card,{className:r,style:y(S,w),...e,children:[g&&v===`top`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),s&&(0,n.jsx)(i.CardHeader,{className:l,image:u,header:s,description:f,action:d}),g&&v===`afterHeader`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),a&&(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(o),style:b,children:a}),g&&v===`bottom`&&(0,n.jsxs)(i.CardPreview,{logo:_,children:[g,` `]}),h&&(0,n.jsx)(i.CardFooter,{action:p,className:m,children:h})]})})})},Ke=e=>{let{cols:n,verticalSpacing:r,horizontalSpacing:i,styles:a,gridItemAutoFlow:o,minItemWidth:s}=e,{getSpacing:c,getCurrentDevice:l,getBaseStyles:u}=B();return{gridStyles:t.useCallback((t,d)=>{let f=u(e,t,d),p=`${c(r,t,`vertical`)} ${c(i,t,`horizontal`)}`,m=l(t),h=`repeat(auto-${o??`fill`}, minmax(min(100%, ${s??250}px), 1fr))`;if(n&&n>0){let e=n??0;switch(m){case`ExtraSmall`:e=Math.min(n,1);break;case`Small`:e=Math.min(n,2);break;case`Medium`:e=Math.min(n,3);break;case`Large`:e=Math.min(n,4);break;case`ExtraLarge`:e=Math.min(n,4);break;case`ExtraExtraLarge`:e=Math.min(n,5);break;case`XXXLarge`:e=Math.min(n,6);break;default:e=0}h=`repeat(${e}, minmax(auto, 1fr))`}return{...f,display:`grid`,gridTemplateColumns:h,gap:p,overflow:`hidden`,...a}},[u,e,c,r,i,l,n,a,o,s])}},qe=e=>{let{children:r,className:i}=e,{gridStyles:a}=Ke(e),o=t.useRef(null),[s,l]=t.useState(0),[u,d]=t.useState(0);return t.useEffect(()=>{let e;return o.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;l(e),d(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:i,style:a(s,u),ref:o,children:r})})},Je=e=>{let{maxWith:n}=e,{getBaseStyles:r}=B();return{rootStyles:t.useCallback((t,i)=>({...r(e,t,i),maxWidth:n}),[r,n,e]),layoutGridStyles:(0,l.css)({display:`grid`,overflow:`hidden`})}},Ye={areas:[`header header header`,`sidebar content sidebar`,`footer footer footer`],columns:`1fr 3fr 1fr`,rows:`auto 1fr auto`},Xe=e=>{let{className:r,children:a,layoutConfig:o=Ye}=e,s=t.useRef(null),[l,u]=t.useState(0),[d,f]=t.useState(0),{rootStyles:p,layoutGridStyles:m}=Je({...e,layoutConfig:o}),h=((e,n)=>{let r;return t.useCallback((...t)=>{clearTimeout(r),r=setTimeout(()=>e(...t),n)},[e,n])})((e,t)=>{u(e),f(t)},200);return t.useEffect(()=>{if(!s.current)return;let e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(s.current),()=>e.disconnect()},[h]),(0,n.jsx)(`div`,{id:`-Layout`,className:(0,i.mergeClasses)(r,m),style:{...p(l,d),gridTemplateAreas:o.areas.join(` `),gridTemplateColumns:o.columns,gridTemplateRows:o.rows},ref:s,children:t.Children.map(a,(e,r)=>t.isValidElement(e)?(0,n.jsx)(`div`,{style:{gridArea:e.props?.area??`area-${r}`},children:e},r):e)})},Ze=e=>{let{area:t,children:r}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{style:{gridArea:t},children:r})})},Qe=e=>{let{verticalSpacing:n,horizontalSpacing:r}=e,{getSpacing:i}=B();return{spaceStyles:t.useCallback(e=>e?r?{width:i(r,e,`horizontal`)}:n?{height:i(n,e,`vertical`)}:{}:{},[i,r,n])}},$e=e=>{let r=t.useRef(null),[i,a]=t.useState(0),{spaceStyles:o}=Qe(e);return t.useEffect(()=>{let e;return r.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e}=t.contentRect;a(e)}}),e.observe(r.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{id:`-space`,style:o(i),ref:r})})},et=e=>{let{horizontal:n,horizontalAlign:r,verticalAlign:i,verticalFill:a,wrap:o,columnGap:s,RowGap:c}=e,{getBaseStyles:l}=B();return{stackStyles:t.useCallback((t,u)=>{let d=i||`start`,f=n?r:`start`,p=n?{flexFlow:o?`row wrap`:`row nowrap`,height:`100%`}:{height:`100%`,maxHeight:`100%`},m=l(e,t,u);return{columnGap:s,rowGap:c,display:`flex`,flexDirection:n?`row`:`column`,alignItems:d,justifyContent:f,...p,height:a?`100%`:m.height,...m,...e.styles}},[l,n,r,e,i,a,o])}},H=e=>{let{children:r,className:i}=e,{stackStyles:a}=et(e),o=t.useRef(null),[s,l]=t.useState(0),[u,d]=t.useState(0);return t.useEffect(()=>{let e;return o.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;l(e),d(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:i,style:a(s,u),ref:o,children:r})})},tt=e=>{let{children:r,grow:i,disableShrink:a,shrink:o,order:s,alignSelf:l,verticalFill:u}=e,{getBaseStyles:d}=B(),f=t.useRef(null),[p,m]=t.useState(0),[h,g]=t.useState(0),_=d(e,p,h);return t.useEffect(()=>{let e;return f.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;m(e),g(n)}}),e.observe(f.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{ref:f,style:{..._,alignSelf:l,order:s,height:u?`100%`:`auto`,flexGrow:i?typeof i==`boolean`?1:i:void 0,flexShrink:a||!i&&!o?0:1,minWidth:0,minHeight:0,width:`auto`},children:r})})},nt=({ratio:e,children:t,maxWidth:r,maxHeight:i,style:a={},...o})=>{let s={position:`relative`,width:`100%`,paddingTop:`${100/e}%`,maxWidth:r||`none`,maxHeight:i||`none`,...a},c={position:`absolute`,top:0,left:0,width:`100%`,height:`100%`};return(0,n.jsx)(`div`,{style:s,...o,children:(0,n.jsx)(`div`,{style:c,children:t})})},rt=e=>{let{styles:n}=e,{getBaseStyles:r}=B();return{aspectRatioStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n])}},it=e=>{let{styles:n}=e,{getBaseStyles:r}=B();return{centerStyles:t.useCallback((t,i)=>({...r(e,t,i),...n,overflow:`hidden`,display:`flex`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`}),[r,e,n]),childrenStyles:(0,l.css)({justifyContent:`center`,textAlign:`center`})}},at=e=>{let{className:r,children:i}=e,a=t.useRef(null),[o,s]=t.useState(0),[l,u]=t.useState(0),{centerStyles:d}=it(e),f=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}};return t.useEffect(()=>{let e=f(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;s(e),u(n)}},200),t=new c.ResizeObserver(t=>{e(t)});return a.current&&t.observe(a.current),()=>{t.disconnect()}},[]),(0,n.jsx)(`div`,{id:`center`,className:r,style:{...d(o,l),display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`},ref:a,children:i})},ot=e=>{let{maxWidth:n}=e,{getBaseStyles:r}=B();return{containerStyles:t.useCallback((t,i)=>!t||!i?{}:{...r(e,t,i),maxWidth:n},[r,n,e])}},st=e=>{let{className:r,children:i,style:a,alignItems:o=`center`,justifyContent:l=`center`,flexDirection:u=`row`,centerContent:d=!0}=e,f=t.useRef(null),[p,m]=t.useState(0),[h,g]=t.useState(0),{containerStyles:_}=ot(e),v=t.useMemo(()=>(0,s.debounce)(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;m(e),g(n)}},200),[]);t.useEffect(()=>{let e=new c.ResizeObserver(e=>{v(e)});return f.current&&e.observe(f.current),()=>{e.disconnect(),v.cancel()}},[v]);let y=t.useMemo(()=>{if(!a)return;let{padding:e,margin:t,...n}=a;return n},[a]);return(0,n.jsx)(`div`,{id:`container`,className:r,style:{..._(p,h),display:`flex`,justifyContent:l,alignItems:o,flexDirection:u,...y},ref:f,children:d?(0,n.jsx)(at,{children:i}):i})},ct=e=>{let[n,r]=(0,t.useState)(!0),[i,a]=(0,t.useState)(!0),o=(0,t.useCallback)(()=>{e&&e.scrollPrev()},[e]),s=(0,t.useCallback)(()=>{e&&e.scrollNext()},[e]),c=(0,t.useCallback)(e=>{r(!e.canScrollPrev()),a(!e.canScrollNext())},[]);return(0,t.useEffect)(()=>{e&&(c(e),e.on(`reInit`,c),e.on(`select`,c))},[e,c]),{prevBtnDisabled:n,nextBtnDisabled:i,onPrevButtonClick:o,onNextButtonClick:s}},lt=(e,n)=>{let{getCurrentDevice:r}=B(),a=t.useCallback(()=>{let e=r(n),t=`95%`;switch(e){case`Medium`:t=`45%`;break;case`Large`:t=`calc(95% / 4)`;break;case`ExtraLarge`:t=`calc(95% / 5)`;break;case`ExtraExtraLarge`:t=`calc(95% / 6)`;break;default:t=`95%`;break}return t},[n,r]),o=t.useCallback(()=>{let e=r(n),t=i.tokens.spacingVerticalM;switch(e){case`Medium`:t=i.tokens.spacingVerticalM;break;case`Large`:t=i.tokens.spacingVerticalL;break;case`ExtraLarge`:t=i.tokens.spacingVerticalXL;break;default:t=i.tokens.spacingVerticalM;break}return t},[n,r]);return{enableControls:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:10,padding:5}),embla__viewport:(0,l.css)({overflow:`hidden`,paddingTop:`10px`,paddingBottom:`20px`}),embla__container:(0,l.css)({backfaceVisibility:`hidden`,display:`flex`,touchAction:`pan-y`}),embla:(0,l.css)({".embla":{}}),embla__slide:(0,l.css)({minWidth:0,flex:`0 0 ${a()}`,paddingLeft:`${o()}`}),embla__buttons:(0,l.css)({display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:0,alignItems:`center`})}},ut=e=>{let{styles:n}=e,{getBaseStyles:r}=B();return{carouselStyles:t.useCallback((t,i)=>({...r(e,t,i),...n}),[r,e,n])}},dt=()=>({titleStyles:(0,l.css)({display:`-webkit-box`,overflow:`hidden`,textOverflow:`ellipsis`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,textAlign:`start`})}),ft=e=>{let{className:r,items:a,title:o}=e,s=t.useRef(null),[l,f]=t.useState(0),[p,m]=t.useState(0),{carouselStyles:h}=ut(e),[g,_]=(0,u.default)(),v=dt(),{enableControls:y,embla__slide:b,embla__container:x,embla__viewport:S,embla__buttons:C}=lt(e,l),{prevBtnDisabled:w,nextBtnDisabled:T,onPrevButtonClick:E,onNextButtonClick:D}=ct(_);return t.useEffect(()=>{let e;return s.current&&(e=new c.ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;f(e),m(n)}}),f(s.current.clientWidth),m(s.current.clientHeight),e.observe(s.current)),()=>{e&&e.disconnect()}},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{id:`-carousel`,role:`region`,"aria-roledescription":`carousel`,"aria-label":o||`Carousel`,className:(0,i.mergeClasses)(r,`embla`),style:{...h(l,p)},ref:s,children:[(0,n.jsxs)(`div`,{className:y,children:[(0,n.jsx)(i.Subtitle2,{className:v.titleStyles,children:o}),(0,n.jsxs)(`div`,{className:C,children:[(0,n.jsx)(i.Button,{onClick:E,disabled:w,appearance:`subtle`,icon:(0,n.jsx)(d.ChevronLeftRegular,{}),"aria-label":`Previous slide`}),(0,n.jsx)(i.Button,{onClick:D,disabled:T,appearance:`subtle`,icon:(0,n.jsx)(d.ChevronRightRegular,{}),"aria-label":`Next slide`})]})]}),(0,n.jsx)(`div`,{className:S,ref:g,children:(0,n.jsx)(`div`,{className:x,children:a.map((e,t)=>(0,n.jsx)(`div`,{className:b,role:`group`,"aria-roledescription":`slide`,"aria-label":`Slide ${t+1} of ${a.length}`,children:e},t))})})]})})},pt=e=>{let{direction:t=`horizontal`,resizerSize:n=6}=e,r=t===`horizontal`;return{root:(0,l.css)({position:`relative`,width:`100%`,height:`100%`}),pane:e=>{let t=e===void 0?void 0:typeof e==`number`?`${e}px`:e;return(0,l.css)({overflow:`auto`,position:`relative`,...r?{width:t,height:`100%`}:{height:t,width:`100%`}})},secondaryPane:(0,l.css)({flex:1,overflow:`auto`,position:`relative`,minWidth:0,minHeight:0}),resizer:(0,l.css)({flex:`0 0 auto`,...r?{width:n,cursor:`col-resize`,height:`100%`}:{height:n,cursor:`row-resize`,width:`100%`},backgroundColor:i.tokens.colorNeutralStroke1,transition:`background-color 150ms ease`,userSelect:`none`,zIndex:1}),resizerActive:(0,l.css)({backgroundColor:i.tokens.colorBrandStroke1}),resizerGrip:(0,l.css)({gap:`2px`}),gripDot:(0,l.css)({width:3,height:3,borderRadius:`50%`,backgroundColor:i.tokens.colorNeutralForeground3})}},U={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},W=t.default.memo(t.default.forwardRef(({direction:e=`vertical`,justifyContent:t=`flex-start`,alignItems:r=`stretch`,gap:a,columnGap:o,rowGap:s,margin:c,padding:u,marginTop:d,marginBottom:f,marginLeft:p,marginRight:m,paddingTop:h,paddingBottom:g,paddingLeft:_,paddingRight:v,width:y,height:b,wrap:x=!1,children:S,style:C,className:w,overflow:T,background:E},D)=>(0,n.jsx)(`div`,{ref:D,className:(0,i.mergeClasses)(w,(0,l.css)({display:`flex`,flexDirection:e===`horizontal`?`row`:`column`,justifyContent:t,alignItems:r,gap:a&&U[a]?U[a]:a,columnGap:o&&U[o]?U[o]:o,rowGap:s&&U[s]?U[s]:s,margin:c&&U[c]?U[c]:c,padding:u&&U[u]?U[u]:u,marginTop:d&&U[d]?U[d]:d,marginBottom:f&&U[f]?U[f]:f,marginLeft:p&&U[p]?U[p]:p,marginRight:m&&U[m]?U[m]:m,paddingTop:h&&U[h]?U[h]:h,paddingBottom:g&&U[g]?U[g]:g,paddingLeft:_&&U[_]?U[_]:_,paddingRight:v&&U[v]?U[v]:v,width:y,height:b,overflow:T,flexWrap:x?`wrap`:`nowrap`,backgroundColor:E,...C})),children:S}))),mt=e=>{let{direction:r=`horizontal`,defaultSize:i=`50%`,minSize:a=100,maxSize:o=1/0,minSecondarySize:s=100,resizable:c=!0,onResize:l,onResizeEnd:u,primaryContent:d,secondaryContent:f,className:p,styles:m}=e,h=pt(e),g=r===`horizontal`,_=t.useRef(null),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(!1),[C,w]=t.useState(!1);t.useEffect(()=>{if(y!==null||!_.current)return;let e=_.current.getBoundingClientRect(),t=g?e.width:e.height;if(typeof i==`number`)b(Math.min(Math.max(i,a),o));else if(typeof i==`string`&&i.endsWith(`%`)){let e=parseFloat(i)/100;b(Math.min(Math.max(t*e,a),o))}else b(t/2)},[i,a,o,g,y]);let T=t.useCallback(t=>{if(!_.current)return t;let n=_.current.getBoundingClientRect(),r=(g?n.width:n.height)-(e.resizerSize??6)-s;return Math.min(Math.max(t,a),Math.min(o,r))},[g,o,a,s,e.resizerSize]),E=t.useCallback(e=>{if(!c)return;e.preventDefault(),S(!0);let t=g?e.clientX:e.clientY,n=y??0,r=e=>{let r=T(n+((g?e.clientX:e.clientY)-t));b(r),l?.(r)},i=()=>{if(S(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),v.current){let e=g?v.current.getBoundingClientRect().width:v.current.getBoundingClientRect().height;u?.(e)}};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},[c,g,y,T,l,u]),D=t.useCallback(e=>{if(!c)return;S(!0);let t=e.touches[0],n=g?t.clientX:t.clientY,r=y??0,i=e=>{let t=e.touches[0],i=T(r+((g?t.clientX:t.clientY)-n));b(i),l?.(i)},a=()=>{if(S(!1),document.removeEventListener(`touchmove`,i),document.removeEventListener(`touchend`,a),v.current){let e=g?v.current.getBoundingClientRect().width:v.current.getBoundingClientRect().height;u?.(e)}};document.addEventListener(`touchmove`,i,{passive:!1}),document.addEventListener(`touchend`,a)},[c,g,y,T,l,u]),O=t.useCallback(e=>{if(!c||y===null)return;let t=e.shiftKey?50:10,n=0;if(g?e.key===`ArrowLeft`?n=-t:e.key===`ArrowRight`&&(n=t):e.key===`ArrowUp`?n=-t:e.key===`ArrowDown`&&(n=t),n!==0){e.preventDefault();let t=T(y+n);b(t),l?.(t),u?.(t)}},[c,y,g,T,l,u]);t.useEffect(()=>(x?(document.body.style.userSelect=`none`,document.body.style.cursor=g?`col-resize`:`row-resize`):(document.body.style.userSelect=``,document.body.style.cursor=``),()=>{document.body.style.userSelect=``,document.body.style.cursor=``}),[x,g]);let k=t.useRef(null),A=[h.resizer,C||x?h.resizerActive:``].filter(Boolean).join(` `);return t.useEffect(()=>{if(!c||!k.current)return;let e=k.current,t=e=>E(e),n=e=>D(e),r=e=>O(e),i=()=>w(!0),a=()=>w(!1);return e.addEventListener(`mousedown`,t),e.addEventListener(`touchstart`,n),e.addEventListener(`keydown`,r),e.addEventListener(`mouseenter`,i),e.addEventListener(`mouseleave`,a),()=>{e.removeEventListener(`mousedown`,t),e.removeEventListener(`touchstart`,n),e.removeEventListener(`keydown`,r),e.removeEventListener(`mouseenter`,i),e.removeEventListener(`mouseleave`,a)}},[c,E,D,O]),(0,n.jsxs)(W,{ref:_,className:[h.root,p].filter(Boolean).join(` `),style:{height:`100%`,width:`100%`,...m},direction:g?`horizontal`:`vertical`,overflow:`hidden`,children:[(0,n.jsx)(W,{ref:v,className:h.pane(y??void 0),style:{flex:`0 0 auto`},children:d}),c&&(0,n.jsx)(`div`,{ref:k,className:A,style:{flex:`0 0 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},role:`separator`,"aria-orientation":g?`vertical`:`horizontal`,"aria-valuenow":Math.round(y??a),"aria-valuemin":a,"aria-valuemax":o===1/0?void 0:o,"aria-label":`Resize pane`,tabIndex:0,children:(0,n.jsxs)(W,{className:h.resizerGrip,direction:g?`vertical`:`horizontal`,alignItems:`center`,justifyContent:`center`,children:[(0,n.jsx)(W,{className:h.gripDot,children:``}),(0,n.jsx)(W,{className:h.gripDot,children:``}),(0,n.jsx)(W,{className:h.gripDot,children:``})]})}),(0,n.jsx)(W,{className:h.secondaryPane,style:{flex:1,minWidth:0,minHeight:0},children:f})]})},ht=({anchorPoint:e,isOpen:r,onClose:a,excludeRefs:o,children:s,theme:c})=>{let l=(0,t.useRef)(null),[u,d]=(0,t.useState)(null);(0,t.useLayoutEffect)(()=>{if(!r){d(null);return}if(l.current){let t=l.current.getBoundingClientRect(),n=e.left,r=e.top;n+t.width>window.innerWidth&&(n=window.innerWidth-t.width-10),r+t.height>window.innerHeight&&(r=window.innerHeight-t.height-10),d({left:n,top:r})}},[e,r,s]);let p=t.default.useCallback(e=>{let t=e.target;if(l.current&&!l.current.contains(t)){if(o&&o.some(e=>e.current&&e.current.contains(t)))return;a()}},[a,o]);if((0,t.useEffect)(()=>{if(!r)return;let e=requestAnimationFrame(()=>{document.addEventListener(`mousedown`,p)}),t=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,t),()=>{cancelAnimationFrame(e),document.removeEventListener(`mousedown`,p),document.removeEventListener(`keydown`,t)}},[r,p,a]),!r)return null;let m=u||e;return f.default.createPortal(c?(0,n.jsx)(i.FluentProvider,{theme:c,children:(0,n.jsx)(i.Card,{ref:l,role:`dialog`,"aria-modal":`true`,style:{position:`fixed`,zIndex:1e3,top:m.top,left:m.left},children:s})}):(0,n.jsx)(i.Card,{ref:l,role:`dialog`,"aria-modal":`true`,style:{position:`fixed`,zIndex:1e3,top:m.top,left:m.left},children:s}),document.body)},gt=(0,i.makeStyles)({labelContainer:{display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignItems:`center`,...i.shorthands.gap(`6px`)},iconStyles:{width:`26px`},item:{paddingLeft:`15px`}}),_t=e=>{let{label:r,icon:a,isRequired:o}=e,s=gt();return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.labelContainer,children:[a&&t.isValidElement(a)?a:(0,n.jsx)(p.Icon,{icon:a,className:s.iconStyles,width:`20px`,height:`20px`,color:i.tokens.colorBrandForeground1,"aria-hidden":`true`}),(0,n.jsx)(i.Caption1,{style:{color:i.tokens.colorBrandForeground1},children:r}),(0,n.jsx)(i.Caption1,{style:{color:i.tokens.colorPaletteRedForeground1},children:o?` *`:``})]})})},vt=(0,i.makeStyles)({root:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,width:`100%`},spinner:{width:`100px`,height:`100px`}}),yt=e=>{let{size:t,label:r,labelPosition:a,style:o,className:s}=e,c=vt();return(0,n.jsx)(`div`,{className:c.root,children:(0,n.jsx)(i.Spinner,{style:o,className:(0,i.mergeClasses)(c.spinner,s),size:t,label:r,labelPosition:a,"aria-label":r?void 0:`Loading`})})},bt={xs:i.tokens.fontSizeBase200,s:i.tokens.fontSizeBase300,m:i.tokens.fontSizeBase400,l:i.tokens.fontSizeBase500,xl:i.tokens.fontSizeBase600,xxl:i.tokens.fontSizeHero700},G={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},xt={regular:i.tokens.fontWeightRegular,semibold:i.tokens.fontWeightSemibold,bold:i.tokens.fontWeightBold},St=e=>{let{fontSize:t,fontFamily:r,fontWeight:a,numberOfLines:o,as:s,padding:c,paddingTop:u,paddingBottom:d,paddingLeft:f,paddingRight:p,margin:m,marginTop:h,marginBottom:g,marginLeft:_,marginRight:v,children:y,style:b,className:x,color:S,block:C,truncate:w,wrap:T}=e,E=(0,l.css)({color:S,padding:c&&G[c]?G[c]:c,paddingTop:u&&G[u]?G[u]:u,paddingBottom:d&&G[d]?G[d]:d,paddingLeft:f&&G[f]?G[f]:f,paddingRight:p&&G[p]?G[p]:p,margin:m&&G[m]?G[m]:m,marginTop:h&&G[h]?G[h]:h,marginBottom:g&&G[g]?G[g]:g,marginLeft:_&&G[_]?G[_]:_,marginRight:v&&G[v]?G[v]:v}),D={...b,...r?{fontFamily:r}:{},...t?{fontSize:bt[t]?bt[t]:t}:{},...a?{fontWeight:xt[a]?xt[a]:a}:{},...o?{display:`-webkit-box`,WebkitBoxOrient:`vertical`,overflow:`hidden`,WebkitLineClamp:o}:{}};return(0,n.jsx)(i.Text,{as:s,className:(0,i.mergeClasses)(x,E),style:D,block:C,truncate:w,wrap:T,children:y})},Ct=e=>{let{onSelected:r,value:a,styles:o,options:s,apparence:c,shape:l,label:u}=e,d=t.useRef(),[f,p]=t.useState(a??s[0]),[m,h]=t.useState({option:[a?a?.key:s?.[0]?.key]}),g=t.useRef(null);t.useEffect(()=>{a!==void 0&&(p(a),h({option:[a.key]})),d.current=s.find(e=>e.key===(a?.key??s[0]?.key))?.icon},[a]);let[_,v]=t.useState(!1),y=t.useCallback((e,t)=>{v(t.open)},[]),b=t.useCallback(e=>e?.text??``,[]),x=t.useCallback((e,{name:t,checkedItems:n})=>{if(t===`option`){let e=n[0];p(s.find(t=>t.key===e)),h({option:n}),d.current=s.find(t=>t.key===e)?.icon,r(s.find(t=>t.key===e))}},[s,r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Field,{label:u,style:o,ref:g,children:(0,n.jsxs)(i.Menu,{open:_,onOpenChange:y,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:l??`circular`,icon:d.current,appearance:c??`secondary`,children:b(f)??`No data available`})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{onCheckedValueChange:x,checkedValues:m,style:{width:g.current?.offsetWidth},children:s.map(e=>(0,n.jsx)(i.MenuItemRadio,{name:`option`,value:e.key,icon:e.icon,disabled:e.disabled,children:b(e)},e.key))})})]})})})},wt=()=>({styles:{container:(0,l.css)({display:`flex`,alignItems:`center`,alignContent:`center`,overflow:`hidden`,whiteSpace:`nowrap`,padding:`8px`,backgroundColor:`transparent`}),breadcrumbItem:(0,l.css)({minWidth:`fit-content`,padding:0,margin:`0px`}),separator:(0,l.css)({marginRight:`8px`})},getStyles:(e,t)=>{let{icon:n}=e;switch(t){case`small`:return(0,l.css)({fontSize:`12px`,padding:`4px`,paddingLeft:n?`0px`:`4px`});case`medium`:return(0,l.css)({fontSize:`14px`,padding:`6px`,paddingLeft:n?`0px`:`6px`});case`large`:return(0,l.css)({fontSize:`16px`,padding:`8px`,paddingLeft:n?`0px`:`8px`});case`current`:return(0,l.css)({fontWeight:i.tokens.fontWeightBold,cursor:`default`,display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,overflow:`hidden`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`,fontFamily:i.tokens.fontFamilyBase});default:return(0,l.css)({fontSize:`14px`,padding:`6px`,paddingLeft:n?`0px`:`6px`})}}}),Tt=({items:e,theme:r,size:a=`medium`})=>{let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),[u,p]=(0,t.useState)({top:0,left:0,position:`absolute`}),{getStyles:m}=wt();return(0,t.useEffect)(()=>{let e=e=>{!c.current?.contains(e.target)&&!l.current?.contains(e.target)&&o&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[o]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Button,{ref:c,icon:(0,n.jsx)(d.MoreHorizontalRegular,{}),appearance:`transparent`,onClick:()=>{if(c.current){let e=c.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,r=l.current?.offsetWidth||200,i=l.current?.offsetHeight||100,a=e.bottom+window.scrollY,o=e.left+window.scrollX;o+r>t&&(o=t-r-10),a+i>n&&(a=e.top+window.scrollY-i),p({top:a,left:o,position:`absolute`}),s(e=>!e)}},"aria-label":`More items`}),o&&(0,f.createPortal)(r?(0,n.jsx)(i.FluentProvider,{theme:r,children:(0,n.jsx)(i.Card,{ref:l,style:{...u,zIndex:1e3,padding:`8px`,minWidth:`150px`},children:e.map((e,t)=>(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,onClick:()=>{e.onClick?.(),s(!1)},children:(0,n.jsx)(i.Text,{className:m(e,a),children:e.label})},`overflow-${t}`))})}):(0,n.jsx)(i.Card,{ref:l,style:{...u,zIndex:1e3,padding:`8px`,minWidth:`150px`},children:e.map((e,t)=>(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,onClick:()=>{e.onClick?.(),s(!1)},children:(0,n.jsx)(i.Text,{className:m(e,a),children:e.label})},`overflow-${t}`))}),document.body)]})},Et=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}},Dt=({items:e,maxWidth:r=`100%`,styles:a,theme:o,size:s=`medium`,currentIndex:l=e.length-1,className:u})=>{let{styles:f,getStyles:p}=wt(),m=(0,t.useRef)(null),[h,g]=(0,t.useState)([]),[_,v]=(0,t.useState)([]);return(0,t.useEffect)(()=>{let t=()=>{if(!m.current)return;let t=m.current.offsetWidth,n=0,r=[],i=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):i.push(e)}),g(r),v(i)},n=Et(t,100),r=new c.ResizeObserver(()=>{n()});return m.current&&r.observe(m.current),t(),()=>{r.disconnect()}},[e]),(0,n.jsx)(`div`,{ref:m,className:(0,i.mergeClasses)(f.container,u),style:{maxWidth:r,...a},children:(0,n.jsxs)(H,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,children:[h.map((e,r)=>(0,n.jsxs)(t.default.Fragment,{children:[r===l?(0,n.jsxs)(H,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,columnGap:5,styles:{overflow:`hidden`},children:[e.icon?t.default.cloneElement(e.icon,{style:{fontSize:s===`large`?`20px`:s===`medium`?`16px`:`12px`}}):null,(0,n.jsx)(i.Text,{className:(0,i.mergeClasses)(f.breadcrumbItem,p(e,s),p(e,`current`)),"aria-current":`page`,children:e.label},e.label)]}):(0,n.jsx)(i.Button,{icon:e.icon?e.icon:null,appearance:`transparent`,className:`${f.breadcrumbItem}`,onClick:e.onClick,children:(0,n.jsx)(i.Text,{className:p(e,s),children:e.label})},e.label),r<h.length-1&&(0,n.jsx)(d.ChevronRightRegular,{style:{fontSize:s===`large`?`20px`:s===`medium`?`16px`:`12px`}})]},e.label??`breadcrumb-${r}`)),_.length>0&&(0,n.jsx)(Tt,{items:_,theme:o})]})})},Ot=({icon:e,hoverIcon:r,imageSrc:a,width:o=24,height:s=24,color:c,hoverColor:l,onClick:u,enabled:d=!0,ariaLabel:f})=>{let p=c||i.tokens.colorBrandBackground,m=l||i.tokens.colorBrandBackgroundHover,h=i.tokens.fontFamilyBase,[g,_]=(0,t.useState)(!1),v=(0,t.useCallback)(()=>{d&&_(!0)},[d]),y=(0,t.useCallback)(()=>{d&&_(!1)},[d]),b=(0,t.useMemo)(()=>d&&g&&r?r:e,[g,r,e,d]),x=(0,t.useMemo)(()=>({width:o,height:s,color:g?m:p,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:d?1:.5,fontFamily:h,fontSize:`inherit`}),[o,s,g,m,p,d,h]),S=(0,t.useMemo)(()=>({border:`none`,background:`none`,padding:0,cursor:d?`pointer`:`default`}),[d]),C=(0,t.useMemo)(()=>({width:o,height:s,objectFit:`contain`,opacity:d?1:.5}),[o,s,d]);return(0,n.jsx)(i.Button,{onClick:d?u:void 0,onMouseEnter:v,onMouseLeave:y,disabled:!d,style:S,"aria-label":f??`Icon Button`,children:a?(0,n.jsx)(`img`,{src:a,alt:`icon`,style:C}):t.default.cloneElement(b,{style:{...b.props.style,...x}})})},kt=t.default.memo(Ot),At=()=>({getSpanSlots:t.useCallback((e,t)=>{let n=new Date(e),r=new Date(t),i=n.getHours(),a=n.getMinutes(),o=i*2+(a>=1?1:0),s=r.getHours(),c=r.getMinutes(),l=s*2+(c>=1?2:0);return{spanSlots:l-o,startSlot:o,endSlot:l}},[]),generateLightAndHoverColors:t.useCallback((e,t=20,n=10)=>{let r=e=>{let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=i-a,s=0,c=0,l=(i+a)/2;if(o!==0){switch(c=l>.5?o/(2-i-a):o/(i+a),i){case t:s=(n-r)/o+(n<r?6:0);break;case n:s=(r-t)/o+2;break;case r:s=(t-n)/o+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}},i=(e,t,n)=>{let r=t*Math.min(n,100-n)/100,i=t=>{let i=(t+e/30)%12,a=n-r*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*a).toString(16).padStart(2,`0`)};return`#${i(0)}${i(8)}${i(4)}`},{h:a,s:o,l:s}=r(e);return{lightColor:i(a,o,Math.min(s+t,100)),hoverColor:i(a,o,Math.min(s+n,100))}},[]),getEventColors:t.useCallback(e=>{let t={backgroundColor:i.tokens.colorNeutralBackground3,hoverColor:i.tokens.colorNeutralBackground3Hover};return{"no category":t,meeting:{backgroundColor:i.tokens.colorPaletteBlueBackground2,hoverColor:i.tokens.colorPaletteBlueBorderActive},appointment:{backgroundColor:i.tokens.colorPaletteGreenBackground2,hoverColor:i.tokens.colorPaletteGreenBorderActive},task:{backgroundColor:i.tokens.colorPaletteRedBackground2,hoverColor:i.tokens.colorPaletteRedBorderActive},deadline:{backgroundColor:i.tokens.colorPaletteYellowBackground2,hoverColor:i.tokens.colorPaletteYellowBorderActive},holiday:{backgroundColor:i.tokens.colorPalettePurpleBackground2,hoverColor:i.tokens.colorPalettePurpleBorderActive},celebration:{backgroundColor:i.tokens.colorPaletteDarkOrangeBackground2,hoverColor:i.tokens.colorPaletteDarkOrangeBorderActive},reminder:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},workshop:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},webinar:{backgroundColor:i.tokens.colorPaletteMagentaBackground2,hoverColor:i.tokens.colorPaletteMagentaBorderActive},conference:{backgroundColor:i.tokens.colorPaletteBrownBackground2,hoverColor:i.tokens.colorPaletteBrownBorderActive}}[e.toLowerCase()]||t},[]),generateColor:t.useCallback(e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);let n=(t&16777215).toString(16).toUpperCase();return`#${`00000`.substring(0,6-n.length)+n}`},[]),getCalendarColors:t.useCallback(e=>{let t={beige:{backgroundColor:i.tokens.colorPaletteBeigeBackground2,hoverColor:i.tokens.colorPaletteBeigeBorderActive},blue:{backgroundColor:i.tokens.colorPaletteBlueBackground2,hoverColor:i.tokens.colorPaletteBlueBorderActive},brown:{backgroundColor:i.tokens.colorPaletteBrownBackground2,hoverColor:i.tokens.colorPaletteBrownBorderActive},gold:{backgroundColor:i.tokens.colorPaletteGoldBackground2,hoverColor:i.tokens.colorPaletteGoldBorderActive},lavender:{backgroundColor:i.tokens.colorPaletteLavenderBackground2,hoverColor:i.tokens.colorPaletteLavenderBorderActive},magenta:{backgroundColor:i.tokens.colorPaletteMagentaBackground2,hoverColor:i.tokens.colorPaletteMagentaBorderActive},navy:{backgroundColor:i.tokens.colorPaletteNavyBackground2,hoverColor:i.tokens.colorPaletteNavyBorderActive},pink:{backgroundColor:i.tokens.colorPalettePinkBackground2,hoverColor:i.tokens.colorPalettePinkBorderActive},plum:{backgroundColor:i.tokens.colorPalettePlumBackground2,hoverColor:i.tokens.colorPalettePlumBorderActive},purple:{backgroundColor:i.tokens.colorPalettePurpleBackground2,hoverColor:i.tokens.colorPalettePurpleBorderActive},red:{backgroundColor:i.tokens.colorPaletteRedBackground2,hoverColor:i.tokens.colorPaletteRedBorderActive},teal:{backgroundColor:i.tokens.colorPaletteTealBackground2,hoverColor:i.tokens.colorPaletteTealBorderActive},anchor:{backgroundColor:i.tokens.colorPaletteAnchorBackground2,hoverColor:i.tokens.colorPaletteAnchorBorderActive},"dark-red":{backgroundColor:i.tokens.colorPaletteDarkRedBackground2,hoverColor:i.tokens.colorPaletteDarkRedBorderActive},cranberry:{backgroundColor:i.tokens.colorPaletteCranberryBackground2,hoverColor:i.tokens.colorPaletteCranberryBorderActive},pumpkin:{backgroundColor:i.tokens.colorPalettePumpkinBackground2,hoverColor:i.tokens.colorPalettePumpkinBorderActive},peach:{backgroundColor:i.tokens.colorPalettePeachBackground2,hoverColor:i.tokens.colorPalettePeachBorderActive},marigold:{backgroundColor:i.tokens.colorPaletteMarigoldBackground2,hoverColor:i.tokens.colorPaletteMarigoldBorderActive},brass:{backgroundColor:i.tokens.colorPaletteBrassBackground2,hoverColor:i.tokens.colorPaletteBrassBorderActive},forest:{backgroundColor:i.tokens.colorPaletteForestBackground2,hoverColor:i.tokens.colorPaletteForestBorderActive},seafoam:{backgroundColor:i.tokens.colorPaletteSeafoamBackground2,hoverColor:i.tokens.colorPaletteSeafoamBorderActive},"dark-green":{backgroundColor:i.tokens.colorPaletteDarkGreenBackground2,hoverColor:i.tokens.colorPaletteDarkGreenBorderActive},"light-teal":{backgroundColor:i.tokens.colorPaletteLightTealBackground2,hoverColor:i.tokens.colorPaletteLightTealBorderActive},steel:{backgroundColor:i.tokens.colorPaletteSteelBackground2,hoverColor:i.tokens.colorPaletteSteelBorderActive},"royal-blue":{backgroundColor:i.tokens.colorPaletteRoyalBlueBackground2,hoverColor:i.tokens.colorPaletteRoyalBlueBorderActive},cornflower:{backgroundColor:i.tokens.colorPaletteCornflowerBackground2,hoverColor:i.tokens.colorPaletteCornflowerBorderActive},grape:{backgroundColor:i.tokens.colorPaletteGrapeBackground2,hoverColor:i.tokens.colorPaletteGrapeBorderActive},lilac:{backgroundColor:i.tokens.colorPaletteLilacBackground2,hoverColor:i.tokens.colorPaletteLilacBorderActive},mink:{backgroundColor:i.tokens.colorPaletteMinkBackground2,hoverColor:i.tokens.colorPaletteMinkBorderActive},platinum:{backgroundColor:i.tokens.colorPalettePlatinumBackground2,hoverColor:i.tokens.colorPalettePlatinumBorderActive}},n=t[`royal-blue`];return t[e]||n},[]),formatDate:t.useCallback((e,t)=>(0,a.format)((0,a.parseISO)(e),t),[])}),jt={start:`Start`,end:`End`,location:`Location`,attendees:`Attendees`,details:`Details`},Mt=`32px`,Nt=e=>({styles:{banner:(0,l.css)({display:`flex`,justifyContent:`center`,alignContent:`center`,alignItems:`center`,padding:`5px 10px 0px 10px`}),fieldContainer:(0,l.css)({paddingLeft:Mt}),title:(0,l.css)({lineClamp:2,overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,wordBreak:`break-word`,WebkitLineClamp:2})}}),Pt=({fieldLabel:e,fieldValue:t,icon:r})=>(0,n.jsxs)(H,{children:[(0,n.jsx)(_t,{label:e,icon:r}),(0,n.jsx)(H,{paddingLeft:Mt,children:(0,n.jsx)(i.Body1,{children:t})})]}),Ft=e=>{let{event:r,strings:a=jt}=e,{title:o,start:s,end:c,location:l,category:u,attendees:d,weblink:f}=r,{styles:p}=Nt(r),{formatDate:m}=At(),h=m(s,`PPp`),g=m(c,`PPp`),_=(0,i.partitionAvatarGroupItems)({items:d?.map(e=>e.id)||[]}),v=t.useCallback(e=>d?.find(t=>t.id===e)||void 0,[d]),y=t.useCallback(()=>(0,n.jsxs)(H,{children:[(0,n.jsx)(_t,{label:a.attendees,icon:`ph:users-three`}),(0,n.jsx)(H,{paddingLeft:Mt,children:(0,n.jsxs)(i.AvatarGroup,{layout:`stack`,children:[_.inlineItems.map(e=>(0,n.jsx)(i.AvatarGroupItem,{name:v(e)?.name,image:{src:v(e)?.imageUrl}},e)),_.overflowItems&&(0,n.jsx)(i.AvatarGroupPopover,{children:_.overflowItems.map(e=>(0,n.jsx)(i.AvatarGroupItem,{name:v(e)?.name,image:{src:v(e)?.imageUrl}},e))})]})})]}),[_,v,a.attendees]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Ge,{appearance:`subtle`,padding:`m`,paddingTop:`s`,width:`250px`,cardBody:(0,n.jsxs)(H,{RowGap:10,children:[(0,n.jsx)(`div`,{className:p.banner,children:(0,n.jsx)(i.Subtitle1,{className:p.title,children:o})}),(0,n.jsx)(i.Divider,{}),u&&(0,n.jsx)(H,{horizontal:!0,horizontalAlign:`end`,width:`100%`,children:(0,n.jsx)(i.Badge,{appearance:`filled`,children:u})}),(0,n.jsx)(Pt,{fieldLabel:a.start,fieldValue:h,icon:`mingcute:time-line`}),(0,n.jsx)(Pt,{fieldLabel:a.end,fieldValue:g,icon:`mingcute:time-line`}),(0,n.jsx)(Pt,{fieldLabel:a.location,fieldValue:l,icon:`mingcute:location-line`}),(0,n.jsx)(y,{})]}),cardFooterContent:(0,n.jsx)(H,{horizontal:!0,horizontalAlign:`end`,width:`100%`,children:(0,n.jsx)(i.Button,{appearance:`subtle`,onClick:()=>{window.open(f,`_blank`)},children:a.details})})})})},It=()=>({styles:{calendarWrapper:(0,l.css)({padding:`20px`,paddingTop:`10px`,overflow:`auto`,flex:1,display:`grid`,gridTemplateColumns:`repeat(7, 1fr)`,gridTemplateRows:`auto`,gridAutoRows:`minmax(100px, 1fr)`,gap:`1px`,width:`calc(100% - 40px)`}),header:(0,l.css)({display:`flex`,justifyContent:`start`,gap:`10px`,alignItems:`center`,padding:`16px`}),dayHeader:(0,l.css)({textAlign:`start`,padding:`8px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),day:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,backgroundColor:i.tokens.colorNeutralBackground1,position:`relative`}),otherMonthDay:(0,l.css)({color:i.tokens.colorNeutralStroke2,backgroundColor:i.tokens.colorNeutralBackground2}),cardDay:(0,l.css)({height:`100%`,minHeight:100,borderRadius:0,overflow:`hidden !important`,rowGap:5}),cardDayOnHover:(0,l.css)({":hover":{backgroundColor:i.tokens.colorNeutralBackground2}}),currentDay:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),currentDayLabel:(0,l.css)({color:i.tokens.colorBrandBackground,fontWeight:600}),eventCard:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,zIndex:1}),eventContainer:(0,l.css)({display:`flex`,flexDirection:`column`,overflowY:`auto`,paddingTop:`5px`,paddingBottom:`5px`,paddingLeft:`5px`,paddingRight:`5px`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),eventCardWeekView:(0,l.css)({backgroundColor:i.tokens.colorBrandBackground,color:i.tokens.colorNeutralForegroundOnBrand,borderRadius:`4px`,padding:`4px`,margin:`2px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,height:`100%`}),popoverContent:(0,l.css)({padding:0,borderTopWidth:20,borderTopStyle:`solid`}),cardMonthTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`})},applyEventHouverColorClass:(e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}})}),Lt=e=>{let r=(0,i.useId)(),{events:o,date:s,onCardHoverChange:c,columnHeight:l}=e,{styles:u,applyEventHouverColorClass:d}=It(),f=t.useRef(null),{getEventColors:p,getCalendarColors:m}=At(),h=t.useCallback(e=>{c&&c(!0,e)},[c]),g=t.useCallback(e=>{c&&c(!1,e)},[c]),_=t.useCallback(e=>{f.current?.setTarget(e)},[f]),v=t.useCallback((e,t,r)=>(0,n.jsx)(`div`,{ref:_,children:(0,n.jsx)(Ge,{className:(0,i.mergeClasses)(u.eventCard,d(r.backgroundColor,r.backgroundColor)),paddingTop:`4px`,paddingBottom:`4px`,paddingLeft:`8px`,paddingRight:`8px`,marginTop:e===0?`0px`:`5px`,cardHeader:(0,n.jsx)(i.Caption1,{className:u.cardMonthTitle,children:t.title}),onMouseEnter:()=>h(t.title),onMouseLeave:()=>g(t.title)})},t.id??`card-${e}`),[h,g,d]),y=t.useCallback((e,t,a)=>(0,n.jsxs)(i.Popover,{withArrow:!0,mouseLeaveDelay:30,closeOnScroll:!0,closeOnIframeFocus:!0,openOnHover:!0,children:[(0,n.jsx)(i.PopoverTrigger,{children:v(t,e,a)}),(0,n.jsx)(i.PopoverSurface,{"aria-labelledby":r,className:(0,i.mergeClasses)(u.popoverContent),children:(0,n.jsx)(Ft,{event:e})})]},t),[v,r,u.popoverContent]);return!o||!o?.length?(0,n.jsx)(n.Fragment,{children:` `}):(0,n.jsx)(`div`,{style:{height:l},className:u.eventContainer,children:o.map((e,n)=>{if(!(0,a.isWithinInterval)(s,{start:(0,a.startOfDay)(new Date(e.start)),end:(0,a.endOfDay)(new Date(e.end))}))return null;let r;r=e.color?m(e.color):p(e.category);let o=e.onRenderInMonthView?.(e),c=e.id??`event-${n}`;return t.isValidElement(o)?t.cloneElement(o,{key:c,className:(0,i.mergeClasses)(o.props.className,u.eventCard)}):e.enableOnHouver?y(e,n,r):v(n,e,r)})})},Rt=e=>{let{day:r,currentMonth:o,events:s,date:c,columnHeight:l,onDayClick:u}=e,{styles:d}=It(),f=new Date,[p,m]=t.useState(!1),h=t.useMemo(()=>(0,a.isSameDay)(c,f),[c,f]),g=t.useMemo(()=>(0,n.jsx)(H,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,paddingLeft:`m`,paddingRight:`m`,children:(0,n.jsxs)(i.Body2,{className:d.currentDayLabel,children:[r,` `,f.toLocaleString(`default`,{month:`short`})]})}),[r]),_=t.useCallback(e=>{m(e)},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Ge,{onClick:u?()=>u(c):void 0,className:(0,i.mergeClasses)(d.cardDay,o?``:d.otherMonthDay,h?d.currentDay:``,p?``:d.cardDayOnHover),cardHeader:h?g:(0,n.jsx)(H,{horizontal:!0,paddingLeft:`m`,paddingRight:`m`,children:(0,n.jsx)(i.Body2,{children:r})}),paddingTop:`m`,paddingBottom:`m`,paddingLeft:`0px`,paddingRight:`0px`,cardBody:(0,n.jsx)(Lt,{events:s,date:c,onCardHoverChange:_,columnHeight:l-60})})})},zt=()=>({styles:{container:(0,l.css)({display:`flex`,flexDirection:`column`,width:`calc(100% - 40px)`,height:`100vh`,overflow:`hidden`,padding:`20px`}),header:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`16px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),weekGrid:(0,l.css)({display:`grid`,gridTemplateColumns:`80px repeat(7, 1fr)`,gridTemplateRows:`50px 40px repeat(48, 33px)`,height:`fit-content`,overflowY:`auto`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,maxHeight:`calc(100vh - 100px)`,scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground1}`,"&::-webkit-scrollbar":{width:`8px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground1},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:`4px`},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}),blankHeader:(0,l.css)({gridColumn:`1`,backgroundColor:i.tokens.colorNeutralBackground3,borderBottom:`3px solid ${i.tokens.colorNeutralStroke3}`,position:`sticky`,top:0,zIndex:10}),timeColumn:(0,l.css)({gridColumn:`1`,gridRow:`3 / span 49`,display:`flex`,flexDirection:`column`,backgroundColor:i.tokens.colorNeutralBackground1,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`}),timeCell:(0,l.css)({height:`100%`,display:`flex`,alignItems:`center`,fontSize:`12px`,color:i.tokens.colorNeutralForeground3,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,justifyContent:`center`}),fullDayRow:(0,l.css)({gridRow:`2`,display:`grid`,gridTemplateColumns:`80px repeat(7, 1fr)`,gap:`0`,padding:`0`,backgroundColor:i.tokens.colorNeutralBackground2,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayLabel:(0,l.css)({gridColumn:`1`,display:`flex`,alignItems:`center`,justifyContent:`center`,alignContent:`center`,color:i.tokens.colorBrandBackground,padding:`5px`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayCell:(0,l.css)({borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,display:`flex`,flexDirection:`row`,gap:`0px`,padding:`4px`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`,overflow:`hidden`}),fullDayEvent:(0,l.css)({flex:`1 1 auto`,minWidth:`24px`,height:`24px`,padding:`4px 8px`,backgroundColor:i.tokens.colorBrandBackground,borderRadius:`4px`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`}),dayHeaderCell:(0,l.css)({textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground2,padding:`8px`,fontWeight:`bold`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`sticky`,top:0,zIndex:10}),todayHeaderCell:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),eventCard:(0,l.css)({padding:2,alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,overflow:`hidden`,":hover":{pointerEvents:`auto`,cursor:`pointer`}}),event:(0,l.css)({height:`100%`,backgroundColor:i.tokens.colorBrandBackground,borderRadius:`4px`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,":hover":{pointerEvents:`auto`,cursor:`pointer`}}),dayCell:(0,l.css)({borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`relative`,overflow:`visible`,FlexDirection:`column`,gap:`4px`}),currentTimeIndicator:(0,l.css)({position:`absolute`,left:0,height:`2px`,backgroundColor:i.tokens.colorPaletteRedBorderActive,width:`100%`,zIndex:1}),currentHalfHourCell:(0,l.css)({border:`2px solid ${i.tokens.colorPaletteRedBorderActive}`}),eventTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`}),popoverContent:(0,l.css)({padding:0,borderTopWidth:20,borderTopStyle:`solid`})},applyEventHouverColorClass:t.default.useCallback((e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}}),[i.tokens.colorBrandBackground,i.tokens.colorBrandBackgroundHover]),appyDynamicStyles:t.default.useCallback((e,t,n,r)=>(0,l.css)({flex:`0 0 calc(100% / ${t})`,height:`${n*r}px`,left:`${e*10}%`,width:`calc(${100-e*10}% - 8px)`,margin:4,marginTop:0,marginBottom:0}),[])}),Bt={timeSeparator:` - `,hourSuffix:`H`},Vt=({event:e,colors:r,spanSlots:a,rowHeight:o,eventIndex:s,eventCount:c,strings:l=Bt})=>{let u=(0,i.useId)(),{styles:d,applyEventHouverColorClass:f,appyDynamicStyles:p}=zt(),m=t.useRef(null),{formatDate:h}=At(),g=t.useMemo(()=>(0,n.jsx)(`div`,{children:(0,n.jsxs)(H,{columnGap:4,verticalAlign:`center`,children:[(0,n.jsx)(i.Caption1Strong,{className:d.eventTitle,children:e.title}),(0,n.jsxs)(H,{columnGap:4,horizontal:!0,verticalAlign:`center`,horizontalAlign:`start`,children:[(0,n.jsxs)(i.Caption1,{children:[h(e.start,`HH:mm`),l.hourSuffix]}),l.timeSeparator,(0,n.jsxs)(i.Caption1,{children:[h(e.end,`HH:mm`),l.hourSuffix]})]})]})}),[e,h,l,d.eventTitle]);return(0,n.jsx)(i.Card,{ref:m,className:(0,i.mergeClasses)(d.eventCard,f(r.backgroundColor,r.backgroundColor),p(s,c,o,a)),children:e.enableOnHouver?(0,n.jsxs)(i.Popover,{withArrow:!0,mouseLeaveDelay:50,closeOnScroll:!0,closeOnIframeFocus:!0,openOnHover:!0,children:[(0,n.jsx)(i.PopoverTrigger,{children:g}),(0,n.jsx)(i.PopoverSurface,{"aria-labelledby":u,className:(0,i.mergeClasses)(d.popoverContent),children:(0,n.jsx)(Ft,{event:e})})]}):g},e.id)},Ht=({event:e,eventCount:r,spanSlots:a,rowHeight:o,eventIndex:s,view:c})=>{let{styles:l,appyDynamicStyles:u}=zt(),{getEventColors:d,getCalendarColors:f}=At(),p=e.color?f(e.color):d(e.category),m=c===`day`?e.onRenderInDayView?.(e):e.onRenderInWeekView?.(e);return t.isValidElement(m)?t.cloneElement(m,{event:e,className:(0,i.mergeClasses)(m.props.className,l.eventCard,u(s,r,o,a)),style:{...m.props.style}}):(0,n.jsx)(Vt,{event:e,colors:p,spanSlots:a,rowHeight:o,eventIndex:s,eventCount:r},e.id)},Ut=e=>{let n=(0,t.useCallback)(e=>e.map(e=>({...e,id:e.id||(0,m.v4)()})),[]),r=(0,t.useCallback)(t=>new Date(new Date(t).toLocaleString(void 0,{timeZone:e})),[e]);return{getMonthCalendar:(0,t.useCallback)((e,t,i)=>{let o=n(e),s=new Date(t,i+1,0).getDate(),c={};for(let e=1;e<=s;e++){let n=(0,a.format)(new Date(t,i,e),`yyyy-MM-dd`);c[n]=[]}return o.forEach(e=>{let t=r(e.start),n=r(e.end),i=new Date(t);for(;i<=n;){let t=(0,a.format)(i,`yyyy-MM-dd`);c[t]&&c[t].push(e),i.setDate(i.getDate()+1)}}),c},[r]),getWeekEvents:(0,t.useCallback)((e,t)=>{let i=[],o=r(t),s=n(e);for(let e=0;e<7;e++){let t=new Date(o);t.setDate(o.getDate()+e);let n=(0,a.format)(t,`yyyy-MM-dd`),c=Array.from({length:48},(e,t)=>({time:`${String(Math.floor(t/2)).padStart(2,`0`)}:${t%2==0?`00`:`30`}`,events:[]})),l=[];s.forEach(e=>{let t=r(e.start),i=r(e.end);if(e.isFullDay){(0,a.format)(t,`yyyy-MM-dd`)<=n&&(0,a.format)(i,`yyyy-MM-dd`)>=n&&l.push(e);return}if((0,a.format)(t,`yyyy-MM-dd`)<=n&&(0,a.format)(i,`yyyy-MM-dd`)>=n){let r=new Date(t);for(;r<=i;){if((0,a.format)(r,`yyyy-MM-dd`)===n){let t=r.getHours()*2+(r.getMinutes()>=30?1:0);c[t]&&c[t].events.push(e)}r.setMinutes(r.getMinutes()+30)}}}),i.push({date:n,fullDayEvents:l,timeSlots:c})}return i},[r])}},Wt=()=>({styles:{container:(0,l.css)({display:`flex`,flexDirection:`column`,width:`calc(100% - 40px)`,height:`100vh`,overflow:`hidden`,padding:`20px`}),header:(0,l.css)({display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`16px`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),dayGrid:(0,l.css)({display:`grid`,gridTemplateColumns:`80px 1fr`,gridTemplateRows:`50px 40px repeat(48, 33px)`,height:`calc(100vh - 100px)`,overflowY:`auto`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,maxHeight:`fit-content`,scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground1}`,"&::-webkit-scrollbar":{width:`8px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground1},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:`4px`},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}),blankHeader:(0,l.css)({gridColumn:`1`,backgroundColor:i.tokens.colorNeutralBackground3,borderBottom:`3px solid ${i.tokens.colorNeutralStroke3}`}),timeColumn:(0,l.css)({gridColumn:`1`,gridRow:`3 / span 49`,display:`flex`,flexDirection:`column`,backgroundColor:i.tokens.colorNeutralBackground1,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`}),timeCell:(0,l.css)({height:`100%`,maxHeight:`32px`,minHeight:`32px`,display:`flex`,alignItems:`center`,fontSize:`12px`,color:i.tokens.colorNeutralForeground3,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,justifyContent:`center`}),fullDayRow:(0,l.css)({gridRow:`2`,display:`grid`,gridTemplateColumns:`80px 33px`,gap:`0`,padding:`0`,backgroundColor:i.tokens.colorNeutralBackground2,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayLabel:(0,l.css)({gridColumn:`1`,display:`flex`,alignItems:`center`,justifyContent:`center`,alignContent:`center`,color:i.tokens.colorBrandBackground,padding:`5px`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`}),fullDayCell:(0,l.css)({borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,display:`flex`,flexDirection:`row`,gap:`2px`,padding:`4px`,borderBottom:`3px solid ${i.tokens.colorNeutralStroke2}`,overflow:`hidden`}),fullDayEvent:(0,l.css)({flex:`1 1 auto`,minWidth:`24px`,height:`24px`,padding:`4px 8px`,backgroundColor:i.tokens.colorBrandBackground,color:i.tokens.colorNeutralForegroundOnBrand,borderRadius:`4px`,overflow:`hidden`,display:`flex`,alignItems:`center`,justifyContent:`center`}),dayHeaderCell:(0,l.css)({textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground2,padding:`8px`,fontWeight:`bold`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`}),todayHeaderCell:(0,l.css)({borderTop:`5px solid ${i.tokens.colorBrandBackground}`}),eventCard:(0,l.css)({alignItems:`center`,justifyContent:`center`,marginRight:`2px`,zIndex:1,position:`absolute`,alignContent:`center`,overflow:`hidden`}),dayCell:(0,l.css)({borderBottom:`1px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke1}`,position:`relative`,overflow:`visible`,FlexDirection:`column`,gap:`4px`}),currentTimeIndicator:(0,l.css)({position:`absolute`,left:0,height:`2px`,backgroundColor:i.tokens.colorPaletteRedBorderActive,width:`100%`,zIndex:1}),currentHalfHourCell:(0,l.css)({border:`2px solid ${i.tokens.colorPaletteRedBorderActive}`}),eventTitle:(0,l.css)({display:`-webkit-box`,"-webkit-line-clamp":`1`,"-webkit-box-orient":`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingLeft:`8px`,wordBreak:`break-word`,overflow:`hidden`})},applyEventHouverColorClass:(e,t)=>(0,l.css)({backgroundColor:e??i.tokens.colorBrandBackground,":hover":{backgroundColor:t??i.tokens.colorBrandBackgroundHover}})}),Gt={allDay:`All Day`},Kt=33,qt=e=>{let{events:r,currentDay:o,height:s,strings:c=Gt}=e,{styles:l}=Wt(),u=(0,t.useRef)(null),{getSpanSlots:d,getEventColors:f,getCalendarColors:p}=At(),m=Intl.DateTimeFormat().resolvedOptions().timeZone,{getWeekEvents:h}=Ut(m),g=t.useCallback(()=>Array.from({length:24},(e,r)=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{className:l.timeCell,children:(0,n.jsxs)(i.Body1Strong,{children:[r,`:00`]})}),(0,n.jsx)(`div`,{className:l.timeCell})]},r)),[l.timeCell]),_=t.useCallback(()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:l.blankHeader}),Array.from({length:1},(e,t)=>{let r=(0,a.addDays)(o,t),s=(0,a.isToday)(r)?l.todayHeaderCell:``;return(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(l.dayHeaderCell,s),children:[(0,n.jsx)(i.Text,{weight:`semibold`,size:600,style:{paddingRight:10},children:(0,a.format)(r,`dd`)}),(0,n.jsx)(i.Subtitle1,{children:(0,a.format)(r,`LLLL, yyyy`)})]},t)})]}),[o,l.blankHeader,l.dayHeaderCell,l.todayHeaderCell]),v=t.useCallback(()=>{let e=h(r,o.toISOString());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:l.fullDayLabel,children:(0,n.jsx)(i.Body1,{children:c.allDay})}),Array.from({length:1},(t,r)=>{let s=(0,a.format)((0,a.addDays)(o,r),`yyyy-MM-dd`),c=e.find(e=>e.date===s)?.fullDayEvents||[];return(0,n.jsx)(`div`,{className:l.fullDayCell,children:c.map(e=>(0,n.jsx)(`div`,{className:l.fullDayEvent,style:{gridColumn:`${r+2}`,backgroundColor:e.color?p(e.color).backgroundColor:f(e.category).backgroundColor},children:(0,n.jsx)(i.Caption1Strong,{className:l.eventTitle,children:e.title})},e.id))},r)})]})},[o,h,l.fullDayCell,l.fullDayEvent,l.fullDayLabel,l.eventTitle,p,f,r,c.allDay]),y=t.useCallback(()=>{let e=h(r,o.toISOString());return Array.from({length:1},(r,i)=>{let s=(0,a.format)((0,a.addDays)(o,i),`yyyy-MM-dd`),c=e.find(e=>e.date===s);return(0,n.jsx)(t.Fragment,{children:c?.timeSlots.map((e,t)=>{let r=e.events.length;return(0,n.jsx)(`div`,{className:l.dayCell,style:{gridRow:t+3},children:e.events.map((e,i)=>{let{spanSlots:a,startSlot:o}=d(new Date(e.start),new Date(e.end));return t===o?(0,n.jsx)(Ht,{event:e,eventCount:r,spanSlots:a,rowHeight:Kt,eventIndex:i,view:`day`},e.id):null})},t)})},i)})},[o,d,h,l.dayCell,r]);return(0,n.jsx)(`div`,{className:l.container,style:{height:s},children:(0,n.jsxs)(`div`,{ref:u,className:l.dayGrid,children:[(0,n.jsx)(`div`,{className:l.timeColumn,children:g()}),_(),v(),y()]})})},K=function(e){return e.Day=`day`,e.Week=`week`,e.Month=`month`,e}({}),Jt={month:`Month`,week:`Week`,day:`Day`},Yt=e=>{let{onSelected:r,value:a,strings:o=Jt}=e,[s,c]=t.useState(a??K.Month),[l,u]=t.useState({view:[a??K.Month]}),f=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarDayFilled,d.CalendarDayRegular),[]),p=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),m=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarWorkWeekFilled,d.CalendarWorkWeekRegular),[]);t.useEffect(()=>{a!==void 0&&(c(a),u({view:[a]}))},[a]);let[h,g]=t.useState(!1),_=t.useCallback((e,t)=>{g(t.open)},[]),v=t.useCallback(()=>{switch(s){case K.Month:return(0,n.jsx)(p,{});case K.Week:return(0,n.jsx)(m,{});case K.Day:return(0,n.jsx)(f,{});default:return(0,n.jsx)(p,{})}},[s]),y=t.useCallback(e=>{switch(e){case K.Month:return o.month;case K.Week:return o.week;case K.Day:return o.day;default:return o.month}},[o]),b=t.useCallback((e,{name:t,checkedItems:n})=>{if(t===`view`){let e=n[0];c(e),u({view:n}),r(e)}},[r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Menu,{open:h,onOpenChange:_,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:v(),style:{minWidth:`150px`},children:y(s)})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsxs)(i.MenuList,{onCheckedValueChange:b,checkedValues:l,children:[(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(f,{}),name:`view`,value:K.Day,children:o.day}),(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(m,{}),name:`view`,value:K.Week,children:o.week}),(0,n.jsx)(i.MenuItemRadio,{icon:(0,n.jsx)(p,{}),name:`view`,value:K.Month,children:o.month})]})})]})})},Xt=t.memo(e=>{let{onSelected:a,value:o}=e,[s,c]=t.useState(o??new Date),[l,u]=t.useState(()=>(0,r.format)(o??new Date,`dd MMM, yyyy`)),[f,p]=t.useState(!1),m=t.useCallback((e,t)=>{p(t.open)},[]),g=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),_=t.useCallback(e=>{if(e){let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.utcToZonedTime)(e,t);c(n),u((0,r.format)(n,`dd MMM, yyyy`)),a(n),p(!1)}},[a]);return(0,n.jsxs)(i.Menu,{open:f,onOpenChange:m,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(g,{}),style:{minWidth:`200px`},"aria-label":`Select date: ${l}`,children:l})}),(0,n.jsx)(i.MenuPopover,{style:{maxWidth:`fit-content`},children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(h.Calendar,{highlightSelectedMonth:!0,showGoToToday:!0,onSelectDate:_,value:s})})})]})}),Zt=()=>({root:(0,l.css)({outline:`none`})}),Qt={months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],goToToday:`Go to today`},$t=e=>{let{onDateChange:r,defaultSelectedDate:i,onDismiss:a,strings:o=Qt}=e,s=Zt(),[c,l]=t.useState(i??new Date),u=t.useCallback((e,t)=>{l(e),r(e),a()},[r,a]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(h.Calendar,{className:s.root,dateRangeType:h.DateRangeType.Month,highlightSelectedMonth:!0,isDayPickerVisible:!1,onSelectDate:u,value:c,onDismiss:a,showGoToToday:!1,allFocusable:!1,strings:o})})},en=e=>{let{onSelected:r,value:o}=e,s=(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[c,l]=t.useState(o??new Date);t.useEffect(()=>{r(o??new Date),l(o??new Date)},[o]);let[u,f]=t.useState(!1),p=(e,t)=>{f(t.open)},m=t.useCallback(e=>{r(e),l(e)},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Menu,{open:u,onOpenChange:p,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(s,{}),style:{minWidth:`200px`},"aria-label":`Select month: ${(0,a.format)(c,`MMMM yyyy`)}`,children:(0,a.format)(c,`MMMM yyyy`)})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)($t,{onDateChange:m,defaultSelectedDate:c,onDismiss:()=>{f(!1)}})})})]})})},tn={selectWeekPlaceholder:`Select a week`},nn=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.format)(e.start,`MMM`,{timeZone:t}),i=(0,r.format)(e.end,`MMM`,{timeZone:t});return(0,r.format)(e.start,`yyyy`,{timeZone:t})===(0,r.format)(e.end,`yyyy`,{timeZone:t})?n===i?`${(0,r.format)(e.start,`dd`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`:`${(0,r.format)(e.start,`dd MMM`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`:`${(0,r.format)(e.start,`dd MMM yyyy`,{timeZone:t})} - ${(0,r.format)(e.end,`dd MMM yyyy`,{timeZone:t})}`},rn=e=>{let t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=(0,r.utcToZonedTime)(e,t),i=new Date(n);i.setDate(n.getDate()-n.getDay());let a=new Date(i);return a.setDate(i.getDate()+6),{start:(0,r.utcToZonedTime)(i,t),end:(0,r.utcToZonedTime)(a,t)}},an=t.memo(e=>{let{onSelected:r,value:a,strings:o=tn}=e,s=h.DateRangeType.Week,[c,l]=t.useState(a??new Date),[u,f]=t.useState(()=>{let e=a??new Date;return e?nn(rn(e)):o.selectWeekPlaceholder}),[p,m]=t.useState(!1),g=t.useCallback((e,t)=>{m(t.open)},[]),_=t.useMemo(()=>(0,d.bundleIcon)(d.CalendarMonthFilled,d.CalendarMonthRegular),[]),v=t.useCallback(e=>{if(e){l(e);let t=rn(e);f(nn(t)),r({startDate:t.start,endDate:t.end}),m(!1)}},[r]),y=t.useMemo(()=>0,[]);return(0,n.jsxs)(i.Menu,{open:p,onOpenChange:g,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(_,{}),style:{minWidth:`200px`},"aria-label":`Select week: ${u}`,children:u})}),(0,n.jsx)(i.MenuPopover,{style:{maxWidth:`fit-content`},children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(h.Calendar,{dateRangeType:s,highlightSelectedMonth:!0,showGoToToday:!0,onSelectDate:v,value:c,firstDayOfWeek:y})})})]})}),on={today:`Today`,previous:`Previous`,next:`Next`},sn=t.memo(({selectedView:e,onSelectedView:r,currentDate:a,setCurrentDate:o,onWeekChange:s,onMonthChange:c,onDayChange:l,strings:u=on})=>{let f=t.useMemo(()=>(0,d.bundleIcon)(d.ArrowDownFilled,d.ArrowDownRegular),[]),p=t.useMemo(()=>(0,d.bundleIcon)(d.ArrowUpFilled,d.ArrowUpRegular),[]),m=t.useCallback(e=>{s(e.startDate),o(e.startDate)},[s,o]),h=t.useCallback(e=>{c(e),o(e)},[c,o]),g=t.useCallback(e=>{l(e),o(e)},[l,o]),_=t.useCallback(()=>{switch(e){case K.Month:return(0,n.jsx)(en,{onSelected:h,value:a});case K.Week:return(0,n.jsx)(an,{onSelected:m,value:a});case K.Day:return(0,n.jsx)(Xt,{onSelected:g,value:a});default:return(0,n.jsx)(en,{onSelected:h,value:a})}},[e,h,m,g,a]),v=t.useCallback(()=>(0,n.jsx)(i.Tooltip,{content:u.today,relationship:`label`,children:(0,n.jsx)(i.Button,{shape:`circular`,icon:(0,n.jsx)(d.CalendarTodayRegular,{}),size:`medium`,onClick:()=>l(new Date),children:u.today})}),[l,u.today]),y=t.useCallback(t=>{let n=new Date(a);switch(e){case K.Month:n.setMonth(n.getMonth()+t),c(n);break;case K.Week:n.setDate(n.getDate()+t*7),s(n);break;case K.Day:n.setDate(n.getDate()+t),l(n);break;default:break}o(n)},[a,e,c,s,l,o]);return(0,n.jsxs)(H,{width:`calc(100% - 40px)`,height:`fit-content`,horizontal:!0,horizontalAlign:`space-between`,verticalAlign:`center`,paddingLeft:`20px`,paddingRight:`20px`,paddingBottom:`10px`,paddingTop:`10px`,columnGap:10,styles:{overflow:`hidden`},children:[(0,n.jsxs)(H,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,columnGap:10,children:[(0,n.jsx)(v,{}),(0,n.jsx)(_,{}),(0,n.jsx)(i.Tooltip,{content:u.previous,relationship:`label`,children:(0,n.jsx)(i.Button,{size:`medium`,icon:(0,n.jsx)(p,{fontSize:14}),onClick:()=>y(-1)})}),(0,n.jsx)(i.Tooltip,{content:u.next,relationship:`label`,children:(0,n.jsx)(i.Button,{size:`medium`,icon:(0,n.jsx)(f,{fontSize:14}),onClick:()=>y(1)})})]}),(0,n.jsx)(H,{horizontal:!0,horizontalAlign:`start`,verticalAlign:`center`,columnGap:10,children:(0,n.jsx)(Yt,{onSelected:r,value:e})})]})}),cn={allDay:`All Day`},ln=e=>{let{events:r,currentDay:o,height:s,strings:l=cn}=e,{styles:u}=zt(),[d]=(0,t.useState)(o),[f,p]=(0,t.useState)(32),m=(0,t.useRef)(null),{getSpanSlots:h,getEventColors:g,getCalendarColors:_,formatDate:v}=At(),y=(0,a.startOfWeek)(d,{weekStartsOn:0}),b=Intl.DateTimeFormat().resolvedOptions().timeZone,{getWeekEvents:x}=Ut(b);(0,t.useEffect)(()=>{let e=new c.ResizeObserver(()=>{if(m.current){let e=m.current.querySelector(`.dayCell`);e&&p(e.offsetHeight)}});return m.current&&e.observe(m.current),()=>{e.disconnect()}},[]);let S=t.useCallback(()=>Array.from({length:24},(e,r)=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{className:u.timeCell,children:(0,n.jsxs)(i.Body1Strong,{children:[r,`:00`]})}),(0,n.jsx)(`div`,{className:u.timeCell})]},r)),[u.timeCell]),C=t.useCallback(()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:u.blankHeader}),Array.from({length:7},(e,t)=>{let r=(0,a.addDays)(y,t),o=(0,a.isToday)(r)?u.todayHeaderCell:``;return(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(u.dayHeaderCell,o),children:[(0,n.jsx)(i.Text,{weight:`regular`,size:600,style:{paddingRight:10},children:v(r.toISOString(),`dd`)}),(0,n.jsx)(i.Body1,{children:v(r.toISOString(),`EEE`)})]},t)})]}),[y,u,v]),w=t.useCallback(()=>{let e=x(r,y.toISOString());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{className:u.fullDayLabel,children:(0,n.jsx)(i.Body1,{children:l.allDay})}),Array.from({length:7},(t,r)=>{let o=v((0,a.addDays)(y,r).toISOString(),`yyyy-MM-dd`),s=e.find(e=>e.date===o)?.fullDayEvents||[];return(0,n.jsx)(`div`,{className:u.fullDayCell,children:s.map(e=>(0,n.jsx)(`div`,{className:u.fullDayEvent,style:{gridColumn:`${r+2}`,backgroundColor:e.color?_(e.color).backgroundColor:g(e.category).backgroundColor},children:(0,n.jsx)(i.Caption1Strong,{className:u.eventTitle,children:e.title})},e.id))},r)})]})},[y,u,x,_,g,r,v,l.allDay]),T=t.useCallback(()=>{let e=x(r,y.toISOString());return Array.from({length:7},(t,r)=>{let i=(0,a.format)((0,a.addDays)(y,r),`yyyy-MM-dd`);return(0,n.jsx)(n.Fragment,{children:e.find(e=>e.date===i)?.timeSlots.map((e,t)=>{let r=e.events.length;return(0,n.jsx)(`div`,{className:u.dayCell,style:{gridRow:t+3},children:e.events.map((e,i)=>{let{spanSlots:a,startSlot:o}=h(new Date(e.start),new Date(e.end));return t===o?(0,n.jsx)(Ht,{event:e,eventCount:r,spanSlots:a,rowHeight:f,eventIndex:i,view:`week`},e.id):null})},t)})})})},[y,u,x,h,f,r]);return(0,n.jsx)(`div`,{className:u.container,style:{height:s},children:(0,n.jsxs)(`div`,{ref:m,className:u.weekGrid,children:[(0,n.jsx)(`div`,{className:u.timeColumn,children:S()}),C(),w(),T()]})})},un={daysOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},dn=({currentDate:e,rowHeight:t,getCalendarDays:r,getEventsForDay:a,styles:o,onDaySlotClick:s,height:c,calendarRef:l,strings:u})=>{let d=u?.daysOfWeek||un.daysOfWeek;return(0,n.jsx)(H,{height:c,width:`100%`,verticalAlign:`start`,horizontalAlign:`start`,children:(0,n.jsxs)(`div`,{className:o.calendarWrapper,ref:l,role:`grid`,"aria-label":`Calendar`,children:[d.map(e=>(0,n.jsx)(i.Body1,{className:o.dayHeader,role:`columnheader`,children:e},e)),r(e).map((e,r)=>{let{day:i,currentMonth:o}=e,c=o?a(e):[];return(0,n.jsx)(Rt,{day:i,date:e.date,currentMonth:e.currentMonth,events:c,columnHeight:t||0,onDayClick:s},r)})]})})},fn=t.memo(({events:e,currentDay:t,height:r,strings:i})=>(0,n.jsx)(ln,{events:e,currentDay:t,height:r,strings:i})),pn=t.memo(({events:e,currentDay:t,height:r,strings:i})=>(0,n.jsx)(qt,{currentDay:t,events:e,height:r,strings:i})),mn=({events:e,height:r=800,theme:o,onDayChange:s,onMonthChange:l,onWeekChange:u,onViewChange:d,onDaySlotClick:f,defaultView:p,strings:m})=>{let{styles:h}=It(),g=(0,t.useRef)(null),[_,v]=(0,t.useState)(null),y=(0,t.useRef)(0),[b,x]=(0,t.useState)(new Date),[S,C]=(0,t.useState)(p??K.Month),{getMonthCalendar:w}=Ut(Intl.DateTimeFormat().resolvedOptions().timeZone),T=t.useCallback(e=>{let t=e.getMonth(),n=(0,a.startOfWeek)((0,a.startOfMonth)(e));return Array.from({length:42},(e,r)=>{let i=(0,a.addDays)(n,r);return{day:i.getDate(),currentMonth:i.getMonth()===t,date:i}})},[42]),E=t.useCallback(e=>{l&&l(e),x(e)},[l]),D=t.useCallback(e=>{s&&s(e),x(e)},[s]),O=t.useCallback(e=>{u&&u(e),x(e)},[u]),k=t.useCallback(e=>{d&&d(e),C(e)},[d]),A=t.useCallback(t=>{let{date:n}=t;return w(e,b.getFullYear(),b.getMonth())[(0,a.format)(n,`yyyy-MM-dd`)]?.flatMap(e=>e)||[]},[b,e]),j=t.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){let e=g.current.querySelector(`.${h.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),y.current=e.offsetHeight)}})},[h.calendarWrapper]);(0,t.useEffect)(()=>{let e=new c.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener(`resize`,j),()=>{e.disconnect(),window.removeEventListener(`resize`,j)}},[j,S]),(0,t.useEffect)(()=>{C(p||K.Month)},[p]);let M=t.useCallback(()=>{switch(S){case K.Month:return(0,n.jsx)(dn,{events:e,currentDate:b,rowHeight:_,getCalendarDays:T,getEventsForDay:A,styles:h,onDaySlotClick:f,height:r,calendarRef:g,strings:m?.calendarControl});case K.Week:return(0,n.jsx)(fn,{events:e,currentDay:b,height:r,strings:m?.weekView});case K.Day:return(0,n.jsx)(pn,{events:e,currentDay:b,height:r,strings:m?.dayView});default:return(0,n.jsx)(dn,{events:e,currentDate:b,rowHeight:_,getCalendarDays:T,getEventsForDay:A,styles:h,onDaySlotClick:f,height:r,calendarRef:g,strings:m?.calendarControl})}},[S,e,b,_,T,A,h,f,r]),N=(0,n.jsxs)(H,{height:`100%`,verticalAlign:`start`,children:[(0,n.jsx)(sn,{selectedView:S,onSelectedView:k,currentDate:b,setCurrentDate:x,onWeekChange:O,onMonthChange:E,onDayChange:D,strings:m?.toolbar}),(0,n.jsx)(M,{})]});return(0,n.jsx)(i.IdPrefixProvider,{value:`calendarControl-`,children:o?(0,n.jsx)(i.FluentProvider,{theme:o,applyStylesToPortals:!0,style:{width:`100%`},children:N}):(0,n.jsx)(`div`,{style:{width:`100%`},children:N})})},hn=()=>({tagPickerControl:(0,l.css)({border:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${i.tokens.colorNeutralBackground1} !important`,padding:`0px 10px`,boxShadow:`none`,transition:`all 0.2s ease !important`,"&::after":{content:`""`,position:`absolute`,inset:`-1px`,borderRadius:`inherit`,border:`2px solid transparent`,pointerEvents:`none`},"&:hover":{borderColor:`${i.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${i.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${i.tokens.colorBrandBackground2} !important`}})}),gn=({options:e,onChange:r,renderItem:a,validate:o,label:s,placeholder:c,defaultValue:l,message:u,messageType:f,required:p,size:m,hint:h})=>{let g=l?e.find(e=>e.value===l):void 0,[_,v]=(0,t.useState)(l||``),[y,b]=(0,t.useState)(g?.text||``),[x,S]=(0,t.useState)(``),C=hn(),w=(e,t)=>{let n=t.optionValue||``,i=t.optionText||``;v(n),b(i);let a=o?o(n):``;S(a),!a&&r&&r(n)},T=t.useMemo(()=>x?`error`:f===`warning`?`warning`:f===`info`?`success`:`none`,[x,f]);return(0,n.jsx)(i.Field,{label:s,required:p,validationMessage:t.useMemo(()=>x||u,[x,u]),validationMessageIcon:t.useCallback(()=>{switch(T){case`error`:return(0,n.jsx)(d.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(d.Warning12Filled,{});case`success`:return(0,n.jsx)(d.CheckmarkCircle12Filled,{});default:return null}},[T])(),size:m,hint:h,validationState:T,children:(0,n.jsx)(i.Dropdown,{placeholder:c,onOptionSelect:w,value:y,selectedOptions:_?[_]:[],className:C.tagPickerControl,children:e.map(e=>{let t=e.icon??e.checkIcon;return(0,n.jsx)(i.Option,{value:e.value,disabled:e.disabled,as:e.as,text:e.text||``,children:a?a(e):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)(`span`,{style:{marginRight:4,display:`inline-flex`,alignItems:`center`},children:t}),e.text]})},e.value)})})})},_n=()=>({inputRoot:(0,l.css)({border:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderBottom:`1px solid ${i.tokens.colorNeutralStroke2} !important`,borderRadius:`50px !important`,backgroundColor:`${i.tokens.colorNeutralBackground1} !important`,padding:`0px 10px !important`,boxShadow:`none !important`,transition:`all 0.2s ease`,"&::after":{display:`none !important`,borderWidth:`0 !important`,content:`"none !important"`},"&:hover":{borderColor:`${i.tokens.colorBrandStroke1} !important`},"&:focus-within":{borderColor:`${i.tokens.colorBrandStroke1} !important`,boxShadow:`0 0 0 2px ${i.tokens.colorBrandBackground2} !important`}})}),vn=({value:r,type:a=`text`,shape:o=`normal`,onChange:s,validate:c,label:l,placeholder:u,message:f,messageType:p,required:m,size:h,hint:g,disabled:_,readOnly:v,min:y,max:b,step:x,contentBefore:S,contentAfter:C})=>{let[w,T]=(0,t.useState)(r===void 0?``:String(r)),[E,D]=(0,t.useState)(``),O=_n(),k=e.c(),A=r!==void 0,j=A?String(r):w,M=(0,t.useCallback)(e=>{if(m&&e.trim()===``)return a===`number`?k.numberRequired:k.fieldRequired;if(a===`number`&&e.trim()!==``){let t=Number(e);if(isNaN(t))return k.invalidNumber;if(y!==void 0&&t<y)return k.valueMustBeAtLeast.replace(`{0}`,String(y));if(b!==void 0&&t>b)return k.valueMustBeAtMost.replace(`{0}`,String(b))}return c?c(a===`number`&&e.trim()!==``?Number(e):e):``},[m,a,c,y,b,k]),N=(0,t.useCallback)((e,t)=>{let n=t.value;if(a===`number`&&n!==``&&!/^-?\d*\.?\d*$/.test(n))return;A||T(n);let r=M(n);D(r),!r&&s&&s(a===`number`&&n.trim()!==``?Number(n):n)},[a,A,M,s]),ee=(0,t.useCallback)(()=>{D(M(j))},[M,j]),P=(0,t.useMemo)(()=>E?`error`:p===`warning`?`warning`:p===`info`?`success`:`none`,[E,p]),F=(0,t.useMemo)(()=>E||f,[E,f]),I=(0,t.useCallback)(()=>{switch(P){case`error`:return(0,n.jsx)(d.ErrorCircle12Filled,{});case`warning`:return(0,n.jsx)(d.Warning12Filled,{});case`success`:return(0,n.jsx)(d.CheckmarkCircle12Filled,{});default:return null}},[P]),L=o===`circular`?O.inputRoot:void 0;return(0,n.jsx)(i.Field,{label:l,required:m,validationMessage:F,validationMessageIcon:I(),size:h,hint:g,validationState:P,children:(0,n.jsx)(i.Input,{value:j,placeholder:u,onChange:N,onBlur:ee,disabled:_,readOnly:v,type:`text`,inputMode:a===`number`?`decimal`:`text`,step:a===`number`?x:void 0,className:L,contentBefore:S,contentAfter:C})})},yn=()=>({searchBoxStyles:g.css`
|
|
16
16
|
border: 1px solid ${i.tokens.colorNeutralStroke2};
|
|
17
17
|
border-radius: 50px;
|
|
18
18
|
background-color: ${i.tokens.colorNeutralBackground1};
|
|
@@ -125,7 +125,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
125
125
|
align-items: center;
|
|
126
126
|
padding: 2px;
|
|
127
127
|
margin-right: 8px;
|
|
128
|
-
`}),vn=({placeholder:n,onSearch:r,onChange:a,onClear:o,disabled:s=!1,className:c,width:l,value:u,shape:f=`circular`,contentBefore:p,size:m})=>{let[h,g]=(0,t.useState)(``),v=(0,t.useRef)(null),{searchBoxStyles:y,searchBoxNormalStyles:b,iconWrapperStyles:x}=_n(),S=e.g(),C=n||S.placeholder,w=u!==void 0,T=w?u:h,E=f===`circular`?y:b,D=(0,t.useCallback)((e,t)=>{w||g(t.value),a?.(t.value)},[w,a]),O=(0,t.useCallback)(()=>{w||g(``),v.current?.blur(),o?.(),r?.(``)},[w,o,r]),k=(0,t.useCallback)(e=>{e.key===`Enter`&&T.trim()?r?.(T.trim()):e.key===`Escape`&&(v.current?.blur(),w||g(``),o?.())},[T,w,r,o]);return(0,_.jsx)(i.SearchBox,{ref:v,css:E,className:c,style:{width:l},placeholder:C,value:T,onChange:D,onKeyDown:k,disabled:s,size:m,contentBefore:p??(0,_.jsx)(`span`,{css:x,children:(0,_.jsx)(d.SearchRegular,{})}),dismiss:{onClick:O}})},yn=({onChange:e,defaultKey:r,label:a,options:o=[],minWidth:s,styles:c})=>{let[l,u]=(0,t.useState)(()=>o.map(e=>({...e,selected:e.key===(r??`status`)})));(0,t.useEffect)(()=>{let t=l.find(e=>e.selected);t&&e(t.key)},[]);let d=t.default.useCallback(t=>{u(l.map(e=>({...e,selected:e.key===t.key}))),e(t.key)},[l,e]);return(0,n.jsxs)(G,{gap:`s`,children:[a&&(0,n.jsx)(i.Label,{children:a}),(0,n.jsx)(xt,{options:l,onSelected:d,styles:s?{minWidth:s}:c??{}})]})},bn=()=>({menuButton:(0,l.css)({minWidth:200}),popover:(0,l.css)({padding:i.tokens.spacingVerticalS,minWidth:200}),timePicker:(0,l.css)({width:`100%`})}),xn=()=>({root:(0,l.css)({maxHeight:280,overflowY:`auto`,padding:`${i.tokens.spacingVerticalXS} 0`}),item:(0,l.css)({cursor:`pointer`})}),Sn=`time`,Cn=(e,t,n)=>{let r=new Date(e);return r.setHours(t,n,0,0),r},wn=(e,t,n)=>{let r={hour:`numeric`,minute:`2-digit`,...n&&{second:`2-digit`},...t&&{hourCycle:t}};return new Intl.DateTimeFormat(void 0,r).format(e)},Tn=e=>`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`,En=(e,t,n,r)=>{let i=[],a=e*60,o=t*60;for(let e=a;e<o;e+=n){let t=Math.floor(e/60),n=e%60;i.push(Cn(r,t,n))}return i},Dn=t.memo(e=>{let{onTimeSelect:r,hourCycle:a,showSeconds:o=!1,startHour:s=0,endHour:c=24,increment:l=30,dateAnchor:u}=e,f=xn(),p=t.useMemo(()=>u??new Date,[u]),m=t.useMemo(()=>En(s,c,l,p),[s,c,l,p]),h=t.useCallback((e,t)=>()=>{r(e,t)},[r]);return(0,n.jsx)(`div`,{className:f.root,children:m.map(e=>{let t=wn(e,a,o),r=Tn(e);return(0,n.jsx)(i.MenuItemRadio,{name:Sn,value:r,onClick:h(e,t),icon:(0,n.jsx)(d.ClockRegular,{}),className:f.item,children:t},r)})})}),On=(e,t)=>{let n=t?new Date(t):new Date,r=n.getHours()*60+n.getMinutes(),i=Math.ceil(r/e)*e,a=new Date(n);return a.setHours(Math.floor(i/60),i%60,0,0),a},kn=t.memo(e=>{let{onSelected:r,value:a,placeholder:o=`Select a time`,hourCycle:s,showSeconds:c=!1,startHour:l,endHour:u,increment:f=30,dateAnchor:p}=e,m=bn(),h=t.useMemo(()=>On(f,p),[f,p]),g=a??h,[_,v]=t.useState(g),[y,b]=t.useState(()=>wn(g,s,c)),[x,S]=t.useState(!1);t.useEffect(()=>{a&&(v(a),b(wn(a,s,c)))},[a,s,c]);let C=t.useCallback((e,t)=>{S(t.open)},[]),w=t.useMemo(()=>(0,d.bundleIcon)(d.ClockFilled,d.ClockRegular),[]),T=t.useMemo(()=>_?{[Sn]:[Tn(_)]}:{[Sn]:[]},[_]),E=t.useCallback((e,t)=>{v(e),b(t),r(e),S(!1)},[r]);return(0,n.jsxs)(i.Menu,{open:x,onOpenChange:C,checkedValues:T,onCheckedValueChange:t.useCallback((e,t)=>{},[]),children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(w,{}),className:m.menuButton,children:y||o})}),(0,n.jsx)(i.MenuPopover,{className:m.popover,children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(Dn,{value:_,onTimeSelect:E,hourCycle:s,showSeconds:c,startHour:l,endHour:u,increment:f,dateAnchor:p})})})]})}),An=()=>({container:(0,l.css)({display:`flex`,flexDirection:`column`,gap:i.tokens.spacingVerticalS,position:`relative`}),pickerList:(0,l.css)({maxHeight:300,overflowY:`auto`,backgroundColor:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRadius:i.tokens.borderRadiusMedium,boxShadow:i.tokens.shadow16,scrollbarColor:`${i.tokens.colorBrandForeground1} ${i.tokens.colorNeutralBackground1}`,scrollbarWidth:`thin`,"&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:(0,l.css)({display:`flex`,flexDirection:`column`,gap:i.tokens.spacingVerticalXXS}),optionSecondary:(0,l.css)({fontSize:i.tokens.fontSizeBase200,color:i.tokens.colorNeutralForeground3,fontWeight:i.tokens.fontWeightRegular}),tagPickerControl:(0,l.css)({}),tagPickerInput:(0,l.css)({backgroundColor:`transparent`,border:`none`,outline:`none`,fontSize:i.tokens.fontSizeBase300,"&::placeholder":{color:i.tokens.colorNeutralForeground4},"&:focus":{outline:`none`}})}),jn=({options:r,selectedOptions:a=[],onSelectionChange:o,onSearchChange:s,onLoadMore:c,pagingInfo:l,placeholder:u,disabled:d=!1,maxSelectedOptions:f,width:p,className:m,noResultsMessage:h,loadingMessage:g,loadingMoreMessage:_,searchDebounceMs:v=300})=>{let y=An(),b=e.l(),x=u||b.placeholder,S=h||b.noResultsFound,C=g||b.searching,w=_||b.loadingMore,[T,E]=(0,t.useState)(``),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=a.map(e=>e.value),A=l?.isLoading??!1,j=l?.isLoadingMore??!1,M=l?.hasMore??!1,N=r.filter(e=>!k.includes(e.value)),P=(0,t.useCallback)(e=>{E(e),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{s?.(e)},v)},[s,v]),F=(0,t.useCallback)(e=>{if(!M||j)return;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-100&&c?.()},[M,j,c]),I=(0,t.useCallback)((e,t)=>{if(t.value===`no-options`||t.value===`loading`||t.value===`loading-more`)return;let n=t.selectedOptions,i=a.filter(e=>n.includes(e.value));if(n.length>k.length){let e=n.find(e=>!k.includes(e));if(e){let t=r.find(t=>t.value===e);if(t){if(f&&a.length>=f)return;i.push(t)}}E(``),s?.(``)}o?.(i)},[r,a,k,o,s,f]);return(0,t.useEffect)(()=>()=>{D.current&&clearTimeout(D.current)},[]),(0,n.jsx)(`div`,{className:`${y.container} ${m||``}`,...p&&{style:{width:p}},children:(0,n.jsxs)(i.TagPicker,{onOptionSelect:I,selectedOptions:k,disabled:d,children:[(0,n.jsxs)(i.TagPickerControl,{className:y.tagPickerControl,children:[(0,n.jsx)(i.TagPickerGroup,{"aria-label":b.selectedItems,children:a.map(e=>(0,n.jsx)(i.Tag,{shape:`circular`,media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:d,style:{minHeight:30},children:e.text},e.value))}),(0,n.jsx)(i.TagPickerInput,{className:y.tagPickerInput,"aria-label":b.searchItems,placeholder:x,value:T,onChange:e=>P(e.target.value),disabled:d})]}),(0,n.jsx)(i.TagPickerList,{ref:O,onScroll:F,className:y.pickerList,children:A?(0,n.jsx)(i.TagPickerOption,{value:`loading`,children:C}):N.length>0?(0,n.jsxs)(n.Fragment,{children:[N.map(e=>(0,n.jsx)(i.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:(0,n.jsxs)(`div`,{className:y.optionContent,children:[(0,n.jsx)(i.Text,{weight:`semibold`,children:e.text}),e.secondaryText&&(0,n.jsx)(i.Text,{size:200,className:y.optionSecondary,children:e.secondaryText})]})},e.value)),j&&(0,n.jsx)(i.TagPickerOption,{value:`loading-more`,children:w})]}):(0,n.jsx)(i.TagPickerOption,{value:`no-options`,children:S})})]})})},J={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},Mn=t.default.memo(({direction:e=`vertical`,justifyContent:t=`flex-start`,alignItems:r=`stretch`,gap:a,columnGap:o,rowGap:s,margin:c,padding:u,marginTop:d,marginBottom:f,marginLeft:p,marginRight:m,paddingTop:h,paddingBottom:g,paddingLeft:_,paddingRight:v,width:y,height:b,wrap:x=!1,children:S,style:C,className:w,overflow:T,background:E})=>(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(w,(0,l.css)({display:`flex`,flexDirection:e===`horizontal`?`row`:`column`,justifyContent:t,alignItems:r,gap:a&&J[a]?J[a]:a,columnGap:o&&J[o]?J[o]:o,rowGap:s&&J[s]?J[s]:s,margin:c&&J[c]?J[c]:c,padding:u&&J[u]?J[u]:u,marginTop:d&&J[d]?J[d]:d,marginBottom:f&&J[f]?J[f]:f,marginLeft:p&&J[p]?J[p]:p,marginRight:m&&J[m]?J[m]:m,paddingTop:h&&J[h]?J[h]:h,paddingBottom:g&&J[g]?J[g]:g,paddingLeft:_&&J[_]?J[_]:_,paddingRight:v&&J[v]?J[v]:v,width:y,height:b,overflow:T,flexWrap:x?`wrap`:`nowrap`,backgroundColor:E,...C})),children:S})),Nn=e=>({styles:{loadingContainer:(0,l.css)({display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`}),noItemsMessage:(0,l.css)({textAlign:`center`,marginTop:20}),rowSelection:(0,l.css)({":hover":{cursor:`pointer`}})}}),Pn=e=>{let{items:r,columns:a,defaultSelectedItems:o=[],enableSorting:s=!1,selectionMode:c=`none`,onSelectionChange:l,onSortChange:u,defaultSortState:d,columnSizingOptions:f,enableResizing:p=!1,noItemsMessage:m,isLoadingData:h,isLoadingDataMessage:g,dataGridBodyClassName:_,dataGridBodyStyles:v,refreshData:y}=e,b=e=>r.findIndex(t=>t===e),[x,S]=t.useState(new Set(o.map(e=>b(e)))),C=t.useRef(null),{styles:w}=Nn(e);t.useEffect(()=>{o.length>0&&S(new Set(o.map(e=>b(e))))},[o,r]),t.useEffect(()=>{y&&S(new Set)},[y]);let T=a.map(e=>(0,i.createTableColumn)({columnId:e.column,renderHeaderCell:()=>(0,n.jsx)(i.Body1Strong,{children:e.header}),renderCell:t=>(0,n.jsx)(i.TableCellLayout,{media:e.media?e.media(t):void 0,className:e?.className,style:e?.style,children:e.onRender?e.onRender(t):String(t[e?.column]??``)}),compare:e.order})),E=(e,t)=>{let n=new Set;t.selectedItems.forEach(e=>{let t=Number(e);isNaN(t)||n.add(t)}),S(n),l&&l(Array.from(n).map(e=>r[e]))},D=(e,t)=>{u&&u(t)},O=t.useCallback((e,t)=>{e.stopPropagation(),c===`row`&&l&&l([t])},[c,l]),k=t.useMemo(()=>c===`row`?w.rowSelection:``,[c,w.rowSelection]),A=t.useCallback(()=>(0,n.jsx)(i.DataGridBody,{style:v??{},className:_??``,children:({item:e,rowId:t})=>(0,n.jsx)(i.DataGridRow,{className:k,onClick:t=>O(t,e),children:({renderCell:t})=>(0,n.jsx)(i.DataGridCell,{children:t(e)})},t)}),[O,k,v,_]),j=t.useMemo(()=>r.length&&!h,[r,h]),M=t.useCallback(()=>h?(0,n.jsx)(n.Fragment,{children:g??(0,n.jsx)(Mn,{direction:`vertical`,gap:`s`,justifyContent:`center`,alignItems:`center`,style:{height:`100%`,minHeight:200,width:`100%`},children:(0,n.jsx)(i.Spinner,{})})}):j?(0,n.jsx)(A,{}):!h&&!r.length?(0,n.jsx)(`div`,{children:m}):(0,n.jsx)(n.Fragment,{}),[j,h,r,m]);return(0,n.jsx)(`div`,{ref:C,children:(0,n.jsxs)(i.DataGrid,{as:`div`,items:r,onSelectionChange:E,sortable:s,columns:T,selectionMode:c===`none`||c===`row`?void 0:c===`multiple`?`multiselect`:c===`single`?`single`:void 0,selectedItems:x,defaultSortState:d,onSortChange:D,columnSizingOptions:f,resizableColumns:p,resizableColumnsOptions:{autoFitColumns:!1},children:[(0,n.jsx)(i.DataGridHeader,{children:(0,n.jsx)(i.DataGridRow,{children:({renderHeaderCell:e})=>(0,n.jsx)(i.DataGridHeaderCell,{children:e()})})}),(0,n.jsx)(M,{})]})})},Fn=(0,i.makeStyles)({scrollbar:{scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground3}`,"&::-webkit-scrollbar":{width:`3px`,height:`3px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground3,borderRadius:i.tokens.borderRadiusMedium},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:i.tokens.borderRadiusMedium},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}});function In(e,r){let a=Fn().scrollbar,{columns:o,items:s,enableSorting:c=!1,enableResizing:l=!1,selectionMode:u=`none`,onSelectionChange:d,defaultSelectedItems:f=[],defaultSortState:p,onSortChange:m,columnSizingOptions:h,resizableColumnsOptions:g,noItemsMessage:_,isLoadingData:y,isLoadingDataMessage:b,dataGridBodyClassName:x,dataGridBodyStyles:S,refreshData:C,enableInfiniteScroll:w,onLoadMore:T,infiniteScrollPageSize:E,hasNextPage:D,isLoadingMore:O,autoShowLastPage:k=!0,virtualizedHeight:A=600,virtualizedItemSize:j=44,startIndex:M,onRowClick:N}=e,P=t.useMemo(()=>o.map(e=>(0,i.createTableColumn)({columnId:e.column,renderHeaderCell:()=>(0,n.jsx)(i.Body1Strong,{children:e.header}),renderCell:t=>(0,n.jsx)(i.TableCellLayout,{media:e.media?e.media(t):void 0,className:e?.className,style:e?.style,children:e.onRender?e.onRender(t):String(t[e.column]??``)}),compare:e.order})),[o]),F=t.useCallback(e=>s.findIndex(t=>t===e),[s]),[I,L]=t.useState(new Set(f.map(e=>F(e)))),[R,z]=t.useState(0);t.useEffect(()=>{f.length&&L(new Set(f.map(e=>F(e))))},[f,s,F]),t.useEffect(()=>{C&&L(new Set)},[C]);let ee=(e,t)=>{let n=new Set;t.selectedItems.forEach(e=>{let t=Number(e);isNaN(t)||n.add(t)}),L(n),d&&d(Array.from(n).map(e=>s[e]))},te=(e,t)=>{m&&m(t)},[B,ne]=t.useState(null),re=t.useMemo(()=>new Map(s.map((e,t)=>[e,t])),[s]);t.useEffect(()=>{u===`row`&&B!=null&&B>=s.length&&ne(null)},[s,B,u]),t.useEffect(()=>{C&&u===`row`&&ne(null)},[C,u]);let ie=t.useRef(null),ae=t.useRef(s.length),oe=t.useRef(!1),se=t.useRef(!1),ce=t.useRef(!1);t.useImperativeHandle(r,()=>({scrollToIndex:(e,t=`auto`)=>{let n=ie.current;n&&`scrollToItem`in n&&n.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{z(e=>e+1),ae.current=0,oe.current=!1,se.current=!1,ce.current=!1,le.current=-1,L(new Set),ne(null)},getSelectedRow:()=>B!==null&&B<s.length?{item:s[B],index:B}:null,setSelectedRow:e=>{let t=s.findIndex(t=>t===e);t!==-1&&(ne(t),d?.([e]))}})),t.useEffect(()=>{if(!oe.current&&typeof M==`number`&&ie.current){let e=ie.current;`scrollToItem`in e&&e.scrollToItem(Math.min(M,Math.max(s.length-1,0)),`start`),oe.current=!0}},[M,s.length]),t.useEffect(()=>{let e=ae.current,t=s.length,n=t>e;if(ae.current=t,!k||!n||e===0)return;let r=ie.current;r&&`scrollToItem`in r&&r.scrollToItem(Math.max(t-1,0),`end`)},[s.length,k]);let le=t.useRef(-1),ue=t.useCallback(({visibleStopIndex:e})=>{if(!w||!T||O||ce.current)return;if(!se.current){se.current=!0;return}let t=E??20;if(s.length<t)return;let n=Math.max(5,Math.ceil(t/5));e>=s.length-n&&D&&le.current!==s.length&&(le.current=s.length,ce.current=!0,T())},[w,T,D,O,s.length,E]);return t.useEffect(()=>{ce.current&&s.length>le.current&&(ce.current=!1)},[s.length]),(0,n.jsxs)(`div`,{style:t.useMemo(()=>({overflowX:`auto`,overflowY:`hidden`,position:`relative`}),[]),className:a,children:[y&&(0,n.jsx)(G,{alignItems:`center`,justifyContent:`center`,height:`${A}px`,children:t.isValidElement(b)?b:(0,n.jsxs)(i.Spinner,{size:`extra-tiny`,children:[` `,b??`Loading data...`,` `]})}),!y&&s.length?(0,n.jsxs)(v.DataGrid,{items:s,columns:P,sortable:c,onSortChange:c?te:void 0,selectionMode:u===`none`||u===`row`?void 0:u===`multiple`?`multiselect`:u===`single`?`single`:void 0,selectedItems:I,onSelectionChange:ee,defaultSortState:p,resizableColumns:l,columnSizingOptions:h,resizableColumnsOptions:g,focusMode:`cell`,className:(0,i.mergeClasses)(x,a),style:S,children:[(0,n.jsx)(v.DataGridHeader,{children:(0,n.jsx)(v.DataGridRow,{children:({renderHeaderCell:e})=>(0,n.jsx)(v.DataGridHeaderCell,{children:e()})})}),(0,n.jsx)(v.DataGridBody,{itemSize:j,height:A,width:`100%`,listProps:{onItemsRendered:ue},className:a,children:(e,t)=>(()=>{let r=e.item,a=re.get(r)??s.indexOf(r),o=u===`row`,c=o&&B===a,l=e=>{ne(a),d?.([r]),N?.(r,a)};return(0,n.jsx)(v.DataGridRow,{style:{...t,cursor:o?`pointer`:void 0,background:c?i.tokens.colorSubtleBackgroundSelected:void 0},onClick:l,"aria-selected":c||void 0,children:({renderCell:e})=>(0,n.jsx)(v.DataGridCell,{children:e(r)})})})()})]},R):!y&&!s.length?(0,n.jsx)(`div`,{children:_}):null]})}var Ln=t.forwardRef(In);Ln.displayName=`DataGridV2`;var Rn=200,zn=(0,i.makeStyles)({dialog:{overflow:`visible`},dialogBody:{overflow:`visible`}}),Bn=e=>{let{isOpen:t,dialogTitle:r,dialogActions:a,children:o,maxWidth:s,className:c,minHeight:l,minWidth:u,maxHeight:d}=e,f=zn();return t?(0,n.jsx)(i.Dialog,{open:t,modalType:`modal`,children:(0,n.jsxs)(i.DialogSurface,{className:(0,i.mergeClasses)(f.dialog,c),style:{maxWidth:s??600,minWidth:u??Rn,...l?{minHeight:l}:{},...d?{maxHeight:d}:{}},children:[(0,n.jsx)(i.DialogTitle,{children:r}),(0,n.jsx)(i.DialogBody,{className:f.dialogBody,children:(0,n.jsx)(i.DialogContent,{children:o})}),(0,n.jsx)(i.DialogActions,{fluid:!0,position:`end`,children:a})]})}):(0,n.jsx)(n.Fragment,{})},Vn=e=>{let{isOpen:r,onOpenChange:a,title:o,headerActions:s,footerActions:c,size:l,separator:u,type:d,style:f,children:p,position:m,classNameHeader:h=``,classNameBody:g=``,classNameFooter:_=``}=e,v=t.useCallback((e,t)=>{a&&a(t.open)},[a]),y=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.DrawerHeader,{className:h,children:(0,n.jsx)(i.DrawerHeaderTitle,{style:{width:`100%`},action:s,children:o})}),(0,n.jsx)(i.DrawerBody,{className:g,children:p}),(0,n.jsx)(i.DrawerFooter,{className:_,children:c})]});return d===`inline`?(0,n.jsx)(i.InlineDrawer,{separator:u,open:r,size:l,style:f,position:m,children:y}):(0,n.jsx)(i.OverlayDrawer,{open:r,onOpenChange:v,size:l,style:f,position:m,children:y})},Hn=e=>{let{onDismiss:r,title:a,description:o,icon:s,showCloseButton:c=!0}=e;return(0,n.jsxs)(G,{direction:`vertical`,width:`100%`,children:[(0,n.jsx)(G,{direction:`horizontal`,padding:`s`,gap:`l`,justifyContent:`space-between`,children:(0,n.jsxs)(G,{direction:`horizontal`,alignItems:`center`,width:`100%`,gap:`m`,children:[s?t.isValidElement(s)?s:(0,n.jsx)(p.Icon,{icon:s}):null,(0,n.jsxs)(G,{direction:`vertical`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`100%`,children:[t.isValidElement(a)?a:(0,n.jsxs)(G,{direction:`horizontal`,justifyContent:`space-between`,gap:`l`,width:`100%`,children:[(0,n.jsx)(bt,{fontSize:`l`,block:!0,truncate:!0,numberOfLines:1,children:a}),c&&(0,n.jsx)(i.Button,{appearance:`transparent`,onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1)},icon:(0,n.jsx)(d.Dismiss24Regular,{style:{width:18,height:18}}),color:i.tokens.colorBrandBackground})]}),t.isValidElement(o)?o:(0,n.jsx)(i.Caption1,{style:{display:`-webkit-box`,WebkitLineClamp:4,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`},children:o})]})]})}),(0,n.jsx)(i.Divider,{style:{marginTop:6}})]})},Un=()=>({closeButton:(0,l.css)({marginLeft:`auto`,position:`absolute`,top:`10px`,right:`10px`,zIndex:99999}),divider:(0,l.css)({width:`100%`,height:`1px`,backgroundColor:i.tokens.colorNeutralStroke1,marginTop:`6px`}),renderHeaderContent:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,alignItems:`stretch`,width:`100%`}),renderHeaderHeader:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,padding:`10px`,gap:`20px`}),renderHeaderFooter:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,padding:`20px`,gap:`20px`}),renderHeaderBody:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,padding:`20px`,gap:`20px`}),renderHeaderTitleContainer:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignContent:`center`,alignItems:`center`,width:`100%`}),renderHeaderTitle:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingTop:0,wordBreak:`break-word`}),renderHeaderDescription:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:`4`,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`}),dialogTitleAndDescriptionContainer:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`start`,alignItems:`start`,paddingLeft:`10px`,paddingRight:`20px`,width:`100%`})}),Wn=({isOpen:e,options:r,onClose:i})=>{let{log:a}=z(),[o,s]=(0,t.useState)(void 0);a(o||``);let c=(0,t.useRef)(null),[l,u]=(0,t.useState)(400),{siteUrl:d,listId:f,itemId:p,name:m}=r,h=(0,t.useCallback)(()=>{i()},[i]),g=(0,t.useCallback)(e=>{if(e.origin!==window.location.origin)return;a(`Message from iframe:`,e.data);let{name:t,height:n}=JSON.parse(e.data);switch(t){case`share_dismiss`:h();break;case`share_resize`:u(n);break;case`share_scriptsLoaded`:break;case`share_uiReady`:break;case`share_ready`:break;default:break}},[h]);return(0,t.useEffect)(()=>(window.addEventListener(`message`,g),()=>{window.removeEventListener(`message`,g)}),[g]),(0,t.useEffect)(()=>{if(e){let e=new Date().getTime(),t=encodeURIComponent(window.location.origin),n=`${d}/_layouts/15/sharedialog.aspx?listId=${f}&listItemId=${p}&clientId=sharePoint&policyTip=0&folderColor=&clickTime=${e}&ma=0&fullScreenMode=false&itemName= ${encodeURIComponent(m)}&channelId=&origin=${t}`;a(n),s(n)}else s(void 0)},[e,d,f,p]),(0,n.jsx)(Bn,{isOpen:e,onDismiss:h,maxHeight:`fit-content`,children:(0,n.jsx)(`iframe`,{ref:c,src:o||``,style:{width:`100%`,height:l,border:`none`},onLoad:()=>a(`Iframe loaded`)})})},Gn=()=>(0,t.useMemo)(()=>({container:(0,l.css)({display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`,textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRadius:i.tokens.borderRadiusLarge,padding:`${i.tokens.spacingVerticalXXL} ${i.tokens.spacingHorizontalXXL}`,boxShadow:i.tokens.shadow4,maxWidth:`500px`,margin:`20px auto`}),icon:(0,l.css)({fontSize:`48px`,color:i.tokens.colorPaletteRedForeground1,animation:`pulse 2s infinite`,"@keyframes pulse":{"0%":{transform:`scale(1)`},"50%":{transform:`scale(1.05)`},"100%":{transform:`scale(1)`}}}),title:(0,l.css)({color:i.tokens.colorNeutralForeground1,fontWeight:i.tokens.fontWeightSemibold,textAlign:`center`}),message:(0,l.css)({color:i.tokens.colorNeutralForeground2,textAlign:`center`,lineHeight:i.tokens.lineHeightBase400})}),[]),Kn=({title:e,message:t})=>{let r=Gn();return(0,n.jsx)(i.Card,{className:r.container,children:(0,n.jsxs)(G,{gap:`l`,alignItems:`center`,children:[(0,n.jsx)(d.ErrorCircleRegular,{className:r.icon}),(0,n.jsxs)(G,{gap:`s`,alignItems:`center`,children:[(0,n.jsx)(i.Title3,{className:r.title,children:e}),(0,n.jsx)(i.Body1,{className:r.message,children:t})]})]})})},qn=(0,i.makeStyles)({root:{display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,...i.shorthands.padding(`10px`),gap:`10px`},iconClass:{width:`32px`,height:`32px`},errorContainer:{display:`flex`,flexDirection:`row`,justifyContent:`start`,alignItems:`center`,gap:`10px`,...i.shorthands.padding(`10px`),backgroundColor:i.tokens.colorStatusDangerBackground1},errorIcon:{height:`100%`}}),Jn=e=>{let{messageType:r,children:a,message:o}=e,s=qn(),[c,l]=t.useState(null),u=t.useCallback(()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.errorContainer,children:[(0,n.jsx)(`div`,{className:s.errorIcon,children:(0,n.jsx)(p.Icon,{icon:`fluent:error-circle-12-regular`,width:`32`,height:`32`,color:i.tokens.colorStatusDangerForeground1})}),(0,n.jsx)(i.Body1,{children:o})]})}),[o,s.errorContainer,s.errorIcon]);return t.useEffect(()=>{switch(r){case F.SUCCESS:l((0,n.jsx)(d.CheckmarkCircle32Regular,{primaryFill:i.tokens.colorStatusSuccessForeground1}));break;case F.INFO:l((0,n.jsx)(d.Info32Regular,{primaryFill:i.tokens.colorStatusWarningForeground1}));break;default:break}},[r]),r===F.ERROR?(0,n.jsx)(u,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.root,children:[c,(0,n.jsx)(i.Body1Strong,{children:o}),a]})})},Yn=()=>({container:(0,l.css)({display:`flex`,flexWrap:`nowrap`,minWidth:0,overflow:`hidden`,gap:10,marginBottom:20,width:`100%`}),text1LineStyle:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:1,WebkitBoxOrient:`vertical`,overflow:`hidden`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`}),button:(0,l.css)({cursor:`pointer`,minWidth:107})}),Xn=({items:e,selectedItemId:r,onSelectedItem:a,renderControl:o,theme:s})=>{let c=Yn(),l=t.useCallback(e=>{a&&a(e)},[a]);return(0,n.jsx)(i.Overflow,{children:(0,n.jsxs)(i.FluentProvider,{theme:s,children:[` `,(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(c.container),children:[e.map(e=>{let t=e.id===r;return(0,n.jsx)(i.OverflowItem,{id:e.id,priority:t?2:1,children:o(e,t,()=>l(e.id))},e.id)}),(0,n.jsx)(Qn,{items:e,onSelectedItem:l,theme:s}),` `]})]})})},Zn=({item:e,onSelectedItem:t})=>(0,i.useIsOverflowItemVisible)(e.id)?null:(0,n.jsx)(i.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:(0,n.jsx)(`div`,{children:e.name})},e.id),Qn=({items:e,onSelectedItem:r,theme:a})=>{let{ref:o,overflowCount:s,isOverflowing:c}=(0,i.useOverflowMenu)(),l=t.useMemo(()=>(0,d.bundleIcon)(d.MoreHorizontalFilled,d.MoreHorizontalRegular),[]);return c?(0,n.jsx)(i.IdPrefixProvider,{value:`menu-over-`,children:(0,n.jsx)(i.FluentProvider,{theme:a,children:(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{appearance:`transparent`,ref:o,icon:(0,n.jsx)(l,{}),"aria-label":`${s} more options`,role:`button`})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:e.map(e=>(0,n.jsx)(Zn,{item:e,onSelectedItem:r},e.id))})})]})})}):null},$n=({id:e,children:t})=>(0,i.useIsOverflowItemVisible)(e)?null:(0,n.jsx)(i.MenuItem,{children:t}),er=({items:e,renderItem:t,keyExtractor:r})=>{let{ref:a,overflowCount:o,isOverflowing:s}=(0,i.useOverflowMenu)();return s?(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsxs)(i.MenuButton,{ref:a,children:[`+`,o,` items`]})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:e.map(e=>(0,n.jsx)($n,{id:r(e),children:t(e)},r(e)))})})]}):null},tr=t.default.memo(({items:e,open:r=!0,defaultOpen:a,drawerType:o=`inline`,size:s=`small`,appItem:c,header:l,footer:u,selectedKey:d,defaultSelectedKey:f,selectedCategoryKey:p,onNavigate:m,multiple:h=!0,density:g=`medium`,defaultOpenCategories:_,openCategories:v,onCategoryToggle:y,className:b,style:x})=>{let S=t.default.useMemo(()=>{let t=new Map,n=e=>{for(let r of e)t.set(r.key,r),r.children&&n(r.children)};return n(e),t},[e]),C=(0,t.useCallback)(e=>t=>{e.href&&t.preventDefault(),m?.(e.key,e.href)},[m]),w=(0,t.useCallback)((e,t)=>{if(!m)return;let n=S.get(t.value);n&&m(t.value,n.href)},[m,S]),T=(0,t.useCallback)((e,t)=>{y?.(t.value)},[y]),E=e=>(0,n.jsx)(i.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:C(e),children:e.name},e.key),D=e=>(0,n.jsxs)(i.NavCategory,{value:e.key,children:[(0,n.jsx)(i.NavCategoryItem,{icon:e.icon,children:e.name}),(0,n.jsx)(i.NavSubItemGroup,{children:e.children.map(e=>e.icon?(0,n.jsx)(i.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:C(e),children:e.name},e.key):(0,n.jsx)(i.NavSubItem,{value:e.key,href:e.href,onClick:C(e),children:e.name},e.key))})]},e.key),O=e=>(0,n.jsxs)(t.default.Fragment,{children:[(0,n.jsx)(i.NavSectionHeader,{children:e.name}),e.children.map(e=>e.children&&e.children.length>0?D(e):E(e))]},e.key);return(0,n.jsxs)(i.NavDrawer,{open:r,defaultOpen:a,type:o,size:s,className:b,style:t.default.useMemo(()=>({flexShrink:0,...x}),[x]),selectedValue:d,defaultSelectedValue:f,selectedCategoryValue:p,multiple:h,density:g,defaultOpenCategories:_,openCategories:v,onNavItemSelect:w,onNavCategoryItemToggle:T,children:[l!==void 0&&(0,n.jsx)(i.NavDrawerHeader,{children:l}),(0,n.jsxs)(i.NavDrawerBody,{children:[c&&(c.href?(0,n.jsx)(i.AppItem,{icon:c.icon,href:c.href,children:c.name}):(0,n.jsx)(i.AppItemStatic,{icon:c.icon,children:c.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?O(e):e.children&&e.children.length>0?D(e):E(e))]}),u!==void 0&&(0,n.jsx)(i.NavDrawerFooter,{children:u})]})});tr.displayName=`Navigation`;var nr=()=>({root:(0,l.css)({width:`100%`}),sectionHeader:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontSize:i.tokens.fontSizeBase200,fontWeight:i.tokens.fontWeightSemibold,padding:`${i.tokens.spacingVerticalS} ${i.tokens.spacingHorizontalM}`,textTransform:`uppercase`,letterSpacing:`0.5px`})}),rr=e=>({videoPlayerContainer:(0,l.css)({position:`relative`,width:e.width,height:e.height}),reactPlayer:(0,l.css)({position:`absolute`,top:0,left:0,width:`100%`,height:`100%`}),playButton:(0,l.css)({position:`absolute`,left:`50%`,top:`50%`,zIndex:1,userSelect:`none`})}),ir=e=>{let{url:r,controls:i=!0,width:a=`100%`,height:o=`100%`,loop:s=!1,muted:c=!1}=e,[l,u]=(0,t.useState)(!1),d=rr(e);return(0,n.jsx)(`div`,{className:d.videoPlayerContainer,children:(0,n.jsx)(y.default,{url:r,controls:i,width:a,height:o,playing:l,loop:s,muted:c,onPause:()=>u(!1),onPlay:()=>u(!0),className:d.reactPlayer})})},ar=`spteck-react-controls-maplibre-styles`,or=e=>{let t=e??(typeof document<`u`?document:void 0);if(!t||t.getElementById(ar))return;let n=t.createElement(`style`);n.id=ar,n.textContent=x.default,t.head.appendChild(n)},sr=l.css`
|
|
128
|
+
`}),bn=({placeholder:n,onSearch:r,onChange:a,onClear:o,disabled:s=!1,className:c,width:l,value:u,shape:f=`circular`,contentBefore:p,size:m})=>{let[h,g]=(0,t.useState)(``),v=(0,t.useRef)(null),{searchBoxStyles:y,searchBoxNormalStyles:b,iconWrapperStyles:x}=yn(),S=e.g(),C=n||S.placeholder,w=u!==void 0,T=w?u:h,E=f===`circular`?y:b,D=(0,t.useCallback)((e,t)=>{w||g(t.value),a?.(t.value)},[w,a]),O=(0,t.useCallback)(()=>{w||g(``),v.current?.blur(),o?.(),r?.(``)},[w,o,r]),k=(0,t.useCallback)(e=>{e.key===`Enter`&&T.trim()?r?.(T.trim()):e.key===`Escape`&&(v.current?.blur(),w||g(``),o?.())},[T,w,r,o]);return(0,_.jsx)(i.SearchBox,{ref:v,css:E,className:c,style:{width:l},placeholder:C,value:T,onChange:D,onKeyDown:k,disabled:s,size:m,contentBefore:p??(0,_.jsx)(`span`,{css:x,children:(0,_.jsx)(d.SearchRegular,{})}),dismiss:{onClick:O}})},xn=({onChange:e,defaultKey:r,label:a,options:o=[],minWidth:s,styles:c})=>{let[l,u]=(0,t.useState)(()=>o.map(e=>({...e,selected:e.key===(r??`status`)})));(0,t.useEffect)(()=>{let t=l.find(e=>e.selected);t&&e(t.key)},[]);let d=t.default.useCallback(t=>{u(l.map(e=>({...e,selected:e.key===t.key}))),e(t.key)},[l,e]);return(0,n.jsxs)(W,{gap:`s`,children:[a&&(0,n.jsx)(i.Label,{children:a}),(0,n.jsx)(Ct,{options:l,onSelected:d,styles:s?{minWidth:s}:c??{}})]})},Sn=()=>({menuButton:(0,l.css)({minWidth:200}),popover:(0,l.css)({padding:i.tokens.spacingVerticalS,minWidth:200}),timePicker:(0,l.css)({width:`100%`})}),Cn=()=>({root:(0,l.css)({maxHeight:280,overflowY:`auto`,padding:`${i.tokens.spacingVerticalXS} 0`}),item:(0,l.css)({cursor:`pointer`})}),wn=`time`,Tn=(e,t,n)=>{let r=new Date(e);return r.setHours(t,n,0,0),r},En=(e,t,n)=>{let r={hour:`numeric`,minute:`2-digit`,...n&&{second:`2-digit`},...t&&{hourCycle:t}};return new Intl.DateTimeFormat(void 0,r).format(e)},Dn=e=>`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`,On=(e,t,n,r)=>{let i=[],a=e*60,o=t*60;for(let e=a;e<o;e+=n){let t=Math.floor(e/60),n=e%60;i.push(Tn(r,t,n))}return i},kn=t.memo(e=>{let{onTimeSelect:r,hourCycle:a,showSeconds:o=!1,startHour:s=0,endHour:c=24,increment:l=30,dateAnchor:u}=e,f=Cn(),p=t.useMemo(()=>u??new Date,[u]),m=t.useMemo(()=>On(s,c,l,p),[s,c,l,p]),h=t.useCallback((e,t)=>()=>{r(e,t)},[r]);return(0,n.jsx)(`div`,{className:f.root,children:m.map(e=>{let t=En(e,a,o),r=Dn(e);return(0,n.jsx)(i.MenuItemRadio,{name:wn,value:r,onClick:h(e,t),icon:(0,n.jsx)(d.ClockRegular,{}),className:f.item,children:t},r)})})}),An=(e,t)=>{let n=t?new Date(t):new Date,r=n.getHours()*60+n.getMinutes(),i=Math.ceil(r/e)*e,a=new Date(n);return a.setHours(Math.floor(i/60),i%60,0,0),a},jn=t.memo(e=>{let{onSelected:r,value:a,placeholder:o=`Select a time`,hourCycle:s,showSeconds:c=!1,startHour:l,endHour:u,increment:f=30,dateAnchor:p}=e,m=Sn(),h=t.useMemo(()=>An(f,p),[f,p]),g=a??h,[_,v]=t.useState(g),[y,b]=t.useState(()=>En(g,s,c)),[x,S]=t.useState(!1);t.useEffect(()=>{a&&(v(a),b(En(a,s,c)))},[a,s,c]);let C=t.useCallback((e,t)=>{S(t.open)},[]),w=t.useMemo(()=>(0,d.bundleIcon)(d.ClockFilled,d.ClockRegular),[]),T=t.useMemo(()=>_?{[wn]:[Dn(_)]}:{[wn]:[]},[_]),E=t.useCallback((e,t)=>{v(e),b(t),r(e),S(!1)},[r]);return(0,n.jsxs)(i.Menu,{open:x,onOpenChange:C,checkedValues:T,onCheckedValueChange:t.useCallback((e,t)=>{},[]),children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{shape:`circular`,icon:(0,n.jsx)(w,{}),className:m.menuButton,"aria-label":`Select time: ${y||o}`,children:y||o})}),(0,n.jsx)(i.MenuPopover,{className:m.popover,children:(0,n.jsx)(i.MenuList,{children:(0,n.jsx)(kn,{value:_,onTimeSelect:E,hourCycle:s,showSeconds:c,startHour:l,endHour:u,increment:f,dateAnchor:p})})})]})}),Mn=()=>({container:(0,l.css)({display:`flex`,flexDirection:`column`,gap:i.tokens.spacingVerticalS,position:`relative`}),pickerList:(0,l.css)({maxHeight:300,overflowY:`auto`,backgroundColor:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRadius:i.tokens.borderRadiusMedium,boxShadow:i.tokens.shadow16,scrollbarColor:`${i.tokens.colorBrandForeground1} ${i.tokens.colorNeutralBackground1}`,scrollbarWidth:`thin`,"&::-webkit-scrollbar-track":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar-thumb":{borderRadius:10,borderWidth:1},"&::-webkit-scrollbar":{height:7,width:7}}),optionContent:(0,l.css)({display:`flex`,flexDirection:`column`,gap:i.tokens.spacingVerticalXXS}),optionSecondary:(0,l.css)({fontSize:i.tokens.fontSizeBase200,color:i.tokens.colorNeutralForeground3,fontWeight:i.tokens.fontWeightRegular}),tagPickerControl:(0,l.css)({}),tagPickerInput:(0,l.css)({backgroundColor:`transparent`,border:`none`,outline:`none`,fontSize:i.tokens.fontSizeBase300,"&::placeholder":{color:i.tokens.colorNeutralForeground4},"&:focus":{outline:`none`}})}),Nn=({options:r,selectedOptions:a=[],onSelectionChange:o,onSearchChange:s,onLoadMore:c,pagingInfo:l,placeholder:u,disabled:d=!1,maxSelectedOptions:f,width:p,className:m,noResultsMessage:h,loadingMessage:g,loadingMoreMessage:_,searchDebounceMs:v=300})=>{let y=Mn(),b=e.l(),x=u||b.placeholder,S=h||b.noResultsFound,C=g||b.searching,w=_||b.loadingMore,[T,E]=(0,t.useState)(``),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=a.map(e=>e.value),A=l?.isLoading??!1,j=l?.isLoadingMore??!1,M=l?.hasMore??!1,N=r.filter(e=>!k.includes(e.value)),ee=(0,t.useCallback)(e=>{E(e),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{s?.(e)},v)},[s,v]),P=(0,t.useCallback)(e=>{if(!M||j)return;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-100&&c?.()},[M,j,c]),F=(0,t.useCallback)((e,t)=>{if(t.value===`no-options`||t.value===`loading`||t.value===`loading-more`)return;let n=t.selectedOptions,i=a.filter(e=>n.includes(e.value));if(n.length>k.length){let e=n.find(e=>!k.includes(e));if(e){let t=r.find(t=>t.value===e);if(t){if(f&&a.length>=f)return;i.push(t)}}E(``),s?.(``)}o?.(i)},[r,a,k,o,s,f]);return(0,t.useEffect)(()=>()=>{D.current&&clearTimeout(D.current)},[]),(0,n.jsx)(`div`,{className:`${y.container} ${m||``}`,...p&&{style:{width:p}},children:(0,n.jsxs)(i.TagPicker,{onOptionSelect:F,selectedOptions:k,disabled:d,children:[(0,n.jsxs)(i.TagPickerControl,{className:y.tagPickerControl,children:[(0,n.jsx)(i.TagPickerGroup,{"aria-label":b.selectedItems,children:a.map(e=>(0,n.jsx)(i.Tag,{shape:`circular`,media:e.tagMedia??e.media,value:e.value,dismissible:!0,disabled:d,style:{minHeight:30},children:e.text},e.value))}),(0,n.jsx)(i.TagPickerInput,{className:y.tagPickerInput,"aria-label":b.searchItems,placeholder:x,value:T,onChange:e=>ee(e.target.value),disabled:d})]}),(0,n.jsx)(i.TagPickerList,{ref:O,onScroll:P,className:y.pickerList,children:A?(0,n.jsx)(i.TagPickerOption,{value:`loading`,children:C}):N.length>0?(0,n.jsxs)(n.Fragment,{children:[N.map(e=>(0,n.jsx)(i.TagPickerOption,{value:e.value,text:e.text,media:e.media,children:(0,n.jsxs)(`div`,{className:y.optionContent,children:[(0,n.jsx)(i.Text,{weight:`semibold`,children:e.text}),e.secondaryText&&(0,n.jsx)(i.Text,{size:200,className:y.optionSecondary,children:e.secondaryText})]})},e.value)),j&&(0,n.jsx)(i.TagPickerOption,{value:`loading-more`,children:w})]}):(0,n.jsx)(i.TagPickerOption,{value:`no-options`,children:S})})]})})},q={xs:i.tokens.spacingHorizontalXS,s:i.tokens.spacingHorizontalS,m:i.tokens.spacingHorizontalM,l:i.tokens.spacingHorizontalL,xl:i.tokens.spacingHorizontalXL,xxl:i.tokens.spacingHorizontalXXL},Pn=t.default.memo(({direction:e=`vertical`,justifyContent:t=`flex-start`,alignItems:r=`stretch`,gap:a,columnGap:o,rowGap:s,margin:c,padding:u,marginTop:d,marginBottom:f,marginLeft:p,marginRight:m,paddingTop:h,paddingBottom:g,paddingLeft:_,paddingRight:v,width:y,height:b,wrap:x=!1,children:S,style:C,className:w,overflow:T,background:E})=>(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(w,(0,l.css)({display:`flex`,flexDirection:e===`horizontal`?`row`:`column`,justifyContent:t,alignItems:r,gap:a&&q[a]?q[a]:a,columnGap:o&&q[o]?q[o]:o,rowGap:s&&q[s]?q[s]:s,margin:c&&q[c]?q[c]:c,padding:u&&q[u]?q[u]:u,marginTop:d&&q[d]?q[d]:d,marginBottom:f&&q[f]?q[f]:f,marginLeft:p&&q[p]?q[p]:p,marginRight:m&&q[m]?q[m]:m,paddingTop:h&&q[h]?q[h]:h,paddingBottom:g&&q[g]?q[g]:g,paddingLeft:_&&q[_]?q[_]:_,paddingRight:v&&q[v]?q[v]:v,width:y,height:b,overflow:T,flexWrap:x?`wrap`:`nowrap`,backgroundColor:E,...C})),children:S})),Fn=e=>({styles:{loadingContainer:(0,l.css)({display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`}),noItemsMessage:(0,l.css)({textAlign:`center`,marginTop:20}),rowSelection:(0,l.css)({":hover":{cursor:`pointer`}})}}),In=e=>{let{items:r,columns:a,defaultSelectedItems:o=[],enableSorting:s=!1,selectionMode:c=`none`,onSelectionChange:l,onSortChange:u,defaultSortState:d,columnSizingOptions:f,enableResizing:p=!1,noItemsMessage:m,isLoadingData:h,isLoadingDataMessage:g,dataGridBodyClassName:_,dataGridBodyStyles:v,refreshData:y}=e,b=e=>r.findIndex(t=>t===e),[x,S]=t.useState(new Set(o.map(e=>b(e)))),C=t.useRef(null),{styles:w}=Fn(e);t.useEffect(()=>{o.length>0&&S(new Set(o.map(e=>b(e))))},[o,r]),t.useEffect(()=>{y&&S(new Set)},[y]);let T=a.map(e=>(0,i.createTableColumn)({columnId:e.column,renderHeaderCell:()=>(0,n.jsx)(i.Body1Strong,{children:e.header}),renderCell:t=>(0,n.jsx)(i.TableCellLayout,{media:e.media?e.media(t):void 0,className:e?.className,style:e?.style,children:e.onRender?e.onRender(t):String(t[e?.column]??``)}),compare:e.order})),E=(e,t)=>{let n=new Set;t.selectedItems.forEach(e=>{let t=Number(e);isNaN(t)||n.add(t)}),S(n),l&&l(Array.from(n).map(e=>r[e]))},D=(e,t)=>{u&&u(t)},O=t.useCallback((e,t)=>{e.stopPropagation(),c===`row`&&l&&l([t])},[c,l]),k=t.useMemo(()=>c===`row`?w.rowSelection:``,[c,w.rowSelection]),A=t.useCallback(()=>(0,n.jsx)(i.DataGridBody,{style:v??{},className:_??``,children:({item:e,rowId:t})=>(0,n.jsx)(i.DataGridRow,{className:k,onClick:t=>O(t,e),onKeyDown:t=>{c===`row`&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),l?.([e]))},children:({renderCell:t})=>(0,n.jsx)(i.DataGridCell,{children:t(e)})},t)}),[O,k,v,_]),j=t.useMemo(()=>r.length&&!h,[r,h]),M=t.useCallback(()=>h?(0,n.jsx)(n.Fragment,{children:g??(0,n.jsx)(Pn,{direction:`vertical`,gap:`s`,justifyContent:`center`,alignItems:`center`,style:{height:`100%`,minHeight:200,width:`100%`},children:(0,n.jsx)(i.Spinner,{})})}):j?(0,n.jsx)(A,{}):!h&&!r.length?(0,n.jsx)(`div`,{children:m}):(0,n.jsx)(n.Fragment,{}),[j,h,r,m]);return(0,n.jsx)(`div`,{ref:C,children:(0,n.jsxs)(i.DataGrid,{as:`div`,items:r,onSelectionChange:E,sortable:s,columns:T,selectionMode:c===`none`||c===`row`?void 0:c===`multiple`?`multiselect`:c===`single`?`single`:void 0,selectedItems:x,defaultSortState:d,onSortChange:D,columnSizingOptions:f,resizableColumns:p,resizableColumnsOptions:{autoFitColumns:!1},children:[(0,n.jsx)(i.DataGridHeader,{children:(0,n.jsx)(i.DataGridRow,{children:({renderHeaderCell:e})=>(0,n.jsx)(i.DataGridHeaderCell,{children:e()})})}),(0,n.jsx)(M,{})]})})},Ln=(0,i.makeStyles)({scrollbar:{scrollbarWidth:`thin`,scrollbarColor:`${i.tokens.colorBrandBackground} ${i.tokens.colorNeutralBackground3}`,"&::-webkit-scrollbar":{width:`3px`,height:`3px`},"&::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground3,borderRadius:i.tokens.borderRadiusMedium},"&::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandBackground,borderRadius:i.tokens.borderRadiusMedium},"&::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorBrandBackgroundHover}}});function Rn(e,r){let a=Ln().scrollbar,{columns:o,items:s,enableSorting:c=!1,enableResizing:l=!1,selectionMode:u=`none`,onSelectionChange:d,defaultSelectedItems:f=[],defaultSortState:p,onSortChange:m,columnSizingOptions:h,resizableColumnsOptions:g,noItemsMessage:_,isLoadingData:y,isLoadingDataMessage:b,dataGridBodyClassName:x,dataGridBodyStyles:S,refreshData:C,enableInfiniteScroll:w,onLoadMore:T,infiniteScrollPageSize:E,hasNextPage:D,isLoadingMore:O,autoShowLastPage:k=!0,virtualizedHeight:A=600,virtualizedItemSize:j=44,startIndex:M,onRowClick:N}=e,ee=t.useMemo(()=>o.map(e=>(0,i.createTableColumn)({columnId:e.column,renderHeaderCell:()=>(0,n.jsx)(i.Body1Strong,{children:e.header}),renderCell:t=>(0,n.jsx)(i.TableCellLayout,{media:e.media?e.media(t):void 0,className:e?.className,style:e?.style,children:e.onRender?e.onRender(t):String(t[e.column]??``)}),compare:e.order})),[o]),P=t.useCallback(e=>s.findIndex(t=>t===e),[s]),[F,I]=t.useState(new Set(f.map(e=>P(e)))),[L,R]=t.useState(0);t.useEffect(()=>{f.length&&I(new Set(f.map(e=>P(e))))},[f,s,P]),t.useEffect(()=>{C&&I(new Set)},[C]);let z=(e,t)=>{let n=new Set;t.selectedItems.forEach(e=>{let t=Number(e);isNaN(t)||n.add(t)}),I(n),d&&d(Array.from(n).map(e=>s[e]))},te=(e,t)=>{m&&m(t)},[ne,re]=t.useState(null),ie=t.useMemo(()=>new Map(s.map((e,t)=>[e,t])),[s]);t.useEffect(()=>{u===`row`&&ne!=null&&ne>=s.length&&re(null)},[s,ne,u]),t.useEffect(()=>{C&&u===`row`&&re(null)},[C,u]);let ae=t.useRef(null),oe=t.useRef(s.length),se=t.useRef(!1),ce=t.useRef(!1),le=t.useRef(!1);t.useImperativeHandle(r,()=>({scrollToIndex:(e,t=`auto`)=>{let n=ae.current;n&&`scrollToItem`in n&&n.scrollToItem(Math.max(0,e),t)},resetGrid:()=>{R(e=>e+1),oe.current=0,se.current=!1,ce.current=!1,le.current=!1,ue.current=-1,I(new Set),re(null)},getSelectedRow:()=>ne!==null&&ne<s.length?{item:s[ne],index:ne}:null,setSelectedRow:e=>{let t=s.findIndex(t=>t===e);t!==-1&&(re(t),d?.([e]))}})),t.useEffect(()=>{if(!se.current&&typeof M==`number`&&ae.current){let e=ae.current;`scrollToItem`in e&&e.scrollToItem(Math.min(M,Math.max(s.length-1,0)),`start`),se.current=!0}},[M,s.length]),t.useEffect(()=>{let e=oe.current,t=s.length,n=t>e;if(oe.current=t,!k||!n||e===0)return;let r=ae.current;r&&`scrollToItem`in r&&r.scrollToItem(Math.max(t-1,0),`end`)},[s.length,k]);let ue=t.useRef(-1),de=t.useCallback(({visibleStopIndex:e})=>{if(!w||!T||O||le.current)return;if(!ce.current){ce.current=!0;return}let t=E??20;if(s.length<t)return;let n=Math.max(5,Math.ceil(t/5));e>=s.length-n&&D&&ue.current!==s.length&&(ue.current=s.length,le.current=!0,T())},[w,T,D,O,s.length,E]);return t.useEffect(()=>{le.current&&s.length>ue.current&&(le.current=!1)},[s.length]),(0,n.jsxs)(`div`,{style:t.useMemo(()=>({overflowX:`auto`,overflowY:`hidden`,position:`relative`}),[]),className:a,children:[y&&(0,n.jsx)(W,{alignItems:`center`,justifyContent:`center`,height:`${A}px`,children:t.isValidElement(b)?b:(0,n.jsxs)(i.Spinner,{size:`extra-tiny`,children:[` `,b??`Loading data...`,` `]})}),!y&&s.length?(0,n.jsxs)(v.DataGrid,{items:s,columns:ee,sortable:c,onSortChange:c?te:void 0,selectionMode:u===`none`||u===`row`?void 0:u===`multiple`?`multiselect`:u===`single`?`single`:void 0,selectedItems:F,onSelectionChange:z,defaultSortState:p,resizableColumns:l,columnSizingOptions:h,resizableColumnsOptions:g,focusMode:`cell`,className:(0,i.mergeClasses)(x,a),style:S,children:[(0,n.jsx)(v.DataGridHeader,{children:(0,n.jsx)(v.DataGridRow,{children:({renderHeaderCell:e})=>(0,n.jsx)(v.DataGridHeaderCell,{children:e()})})}),(0,n.jsx)(v.DataGridBody,{itemSize:j,height:A,width:`100%`,listProps:{onItemsRendered:de},className:a,children:(e,t)=>(()=>{let r=e.item,a=ie.get(r)??s.indexOf(r),o=u===`row`,c=o&&ne===a,l=e=>{re(a),d?.([r]),N?.(r,a)};return(0,n.jsx)(v.DataGridRow,{style:{...t,cursor:o?`pointer`:void 0,background:c?i.tokens.colorSubtleBackgroundSelected:void 0},onClick:l,"aria-selected":c||void 0,children:({renderCell:e})=>(0,n.jsx)(v.DataGridCell,{children:e(r)})})})()})]},L):!y&&!s.length?(0,n.jsx)(`div`,{children:_}):null]})}var zn=t.forwardRef(Rn);zn.displayName=`DataGridV2`;var Bn=200,Vn=(0,i.makeStyles)({dialog:{overflow:`visible`},dialogBody:{overflow:`visible`}}),Hn=e=>{let{isOpen:t,dialogTitle:r,dialogActions:a,children:o,maxWidth:s,className:c,minHeight:l,minWidth:u,maxHeight:d}=e,f=Vn();return t?(0,n.jsx)(i.Dialog,{open:t,modalType:`modal`,children:(0,n.jsxs)(i.DialogSurface,{className:(0,i.mergeClasses)(f.dialog,c),style:{maxWidth:s??600,minWidth:u??Bn,...l?{minHeight:l}:{},...d?{maxHeight:d}:{}},children:[(0,n.jsx)(i.DialogTitle,{children:r}),(0,n.jsx)(i.DialogBody,{className:f.dialogBody,children:(0,n.jsx)(i.DialogContent,{children:o})}),(0,n.jsx)(i.DialogActions,{fluid:!0,position:`end`,children:a})]})}):(0,n.jsx)(n.Fragment,{})},Un=e=>{let{isOpen:r,onOpenChange:a,title:o,headerActions:s,footerActions:c,size:l,separator:u,type:d,style:f,children:p,position:m,classNameHeader:h=``,classNameBody:g=``,classNameFooter:_=``}=e,v=t.useCallback((e,t)=>{a&&a(t.open)},[a]),y=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.DrawerHeader,{className:h,children:(0,n.jsx)(i.DrawerHeaderTitle,{style:{width:`100%`},action:s,children:o})}),(0,n.jsx)(i.DrawerBody,{className:g,children:p}),(0,n.jsx)(i.DrawerFooter,{className:_,children:c})]});return d===`inline`?(0,n.jsx)(i.InlineDrawer,{separator:u,open:r,size:l,style:f,position:m,children:y}):(0,n.jsx)(i.OverlayDrawer,{open:r,onOpenChange:v,size:l,style:f,position:m,children:y})},Wn=e=>{let{onDismiss:r,title:a,description:o,icon:s,showCloseButton:c=!0}=e;return(0,n.jsxs)(W,{direction:`vertical`,width:`100%`,children:[(0,n.jsx)(W,{direction:`horizontal`,padding:`s`,gap:`l`,justifyContent:`space-between`,children:(0,n.jsxs)(W,{direction:`horizontal`,alignItems:`center`,width:`100%`,gap:`m`,children:[s?t.isValidElement(s)?s:(0,n.jsx)(p.Icon,{icon:s}):null,(0,n.jsxs)(W,{direction:`vertical`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`100%`,children:[t.isValidElement(a)?a:(0,n.jsxs)(W,{direction:`horizontal`,justifyContent:`space-between`,gap:`l`,width:`100%`,children:[(0,n.jsx)(St,{fontSize:`l`,block:!0,truncate:!0,numberOfLines:1,children:a}),c&&(0,n.jsx)(i.Button,{appearance:`transparent`,onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1)},icon:(0,n.jsx)(d.Dismiss24Regular,{style:{width:18,height:18}}),color:i.tokens.colorBrandBackground,"aria-label":`Close`})]}),t.isValidElement(o)?o:(0,n.jsx)(i.Caption1,{style:{display:`-webkit-box`,WebkitLineClamp:4,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`},children:o})]})]})}),(0,n.jsx)(i.Divider,{style:{marginTop:6}})]})},Gn=()=>({closeButton:(0,l.css)({marginLeft:`auto`,position:`absolute`,top:`10px`,right:`10px`,zIndex:99999}),divider:(0,l.css)({width:`100%`,height:`1px`,backgroundColor:i.tokens.colorNeutralStroke1,marginTop:`6px`}),renderHeaderContent:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,alignItems:`stretch`,width:`100%`}),renderHeaderHeader:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,padding:`10px`,gap:`20px`}),renderHeaderFooter:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,padding:`20px`,gap:`20px`}),renderHeaderBody:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,padding:`20px`,gap:`20px`}),renderHeaderTitleContainer:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignContent:`center`,alignItems:`center`,width:`100%`}),renderHeaderTitle:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,paddingTop:0,wordBreak:`break-word`}),renderHeaderDescription:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:`4`,WebkitBoxOrient:`vertical`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`}),dialogTitleAndDescriptionContainer:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`start`,alignItems:`start`,paddingLeft:`10px`,paddingRight:`20px`,width:`100%`})}),Kn=({isOpen:e,options:r,onClose:i})=>{let{log:a}=z(),[o,s]=(0,t.useState)(void 0);a(o||``);let c=(0,t.useRef)(null),[l,u]=(0,t.useState)(400),{siteUrl:d,listId:f,itemId:p,name:m}=r,h=(0,t.useCallback)(()=>{i()},[i]),g=(0,t.useCallback)(e=>{if(e.origin!==window.location.origin)return;a(`Message from iframe:`,e.data);let{name:t,height:n}=JSON.parse(e.data);switch(t){case`share_dismiss`:h();break;case`share_resize`:u(n);break;case`share_scriptsLoaded`:break;case`share_uiReady`:break;case`share_ready`:break;default:break}},[h]);return(0,t.useEffect)(()=>(window.addEventListener(`message`,g),()=>{window.removeEventListener(`message`,g)}),[g]),(0,t.useEffect)(()=>{if(e){let e=new Date().getTime(),t=encodeURIComponent(window.location.origin),n=`${d}/_layouts/15/sharedialog.aspx?listId=${f}&listItemId=${p}&clientId=sharePoint&policyTip=0&folderColor=&clickTime=${e}&ma=0&fullScreenMode=false&itemName= ${encodeURIComponent(m)}&channelId=&origin=${t}`;a(n),s(n)}else s(void 0)},[e,d,f,p]),(0,n.jsx)(Hn,{isOpen:e,onDismiss:h,maxHeight:`fit-content`,children:(0,n.jsx)(`iframe`,{ref:c,src:o||``,title:`Share dialog`,style:{width:`100%`,height:l,border:`none`},onLoad:()=>a(`Iframe loaded`)})})},qn=()=>(0,t.useMemo)(()=>({container:(0,l.css)({display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`200px`,textAlign:`center`,backgroundColor:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRadius:i.tokens.borderRadiusLarge,padding:`${i.tokens.spacingVerticalXXL} ${i.tokens.spacingHorizontalXXL}`,boxShadow:i.tokens.shadow4,maxWidth:`500px`,margin:`20px auto`}),icon:(0,l.css)({fontSize:`48px`,color:i.tokens.colorPaletteRedForeground1,animation:`pulse 2s infinite`,"@keyframes pulse":{"0%":{transform:`scale(1)`},"50%":{transform:`scale(1.05)`},"100%":{transform:`scale(1)`}}}),title:(0,l.css)({color:i.tokens.colorNeutralForeground1,fontWeight:i.tokens.fontWeightSemibold,textAlign:`center`}),message:(0,l.css)({color:i.tokens.colorNeutralForeground2,textAlign:`center`,lineHeight:i.tokens.lineHeightBase400})}),[]),Jn=({title:e,message:t})=>{let r=qn();return(0,n.jsx)(i.Card,{className:r.container,role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,children:(0,n.jsxs)(W,{gap:`l`,alignItems:`center`,children:[(0,n.jsx)(d.ErrorCircleRegular,{className:r.icon,"aria-hidden":`true`,focusable:!1}),(0,n.jsxs)(W,{gap:`s`,alignItems:`center`,children:[(0,n.jsx)(i.Title3,{className:r.title,children:e}),(0,n.jsx)(i.Body1,{className:r.message,children:t})]})]})})},Yn=(0,i.makeStyles)({root:{display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,...i.shorthands.padding(`10px`),gap:`10px`},iconClass:{width:`32px`,height:`32px`},errorContainer:{display:`flex`,flexDirection:`row`,justifyContent:`start`,alignItems:`center`,gap:`10px`,...i.shorthands.padding(`10px`),backgroundColor:i.tokens.colorStatusDangerBackground1},errorIcon:{height:`100%`}}),Xn=e=>{let{messageType:r,children:a,message:o}=e,s=Yn(),[c,l]=t.useState(null),u=t.useCallback(()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.errorContainer,role:`alert`,"aria-live":`assertive`,"aria-atomic":`true`,children:[(0,n.jsx)(`div`,{className:s.errorIcon,children:(0,n.jsx)(p.Icon,{icon:`fluent:error-circle-12-regular`,width:`32`,height:`32`,color:i.tokens.colorStatusDangerForeground1,"aria-hidden":`true`,focusable:`false`})}),(0,n.jsx)(i.Body1,{children:o})]})}),[o,s.errorContainer,s.errorIcon]);return t.useEffect(()=>{switch(r){case F.SUCCESS:l((0,n.jsx)(d.CheckmarkCircle32Regular,{primaryFill:i.tokens.colorStatusSuccessForeground1}));break;case F.INFO:l((0,n.jsx)(d.Info32Regular,{primaryFill:i.tokens.colorStatusWarningForeground1}));break;default:break}},[r]),r===F.ERROR?(0,n.jsx)(u,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`div`,{className:s.root,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[c,(0,n.jsx)(i.Body1Strong,{children:o}),a]})})},Zn=()=>({container:(0,l.css)({display:`flex`,flexWrap:`nowrap`,minWidth:0,overflow:`hidden`,gap:10,marginBottom:20,width:`100%`}),text1LineStyle:(0,l.css)({display:`-webkit-box`,WebkitLineClamp:1,WebkitBoxOrient:`vertical`,overflow:`hidden`,textAlign:`start`,textOverflow:`ellipsis`,wordBreak:`break-word`}),button:(0,l.css)({cursor:`pointer`,minWidth:107})}),Qn=({items:e,selectedItemId:r,onSelectedItem:a,renderControl:o,theme:s})=>{let c=Zn(),l=t.useCallback(e=>{a&&a(e)},[a]);return(0,n.jsx)(i.Overflow,{children:(0,n.jsxs)(i.FluentProvider,{theme:s,children:[` `,(0,n.jsxs)(`div`,{className:(0,i.mergeClasses)(c.container),role:`toolbar`,"aria-label":`Control bar`,children:[e.map(e=>{let t=e.id===r;return(0,n.jsx)(i.OverflowItem,{id:e.id,priority:t?2:1,children:o(e,t,()=>l(e.id))},e.id)}),(0,n.jsx)(er,{items:e,onSelectedItem:l,theme:s}),` `]})]})})},$n=({item:e,onSelectedItem:t})=>(0,i.useIsOverflowItemVisible)(e.id)?null:(0,n.jsx)(i.MenuItem,{icon:e.icon,onClick:()=>t(e.id),children:(0,n.jsx)(`div`,{children:e.name})},e.id),er=({items:e,onSelectedItem:r,theme:a})=>{let{ref:o,overflowCount:s,isOverflowing:c}=(0,i.useOverflowMenu)(),l=t.useMemo(()=>(0,d.bundleIcon)(d.MoreHorizontalFilled,d.MoreHorizontalRegular),[]);return c?(0,n.jsx)(i.IdPrefixProvider,{value:`menu-over-`,children:(0,n.jsx)(i.FluentProvider,{theme:a,children:(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.MenuButton,{appearance:`transparent`,ref:o,icon:(0,n.jsx)(l,{}),"aria-label":`${s} more options`,role:`button`})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:e.map(e=>(0,n.jsx)($n,{item:e,onSelectedItem:r},e.id))})})]})})}):null},tr=({id:e,children:t})=>(0,i.useIsOverflowItemVisible)(e)?null:(0,n.jsx)(i.MenuItem,{children:t}),nr=({items:e,renderItem:t,keyExtractor:r})=>{let{ref:a,overflowCount:o,isOverflowing:s}=(0,i.useOverflowMenu)();return s?(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsxs)(i.MenuButton,{ref:a,"aria-label":`+${o} more items`,children:[`+`,o,` items`]})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:e.map(e=>(0,n.jsx)(tr,{id:r(e),children:t(e)},r(e)))})})]}):null},rr=t.default.memo(({items:e,open:r=!0,defaultOpen:a,drawerType:o=`inline`,size:s=`small`,appItem:c,header:l,footer:u,selectedKey:d,defaultSelectedKey:f,selectedCategoryKey:p,onNavigate:m,multiple:h=!0,density:g=`medium`,defaultOpenCategories:_,openCategories:v,onCategoryToggle:y,className:b,style:x})=>{let S=t.default.useMemo(()=>{let t=new Map,n=e=>{for(let r of e)t.set(r.key,r),r.children&&n(r.children)};return n(e),t},[e]),C=(0,t.useCallback)(e=>t=>{e.href&&t.preventDefault(),m?.(e.key,e.href)},[m]),w=(0,t.useCallback)((e,t)=>{if(!m)return;let n=S.get(t.value);n&&m(t.value,n.href)},[m,S]),T=(0,t.useCallback)((e,t)=>{y?.(t.value)},[y]),E=e=>(0,n.jsx)(i.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:C(e),children:e.name},e.key),D=e=>(0,n.jsxs)(i.NavCategory,{value:e.key,children:[(0,n.jsx)(i.NavCategoryItem,{icon:e.icon,children:e.name}),(0,n.jsx)(i.NavSubItemGroup,{children:e.children.map(e=>e.icon?(0,n.jsx)(i.NavItem,{value:e.key,href:e.href,icon:e.icon,onClick:C(e),children:e.name},e.key):(0,n.jsx)(i.NavSubItem,{value:e.key,href:e.href,onClick:C(e),children:e.name},e.key))})]},e.key),O=e=>(0,n.jsxs)(t.default.Fragment,{children:[(0,n.jsx)(i.NavSectionHeader,{children:e.name}),e.children.map(e=>e.children&&e.children.length>0?D(e):E(e))]},e.key);return(0,n.jsxs)(i.NavDrawer,{open:r,defaultOpen:a,type:o,size:s,className:b,style:t.default.useMemo(()=>({flexShrink:0,...x}),[x]),selectedValue:d,defaultSelectedValue:f,selectedCategoryValue:p,multiple:h,density:g,defaultOpenCategories:_,openCategories:v,onNavItemSelect:w,onNavCategoryItemToggle:T,children:[l!==void 0&&(0,n.jsx)(i.NavDrawerHeader,{children:l}),(0,n.jsxs)(i.NavDrawerBody,{children:[c&&(c.href?(0,n.jsx)(i.AppItem,{icon:c.icon,href:c.href,children:c.name}):(0,n.jsx)(i.AppItemStatic,{icon:c.icon,children:c.name})),e.map(e=>e.isSectionHeader&&e.children&&e.children.length>0?O(e):e.children&&e.children.length>0?D(e):E(e))]}),u!==void 0&&(0,n.jsx)(i.NavDrawerFooter,{children:u})]})});rr.displayName=`Navigation`;var ir=()=>({root:(0,l.css)({width:`100%`}),sectionHeader:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontSize:i.tokens.fontSizeBase200,fontWeight:i.tokens.fontWeightSemibold,padding:`${i.tokens.spacingVerticalS} ${i.tokens.spacingHorizontalM}`,textTransform:`uppercase`,letterSpacing:`0.5px`})}),ar=e=>({videoPlayerContainer:(0,l.css)({position:`relative`,width:e.width,height:e.height}),reactPlayer:(0,l.css)({position:`absolute`,top:0,left:0,width:`100%`,height:`100%`}),playButton:(0,l.css)({position:`absolute`,left:`50%`,top:`50%`,zIndex:1,userSelect:`none`})}),or=e=>{let{url:r,controls:i=!0,width:a=`100%`,height:o=`100%`,loop:s=!1,muted:c=!1}=e,[l,u]=(0,t.useState)(!1),d=ar(e);return(0,n.jsx)(`div`,{className:d.videoPlayerContainer,role:`region`,"aria-label":`Video player`,children:(0,n.jsx)(y.default,{url:r,controls:i,width:a,height:o,playing:l,loop:s,muted:c,onPause:()=>u(!1),onPlay:()=>u(!0),className:d.reactPlayer})})},sr=`.maplibregl-map{-webkit-tap-highlight-color:#0000;font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;overflow:hidden}.maplibregl-canvas{position:absolute;top:0;left:0}.maplibregl-map:fullscreen{width:100%;height:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;z-index:2;position:absolute}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px buttontext}}.maplibregl-ctrl-group button{box-sizing:border-box;cursor:pointer;background-color:#0000;border:0;outline:none;width:29px;height:29px;padding:0;display:block}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;width:100%;height:100%;display:block}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:#0000}.maplibregl-ctrl-group button+button{border-top:1px solid buttontext}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:#0000000d}}.maplibregl-ctrl button:not(:disabled):active{background-color:#0000000d}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:2s linear infinite maplibregl-spin}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{cursor:pointer;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;width:88px;height:23px;margin:0 0 -4px -4px;display:block;overflow:hidden}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:#0000;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{box-sizing:content-box;color:#000;background-color:#fff;border-radius:12px;min-height:20px;margin:10px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{visibility:visible;padding:2px 28px 2px 8px}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{box-sizing:border-box;cursor:pointer;background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;outline:none;width:24px;height:24px;display:none;position:absolute;top:0;right:0}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:#0000000d}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:#000000bf;text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{box-sizing:border-box;color:#333;white-space:nowrap;background-color:#ffffffbf;border:2px solid #333;border-top:#333;padding:0 5px;font-size:10px}.maplibregl-popup{pointer-events:none;will-change:transform;display:flex;position:absolute;top:0;left:0}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{z-index:1;border:10px solid #0000;width:0;height:0}.maplibregl-popup-anchor-top .maplibregl-popup-tip{border-top:none;border-bottom-color:#fff;align-self:center}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{border-top:none;border-bottom-color:#fff;border-left:none;align-self:flex-start}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{border-top:none;border-bottom-color:#fff;border-right:none;align-self:flex-end}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{border-top-color:#fff;border-bottom:none;align-self:center}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{border-top-color:#fff;border-bottom:none;border-left:none;align-self:flex-start}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{border-top-color:#fff;border-bottom:none;border-right:none;align-self:flex-end}.maplibregl-popup-anchor-left .maplibregl-popup-tip{border-left:none;border-right-color:#fff;align-self:center}.maplibregl-popup-anchor-right .maplibregl-popup-tip{border-left-color:#fff;border-right:none;align-self:center}.maplibregl-popup-close-button{cursor:pointer;background-color:#0000;border:0;border-radius:0 3px 0 0;position:absolute;top:0;right:0}.maplibregl-popup-close-button:hover{background-color:#0000000d}.maplibregl-popup-content{pointer-events:auto;background:#fff;border-radius:3px;padding:15px 10px;position:relative;box-shadow:0 1px 2px #0000001a}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{will-change:transform;transition:opacity .2s;position:absolute;top:0;left:0}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;width:15px;height:15px}.maplibregl-user-location-dot:before{content:"";animation:2s infinite maplibregl-user-location-dot-pulse;position:absolute}.maplibregl-user-location-dot:after{box-sizing:border-box;content:"";border:2px solid #fff;border-radius:50%;width:19px;height:19px;position:absolute;top:-2px;left:-2px;box-shadow:0 0 3px #00000059}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;width:1px;height:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{opacity:.5;background:#fff;border:2px dotted #202020;width:0;height:0;position:absolute;top:0;left:0}.maplibregl-cooperative-gesture-screen{color:#fff;opacity:0;pointer-events:none;z-index:99999;background:#0006;justify-content:center;align-items:center;padding:1rem;font-size:1.4em;line-height:1.2;transition:opacity 1s 1s;display:flex;position:absolute;inset:0}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity 50ms}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{z-index:99999;width:100%!important;height:100%!important;position:fixed!important;top:0!important;left:0!important}`,cr=`spteck-react-controls-maplibre-styles`,lr=e=>{let t=e??(typeof document<`u`?document:void 0);if(!t||t.getElementById(cr))return;let n=t.createElement(`style`);n.id=cr,n.textContent=sr,t.head.appendChild(n)},ur=l.css`
|
|
129
129
|
position: absolute;
|
|
130
130
|
top: 16px;
|
|
131
131
|
right: 16px;
|
|
@@ -136,13 +136,13 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
136
136
|
padding: 4px;
|
|
137
137
|
display: flex;
|
|
138
138
|
gap: 8px;
|
|
139
|
-
`,
|
|
139
|
+
`,dr=l.css`
|
|
140
140
|
flex-direction: column;
|
|
141
|
-
`,
|
|
141
|
+
`,fr=l.css`
|
|
142
142
|
min-width: 32px;
|
|
143
143
|
min-height: 32px;
|
|
144
144
|
${i.shorthands.padding(`4px`)}
|
|
145
|
-
`,
|
|
145
|
+
`,pr=({mapRef:r,initialViewState:a={longitude:0,latitude:20,zoom:1},vertical:o=!0})=>{let s=t.useCallback(()=>{r.current?.getMap().zoomIn()},[r]),c=t.useCallback(()=>{r.current?.getMap().zoomOut()},[r]),l=t.useCallback(()=>{r.current?.flyTo({center:[a.longitude,a.latitude],zoom:a.zoom,essential:!0})},[r,a]),u=e.b();return(0,n.jsxs)(`div`,{className:o?`${ur} ${dr}`:ur,children:[(0,n.jsx)(i.Tooltip,{content:u.zoomIn,relationship:`label`,children:(0,n.jsx)(i.Button,{appearance:`subtle`,icon:(0,n.jsx)(d.ZoomIn24Regular,{}),"aria-label":u.zoomIn,className:fr,onClick:s})}),(0,n.jsx)(i.Tooltip,{content:u.zoomOut,relationship:`label`,children:(0,n.jsx)(i.Button,{appearance:`subtle`,icon:(0,n.jsx)(d.ZoomOut24Regular,{}),"aria-label":u.zoomOut,className:fr,onClick:c})}),(0,n.jsx)(i.Tooltip,{content:u.resetMap,relationship:`label`,children:(0,n.jsx)(i.Button,{appearance:`subtle`,icon:(0,n.jsx)(d.ArrowReset24Regular,{}),"aria-label":u.reset,className:fr,onClick:l})})]})},mr=l.css`
|
|
146
146
|
width: 32px;
|
|
147
147
|
height: 20px;
|
|
148
148
|
border-radius: 4px;
|
|
@@ -151,25 +151,25 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
151
151
|
cursor: pointer;
|
|
152
152
|
display: block;
|
|
153
153
|
margin: 0 auto;
|
|
154
|
-
`,
|
|
154
|
+
`,hr=l.css`
|
|
155
155
|
padding: 12px;
|
|
156
156
|
min-width: 120px;
|
|
157
157
|
display: flex;
|
|
158
158
|
flex-direction: column;
|
|
159
159
|
align-items: center;
|
|
160
160
|
gap: 6px;
|
|
161
|
-
`,
|
|
161
|
+
`,gr=l.css`
|
|
162
162
|
font-weight: 600;
|
|
163
163
|
text-align: center;
|
|
164
164
|
margin-top: 6px;
|
|
165
|
-
`,mr=({data:e,flagClass:t,onClick:r})=>(0,n.jsx)(i.Tooltip,{relationship:`label`,content:(0,n.jsxs)(i.Card,{className:fr,children:[(0,n.jsx)(`img`,{src:e.imageUrl,alt:e.name,className:dr}),(0,n.jsx)(i.Text,{className:pr,children:e.name})]}),withArrow:!0,positioning:`above`,children:(0,n.jsx)(`img`,{src:e.imageUrl,alt:e.name,className:t||dr,onClick:()=>r?.(e)})}),hr=e=>{let[n,r]=(0,t.useState)(void 0),{error:i}=z();return(0,t.useEffect)(()=>{let t=!1;return(async()=>{try{let n=await(await fetch(e)).json();t||r(n)}catch(e){i(`Error loading style:`,e instanceof Error?e:void 0)}})(),()=>{t=!0}},[e]),n},gr=e=>({defaultMapStyles:(0,t.useMemo)(()=>({width:`100%`,height:`600px`,fontFamily:i.tokens.fontFamilyBase}),[]),flagClass:(0,t.useMemo)(()=>(0,l.css)({width:`32px`,height:`20px`,border:`1px solid ${i.tokens.colorNeutralBackground1}`,borderRadius:i.tokens.borderRadiusSmall,boxShadow:i.tokens.shadow4,transition:`transform 0.1s ease`}),[])}),_r=`https://api.maptiler.com/maps/topo-v2/style.json?key=fYK99t1qjkKbINH0saMD`,vr=({data:r,onClick:a,mapStyleUrl:o=_r,style:s,fitPadding:c=20})=>{or();let l=(0,t.useRef)(null),u=hr(o),d=r,{defaultMapStyles:f,flagClass:p}=gr(),m=e.b();return(0,t.useEffect)(()=>{if(!l.current||d.length===0)return;let e=d.map(e=>e.coordinates[0]),t=d.map(e=>e.coordinates[1]);l.current.getMap().fitBounds([[Math.min(...e),Math.min(...t)],[Math.max(...e),Math.max(...t)]],{padding:c})},[d,c]),u?(0,n.jsxs)(b.default,{ref:l,initialViewState:{longitude:0,latitude:20,zoom:1},style:{...s??f},mapStyle:u,pixelRatio:window.devicePixelRatio,children:[(0,n.jsx)(ur,{mapRef:l,initialViewState:{longitude:0,latitude:20,zoom:1}}),d.map(e=>(0,n.jsx)(b.Marker,{longitude:e.coordinates[0],latitude:e.coordinates[1],anchor:`center`,children:(0,n.jsx)(mr,{data:e,onClick:a,flagClass:p})},e.id))]}):(0,n.jsx)(i.Text,{children:m.loadingMapStyle})},Y=function(e){return e[e.SharePoint=0]=`SharePoint`,e[e.Teams=1]=`Teams`,e[e.TeamsDark=2]=`TeamsDark`,e[e.TeamsHighContrast=3]=`TeamsHighContrast`,e}({}),yr=(e,t)=>{let n=(0,C.create)();n.put(`.${t}-ac-container:focus`,{outline:`none !important`}),n.put(`.${t}-ac-adaptiveCard:focus`,{outline:`none !important`}),n.put(`.${t}-ac-pushButton`,{overflow:`hidden`,textOverflow:`ellipsis`,textAlign:`center`,verticalAlign:`middle`,cursor:`pointer`,fontFamily:`inherit`,fontSize:`14px`,fontWeight:`600`,padding:`4px 10px 5px 10px`,WebkitUserSelect:`none`,MozUserSelect:`none`,MsUserSelect:`none`,userSelect:`none`,height:`32px`,borderRadius:`2px`,border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-pushButton:hover`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-pushButton:active`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-pushButton-disabled`,{overflow:`hidden`,textOverflow:`ellipsis`,textAlign:`center`,verticalAlign:`middle`,cursor:`pointer`,fontFamily:`inherit`,fontSize:`14px`,fontWeight:`600`,padding:`4px 10px 5px 10px`,WebkitUserSelect:`none`,MozUserSelect:`none`,MsUserSelect:`none`,userSelect:`none`,height:`32px`,borderRadius:`2px`,border:`1px solid ${e.colorNeutralStrokeDisabled}`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled}),n.put(`.${t}-ac-ctrl-overlay`,{fontFamily:e.fontFamilyBase,position:`absolute`,left:`0`,top:`0`,zIndex:`10000`}),n.put(`.${t}-ac-ctrl`,{boxSizing:`border-box`,fontSize:`14px`,fontWeight:`normal`}),n.put(`.${t}-ac-ctrl-popup-container`,{backgroundColor:e.colorNeutralBackground1,position:`absolute`,overflowY:`auto`,boxShadow:`0px 3.2px 7.2px rgba(0,0,0,0.13), 0px 0.6px 1.8px rgba(0,0,0,0.11)`,borderRadius:`2px`}),n.put(`.${t}-ac-ctrl-popup-container:focus`,{outline:`0`}),n.put(`.${t}-ac-ctrl-slide`,{animationDuration:`0.5s`,animationTimingFunction:`cubic-bezier(0.1, 0.9, 0.2, 1)`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideTopToBottom`,{animationName:`fadeIn, slideTopToBottom`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideBottomToTop`,{animationName:`fadeIn, slideBottomToTop`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideLeftToRight`,{animationName:`fadeIn, slideLeftToRight`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideRightToLeft`,{animationName:`fadeIn, slideRightToLeft`}),n.put(`.${t}-ac-ctrl-dropdown-item`,{width:`100%`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,display:`block`,padding:`0px 12px`,lineHeight:`30px`,cursor:`pointer`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-ctrl-dropdown-item:hover`,{backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-ctrl-dropdown-item:focus`,{outline:`0`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-ctrl-dropdown-item-disabled`,{width:`100%`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,display:`block`,padding:`0px 12px`,lineHeight:`30px`,cursor:`pointer`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled})},br=e=>new S.HostConfig({fontFamily:e.fontFamilyBase,separator:{lineThickness:1,lineColor:e.colorNeutralStroke2},containerStyles:{default:{backgroundColor:e.colorNeutralBackground1,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}},emphasis:{backgroundColor:e.colorNeutralBackground3,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}}},inputs:{label:{requiredInputs:{weight:`bold`},optionalInputs:{weight:`bold`}},errorMessage:{color:`attention`,weight:`bold`}},actions:{buttonSpacing:10,actionAlignment:`right`}}),xr=`fluentUITheme`,Sr=(e,t)=>{e.hostCapabilities.setCustomProperty(xr,t)},Cr=e=>{let t=e.hostCapabilities.getCustomProperty(xr);return t||=i.webLightTheme,t},wr=(e,t)=>{let n;switch(e){case Y.SharePoint:n={theme:t,hostConfig:br(t)};break;case Y.Teams:n={theme:i.teamsLightTheme,hostConfig:br(i.teamsLightTheme)};break;case Y.TeamsDark:n={theme:i.teamsDarkTheme,hostConfig:br(i.teamsDarkTheme)};break;case Y.TeamsHighContrast:n={theme:i.teamsHighContrastTheme,hostConfig:br(i.teamsHighContrastTheme)};break;default:n={theme:t,hostConfig:br(t)};break}return n.hostConfig.cssClassNamePrefix=`ach${Math.random().toString().replace(/\./g,``)}`,Sr(n.hostConfig,n.theme),yr(n.theme,n.hostConfig.cssClassNamePrefix),n},Tr=e=>{S.AdaptiveCard.onProcessMarkdown||(S.AdaptiveCard.onProcessMarkdown=(t,n)=>{n.outputHtml=new w.default().render(t),n.didProcess=!0;try{n.outputHtml=new w.default().render(t),n.didProcess=!0}catch(t){e&&e(`AdaptiveCardHost: Error parsing Markdown`,t instanceof Error?t:void 0),n.didProcess=!1}})},Er=(e,t,n)=>{let r,i;return i=n?{theme:t,aadInfo:n?.pageContext?.aadInfo?{instanceUrl:n.pageContext.aadInfo.instanceUrl||``,tenantId:n.pageContext.aadInfo.tenantId||``,userId:n.pageContext.aadInfo.userId||``}:void 0,cultureInfo:n?.pageContext?.cultureInfo?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:n?.pageContext?.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:n?.pageContext?.list?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||``,title:n.pageContext.list.title}:void 0,spListItemInfo:n?.pageContext?.listItem?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:n?.pageContext?.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:n?.pageContext?.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},r=e?{$root:{...e?.$root,"@context":i}}:{$root:{"@context":i}},r},Dr;try{let e=[`react-dom`,`client`].join(`/`),t=require(e);typeof t.createRoot==`function`&&(Dr=t.createRoot)}catch{}function Or(e){return Dr?Dr(e):{render(t){f.render(t,e)},unmount(){f.unmountComponentAtNode(e)}}}var kr=e=>{let t;return t=e.iconUrl?(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,appearance:`primary`,children:(0,n.jsxs)(`div`,{style:{display:`flex`,flexDirection:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?`row`:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,n.jsx)(`img`,{src:e.iconUrl,style:{width:e.iconSize,height:e.iconSize,flexShrink:0,marginRight:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?4:0,marginBottom:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?0:4},alt:``}),(0,n.jsx)(`span`,{children:e.text})]})}):e.style.toLocaleLowerCase().trim()===`positive`||e.style.toLocaleLowerCase().trim()===`destructive`?(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,appearance:`primary`,children:e.text}):(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,children:e.text}),t},Ar=(e,t,r,a,o,s,c,l)=>{let u=document.createElement(`div`);u.className=`fluentUI`;let d=Or(u);d.render((0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:l,children:(0,n.jsx)(kr,{text:e,className:r,iconUrl:t,iconPlacement:a,iconSize:o,actionClickHandler:s,style:c,theme:l})})}));let f=new MutationObserver(e=>{for(let t of e)for(let e of Array.from(t.removedNodes))if(e===u||u.contains(e)){d.unmount(),f.disconnect();return}});if(u.parentNode)f.observe(u.parentNode,{childList:!0});else{let e=new MutationObserver(()=>{u.parentNode&&(f.observe(u.parentNode,{childList:!0}),e.disconnect())});e.observe(document.body,{childList:!0,subtree:!0})}return u},jr=class extends T.ExecuteAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(xr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Ar(this.title??``,this.iconUrl||``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Mr=class extends T.OpenUrlAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(xr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Ar(this.title??``,this.iconUrl||``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Nr=class extends T.ShowCardAction{updateCssClasses(){if(this.renderedElement){let e=this.state===1;this.renderedElement.setAttribute(`aria-expanded`,e.toString())}}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Ar(this.title||`Default Title`,this.iconUrl||``,this.iconUrl??``,t.iconPlacement,t.iconSize,this.actionClickHandler,this.style)}},Pr=class extends T.SubmitAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(xr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Ar(this.title??``,this.iconUrl??``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Fr=class extends T.ToggleVisibilityAction{updateCssClasses(){if(this.renderedElement){let e=this.state===1;this.renderedElement.setAttribute(`aria-expanded`,e.toString())}}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(xr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Ar(this.title??``,this.iconUrl??``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}};function Ir(e){e.register(`Action.Submit`,Pr),e.register(`Action.OpenUrl`,Mr),e.register(`Action.ShowCard`,Nr),e.register(`Action.ToggleVisibility`,Fr),e.register(`Action.Execute`,jr)}var Lr=e=>{let t=document.createElement(`div`);return Or(t).render(e()),t};function X(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function Z(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Q=class extends S.Input{static valueProperty=new S.StringProperty(S.Versions.v1_5,`value`);static choicesProperty=new S.SerializableObjectCollectionProperty(S.Versions.v1_5,`choices`,S.Choice);static styleProperty=new S.ValueSetProperty(S.Versions.v1_5,`style`,[{value:`compact`},{value:`expanded`},{value:`filtered`,targetVersion:S.Versions.v1_5}],`compact`);static isMultiSelectProperty=new S.BoolProperty(S.Versions.v1_5,`isMultiSelect`,!1);static placeholderProperty=new S.StringProperty(S.Versions.v1_5,`placeholder`);static wrapProperty=new S.BoolProperty(S.Versions.v1_5,`wrap`,!1);defaultValue;style;get isCompact(){return!this.style||this.style===`compact`}set isCompact(e){this.style=e?void 0:`expanded`}isMultiSelect=!1;placeholder;wrap=!1;choices=[];element;refControl;selectedValues=[];defaultSelectedValues=[];updateSelectedValues=(e,t,n)=>{t?n?this.selectedValues.includes(e)||this.selectedValues.push(e):this.removeItemFromArray(this.selectedValues,e):this.selectedValues=[e]};removeItemFromArray=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)};internalRender(){let e=Cr(this.hostConfig),r=this.choices?this.choices.map(e=>({key:e.value,text:e.title})):[];this.defaultValue&&(this.defaultSelectedValues=this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator),this.selectedValues=[...this.defaultSelectedValues]);let a=()=>{let[e,a]=t.useState(this.selectedValues);return t.useEffect(()=>{a(this.selectedValues)},[this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)]),(0,n.jsx)(i.Combobox,{style:{width:`100%`},placeholder:this.placeholder,multiselect:this.isMultiSelect,value:this.isMultiSelect?e.map(e=>r.find(t=>t.key===e)?.text).join(this.hostConfig.choiceSetInputValueSeparator):r.find(t=>e[0]===t.key)?.text,selectedOptions:this.isMultiSelect?e:[e[0]],autoComplete:this.style===`filtered`?`on`:`off`,onOptionSelect:(e,t)=>{if(this.isMultiSelect)a(t.selectedOptions),this.selectedValues=t.selectedOptions;else{let e=t.optionValue??``;a([e]),this.selectedValues=[e]}this.valueChanged()},ref:e=>{this.refControl=e},children:r.map(e=>(0,n.jsx)(i.Option,{value:e.key,children:e.text??``},e.key))})};return this.element=Lr(()=>(0,n.jsxs)(n.Fragment,{children:[!this.isMultiSelect&&this.style===`expanded`&&(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.RadioGroup,{defaultValue:this.defaultValue,onChange:(e,t)=>{this.updateSelectedValues(t.value,this.isMultiSelect,!0),this.valueChanged()},ref:e=>{this.refControl=e},children:this.choices.map((e,t)=>(0,n.jsx)(i.Radio,{value:e.value,label:e.title,style:{marginTop:t>0?this.hostConfig.spacing.default:0}},e.value))})})}),this.isMultiSelect&&this.style===`expanded`&&(0,n.jsx)(`div`,{style:{display:`flex`,gap:this.hostConfig.spacing.default},children:this.choices.map((t,r)=>{let a=this.defaultSelectedValues.indexOf(t.value??``)>-1;return(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.Checkbox,{label:t.title,defaultChecked:a,onChange:(e,n)=>{this.updateSelectedValues(t.value??``,this.isMultiSelect,!!n),this.valueChanged()},ref:e=>{r===0&&(this.refControl=e)}})})},t.value)})}),(this.style===`compact`||this.style===`filtered`)&&(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(a,{})})})]})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.ChoiceSet`}focus(){this.refControl&&this.refControl.focus&&this.refControl.focus()}internalValidateProperties(e){super.internalValidateProperties(e),this.choices.length===0&&e.addFailure(this,S.ValidationEvent.CollectionCantBeEmpty,S.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(let t of this.choices)(!t.title||!t.value)&&e.addFailure(this,S.ValidationEvent.PropertyCantBeNull,S.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}isSet(){return!!this.value}isValid(){return this.value?!0:!this.isRequired}get value(){if(this.selectedValues)return this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)}};Z([(0,S.property)(Q.valueProperty),X(`design:type`,String)],Q.prototype,`defaultValue`,void 0),Z([(0,S.property)(Q.styleProperty),X(`design:type`,String)],Q.prototype,`style`,void 0),Z([(0,S.property)(Q.isMultiSelectProperty),X(`design:type`,Boolean)],Q.prototype,`isMultiSelect`,void 0),Z([(0,S.property)(Q.placeholderProperty),X(`design:type`,String)],Q.prototype,`placeholder`,void 0),Z([(0,S.property)(Q.wrapProperty),X(`design:type`,Boolean)],Q.prototype,`wrap`,void 0),Z([(0,S.property)(Q.choicesProperty),X(`design:type`,Array)],Q.prototype,`choices`,void 0);var Rr=class extends S.Input{static valueProperty=new S.StringProperty(S.Versions.v1_5,`value`);static placeholderProperty=new S.StringProperty(S.Versions.v1_5,`placeholder`);static minProperty=new S.StringProperty(S.Versions.v1_0,`min`);static maxProperty=new S.StringProperty(S.Versions.v1_0,`max`);defaultValue;min;max;placeholder;_value;refControl;element;internalRender(){let e=Cr(this.hostConfig);return this.element=Lr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(D.DatePicker,{id:this.id,placeholder:this.placeholder,minDate:this.convertStringToDate(this.min),maxDate:this.convertStringToDate(this.max),onSelectDate:e=>{this._value=e??void 0,this.valueChanged()},ref:e=>{this.refControl=e},style:{width:`100%`}})})})),this.element.style.width=`100%`,this.element}convertStringToDate(e){if(e)try{let t=new Date(e);return isNaN(t.getTime())?void 0:t}catch{return}}getJsonTypeName(){return`Input.Date`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;let e=new Date(this.value),t=!0;if(this.min){let n=new Date(this.min);t&&=e>=n}if(this.max){let n=new Date(this.max);t&&=e<=n}return t}get value(){if(this._value){let e=this._value.getTimezoneOffset();return new Date(this._value.getTime()-e*60*1e3).toISOString().split(`T`)[0]}}};Z([(0,S.property)(Rr.valueProperty),X(`design:type`,String)],Rr.prototype,`defaultValue`,void 0),Z([(0,S.property)(Rr.minProperty),X(`design:type`,String)],Rr.prototype,`min`,void 0),Z([(0,S.property)(Rr.maxProperty),X(`design:type`,String)],Rr.prototype,`max`,void 0),Z([(0,S.property)(Rr.placeholderProperty),X(`design:type`,String)],Rr.prototype,`placeholder`,void 0);var zr=class extends S.Input{static valueProperty=new S.NumProperty(S.Versions.v1_5,`value`);static placeholderProperty=new S.StringProperty(S.Versions.v1_5,`placeholder`);static minProperty=new S.NumProperty(S.Versions.v1_0,`min`);static maxProperty=new S.NumProperty(S.Versions.v1_0,`max`);defaultValue;min;max;placeholder;refControl=null;element;internalRender(){let e=Cr(this.hostConfig);return this.element=Lr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.SpinButton,{style:{width:`calc(100% - 10px)`},id:this.id,defaultValue:this.defaultValue===void 0?void 0:this.defaultValue,placeholder:this.placeholder,min:this.min,max:this.max,onChange:()=>{this.valueChanged()},ref:e=>{this.refControl=e}})})})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.Number`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){let e=this.value;return e!==void 0&&!isNaN(e)}isValid(){let e=this.value;if(e===void 0)return!this.isRequired;let t=!0;return this.min!==void 0&&(t&&=e>=this.min),this.max!==void 0&&(t&&=e<=this.max),t}get value(){return this.refControl?Number(this.refControl.value):void 0}};Z([(0,S.property)(zr.valueProperty),X(`design:type`,Number)],zr.prototype,`defaultValue`,void 0),Z([(0,S.property)(zr.minProperty),X(`design:type`,Number)],zr.prototype,`min`,void 0),Z([(0,S.property)(zr.maxProperty),X(`design:type`,Number)],zr.prototype,`max`,void 0),Z([(0,S.property)(zr.placeholderProperty),X(`design:type`,String)],zr.prototype,`placeholder`,void 0);var Br=e=>{let{ariaLabel:t,iconProps:r,styles:a,className:o,onClick:s,...c}=e;return(0,n.jsx)(i.Button,{appearance:`transparent`,"aria-label":t,className:o,onClick:s,style:a,...c,children:(0,n.jsx)(`img`,{src:r.src,alt:t,style:{height:r.height||`100%`,width:r.width||`auto`}})})},Vr={marginLeft:8},Hr,Ur,$=class extends S.Input{static valueProperty=new S.StringProperty(S.Versions.v1_0,`value`);static maxLengthProperty=new S.NumProperty(S.Versions.v1_0,`maxLength`);static isMultilineProperty=new S.BoolProperty(S.Versions.v1_0,`isMultiline`,!1);static placeholderProperty=new S.StringProperty(S.Versions.v1_0,`placeholder`);static styleProperty=new S.EnumProperty(S.Versions.v1_0,`style`,S.InputTextStyle,S.InputTextStyle.Text);static inlineActionProperty=new S.ActionProperty(S.Versions.v1_0,`inlineAction`,[`Action.ShowCard`]);static regexProperty=new S.StringProperty(S.Versions.v1_3,`regex`,!0);defaultValue;maxLength;isMultiline=!1;placeholder;style=S.InputTextStyle.Text;inlineAction;regex;refControl=null;element;_value=this.defaultValue||``;internalRender(){let e=Cr(this.hostConfig);return this.element=Lr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:this.isMultiline?(0,n.jsx)(i.Textarea,{resize:`vertical`,style:{width:`100%`},id:this.id,defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e}}):(0,n.jsx)(i.Input,{id:this.id,style:{width:`100%`},type:S.InputTextStyle[this.style].toLowerCase(),defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e?e.inputElement:null}})})})),this.element.style.width=`100%`,this.element}handleKeyDown=e=>{e.key===`Enter`&&this.inlineAction&&this.inlineAction?.execute()};overrideInternalRender(){let e=super.overrideInternalRender();return this.inlineAction&&this.inputControlContainerElement.appendChild(this.buildInlineActionButton()),e||document.createElement(`div`)}buildInlineActionButton=()=>Lr(this.inlineAction?.iconUrl?this.inlineIconActionButton:this.buildTextOnlyInlineActionActionButton);inlineActionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.inlineAction?.execute()};inlineIconActionButton=()=>(0,n.jsx)(i.FluentProvider,{theme:this.hostConfig.hostCapabilities.getCustomProperty(xr),children:(0,n.jsx)(Br,{ariaLabel:this.inlineAction?.title||`Inline action`,className:this.hostConfig.makeCssClassName(`ac-inlineActionButton`,`iconOnly`),iconProps:{src:this.inlineAction?.iconUrl??``},onClick:this.inlineActionClickHandler,styles:Vr})});buildTextOnlyInlineActionActionButton=()=>{let e=this.hostConfig.hostCapabilities.getCustomProperty(xr);return(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.Button,{appearance:`primary`,className:this.hostConfig.makeCssClassName(`ac-inlineActionButton`,`textOnly`),onClick:this.inlineActionClickHandler,style:Vr,children:this.inlineAction?.title??``})})})};getJsonTypeName(){return`Input.Text`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}getActionById(e){let t=super.getActionById(e);if(!t&&this.inlineAction&&(t=this.inlineAction.getActionById(e)),!t)throw Error(`Action with id '${e}' not found.`);return t}isSet(){return!!this.value}isValid(){return this.value?this.regex?new RegExp(this.regex,`g`).test(this.value):!0:!this.isRequired}get value(){if(this._value)return this._value}};Z([(0,S.property)($.valueProperty),X(`design:type`,String)],$.prototype,`defaultValue`,void 0),Z([(0,S.property)($.maxLengthProperty),X(`design:type`,Number)],$.prototype,`maxLength`,void 0),Z([(0,S.property)($.isMultilineProperty),X(`design:type`,Boolean)],$.prototype,`isMultiline`,void 0),Z([(0,S.property)($.placeholderProperty),X(`design:type`,String)],$.prototype,`placeholder`,void 0),Z([(0,S.property)($.styleProperty),X(`design:type`,typeof(Hr=S.InputTextStyle!==void 0&&S.InputTextStyle)==`function`?Hr:Object)],$.prototype,`style`,void 0),Z([(0,S.property)($.inlineActionProperty),X(`design:type`,typeof(Ur=S.Action!==void 0&&S.Action)==`function`?Ur:Object)],$.prototype,`inlineAction`,void 0),Z([(0,S.property)($.regexProperty),X(`design:type`,String)],$.prototype,`regex`,void 0);var Wr=e=>{let{id:r,defaultTime:a,minTime:o,maxTime:s,placeholder:c,theme:l,onTimeChange:u}=e,[f,p]=t.useState(a),[m,h]=t.useState(a?(0,O.formatDateToTimeString)(a??new Date):``);return(0,n.jsx)(i.IdPrefixProvider,{value:r,children:(0,n.jsx)(i.FluentProvider,{theme:l,children:(0,n.jsx)(O.TimePicker,{style:{width:`100%`},expandIcon:(0,n.jsx)(d.ClockRegular,{}),id:r,freeform:!0,min:o?(0,O.formatDateToTimeString)(o):void 0,max:s?(0,O.formatDateToTimeString)(s):void 0,placeholder:c,value:f?(0,O.formatDateToTimeString)(f):m,onTimeChange:(e,t)=>{let n=t.selectedTime??void 0,r=t.selectedTimeText??``;p(n),h(r),u&&n&&u(n,r)},onInput:e=>{h(e.target.value)}})})})},Gr=class e extends S.Input{static convertTimeStringToDate(e){return new Date(`1973-09-04T`+e+`:00Z`)}static valueProperty=new S.TimeProperty(S.Versions.v1_0,`value`);static placeholderProperty=new S.StringProperty(S.Versions.v1_0,`placeholder`);static minProperty=new S.TimeProperty(S.Versions.v1_0,`min`);static maxProperty=new S.TimeProperty(S.Versions.v1_0,`max`);defaultValue;min;max;placeholder;_time;element;internalRender(){let t=Cr(this.hostConfig),r=this.defaultValue?e.convertTimeStringToDate(this.defaultValue):void 0,i=this.min?e.convertTimeStringToDate(this.min):void 0,a=this.max?e.convertTimeStringToDate(this.max):void 0;return this.element=Lr(()=>(0,n.jsx)(Wr,{id:(0,S.generateUniqueId)(),defaultTime:r,minTime:i,maxTime:a,placeholder:this.placeholder,theme:t,onTimeChange:e=>{this._time=e,this.valueChanged()}})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.Time`}focus(){}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;if(!this._time)return!1;let t=!0;if(this.min){let n=e.convertTimeStringToDate(this.min);t&&=this._time>=n}if(this.max){let n=e.convertTimeStringToDate(this.max);t&&=this._time<=n}return t}get value(){return this._time?(0,O.formatDateToTimeString)(this._time):void 0}};Z([(0,S.property)(Gr.valueProperty),X(`design:type`,String)],Gr.prototype,`defaultValue`,void 0),Z([(0,S.property)(Gr.minProperty),X(`design:type`,String)],Gr.prototype,`min`,void 0),Z([(0,S.property)(Gr.maxProperty),X(`design:type`,String)],Gr.prototype,`max`,void 0),Z([(0,S.property)(Gr.placeholderProperty),X(`design:type`,String)],Gr.prototype,`placeholder`,void 0);var Kr=class extends S.Input{static valueProperty=new S.StringProperty(S.Versions.v1_5,`value`);static titleProperty=new S.StringProperty(S.Versions.v1_5,`title`);static valueOnProperty=new S.StringProperty(S.Versions.v1_5,`valueOn`,!0,void 0,`true`,e=>`true`);static valueOffProperty=new S.StringProperty(S.Versions.v1_5,`valueOff`,!0,void 0,`false`,e=>`false`);static wrapProperty=new S.BoolProperty(S.Versions.v1_2,`wrap`,!1);defaultValue;title;valueOn=`true`;valueOff=`false`;wrap=!1;_value;refControl=null;element;internalRender(){let e=Cr(this.hostConfig);return this.element=Lr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,S.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,style:{backgroundColor:`transparent`},children:(0,n.jsx)(i.Switch,{id:this.id,label:this.title,onChange:(e,t)=>{this._value=t.checked,this.valueChanged()},defaultChecked:this.defaultValue===this.valueOn,style:{marginBottom:0,marginTop:0},ref:e=>{this.refControl=e}})})})),this.element.style.width=`100%`,this.element}get isNullable(){return!1}getJsonTypeName(){return`Input.Toggle`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return this.isRequired?this.value===this.valueOn:!!this.value}get value(){return this._value!==null&&this._value!==void 0?this._value?this.valueOn:this.valueOff:this.isRequired?void 0:this.valueOff}};Z([(0,S.property)(Kr.valueProperty),X(`design:type`,String)],Kr.prototype,`defaultValue`,void 0),Z([(0,S.property)(Kr.titleProperty),X(`design:type`,String)],Kr.prototype,`title`,void 0),Z([(0,S.property)(Kr.valueOnProperty),X(`design:type`,String)],Kr.prototype,`valueOn`,void 0),Z([(0,S.property)(Kr.valueOffProperty),X(`design:type`,String)],Kr.prototype,`valueOff`,void 0),Z([(0,S.property)(Kr.wrapProperty),X(`design:type`,Boolean)],Kr.prototype,`wrap`,void 0);function qr(e){e.register(`Input.Text`,$),e.register(`Input.Number`,zr),e.register(`Input.Time`,Gr),e.register(`Input.Date`,Rr),e.register(`Input.Toggle`,Kr),e.register(`Input.ChoiceSet`,Q)}var Jr=e=>{switch(e){case Y.SharePoint:return i.webLightTheme;case Y.Teams:return i.teamsLightTheme;case Y.TeamsDark:return i.teamsDarkTheme;case Y.TeamsHighContrast:return i.teamsHighContrastTheme;default:return i.webLightTheme}},Yr=e=>{let r=(0,t.useRef)(null),{log:a,error:o,LogLevel:s}=z(),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useRef)(null);(0,t.useEffect)(()=>{Tr((e,t)=>o(e,t))},[]),(0,t.useEffect)(()=>{c.current=null,c.current=new S.AdaptiveCard,l.current=new S.SerializationContext},[e]);let d=(0,t.useCallback)(t=>{if(e.onInvokeAction){let n={type:``,title:``},r=t.getJsonTypeName();switch(r){case S.OpenUrlAction.JsonTypeName:{let e=t;n={type:r,title:e.title,url:e.url}}break;case S.SubmitAction.JsonTypeName:{let e=t;n={type:r,title:e.title,data:e.data}}break;case S.ExecuteAction.JsonTypeName:{let e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:`Unknown Action`};break}e.onInvokeAction(n)}},[e.onInvokeAction]);return(0,t.useEffect)(()=>{let t,n=e.themeType;u.current=null,n||=Y.SharePoint,t=e.theme?e.theme:Jr(n);let r=wr(n,t),i=r.hostConfig;a(`hostconfig:`,s.Info,i),u.current=t,c.current&&(c.current.hostConfig=r.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(i.hostCapabilities)},[e]),(0,t.useEffect)(()=>{c.current&&(c.current.onExecuteAction=d)},[e,d]),(0,t.useEffect)(()=>{let t=new S.CardObjectRegistry,n=new S.CardObjectRegistry;S.GlobalRegistry.populateWithDefaultElements(t),S.GlobalRegistry.populateWithDefaultActions(n),qr(t),Ir(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);let r=l.current;r&&r.setElementRegistry(t),r&&r.setActionRegistry(n)},[e]),(0,t.useEffect)(()=>{for(;r?.current?.firstChild;)r.current.lastChild&&r.current.removeChild(r.current.lastChild);let t=r.current;if(!t)return;let n=c.current;try{let r=new k.Template(e.card),i=Er(e.data??{$root:{}},Jr(e.themeType??Y.SharePoint),e.context),a=r.expand(i);if(n&&n.parse(a,l.current??void 0),n){let e=n.render();e&&e.outerHTML!==t.innerHTML&&e.outerHTML!==t.innerHTML&&(t.innerHTML=``,t.appendChild(e))}}catch(t){e.onError&&e.onError(t)}},[e,Jr]),(0,n.jsx)(i.IdPrefixProvider,{value:`adaptiveCardHost`,children:(0,n.jsx)(i.FluentProvider,{theme:u.current?u.current:Jr(e.themeType??Y.SharePoint),children:(0,n.jsx)(`div`,{ref:r,className:`${e.className?e.className:``}`,style:e.style})})})},Xr=({card:e,data:r})=>{let i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!i.current)return;i.current.innerHTML=``;let t=new k.Template(e).expand({$root:r}),n=new S.AdaptiveCard;n?.parse(t);let a=n.render();a&&i.current.appendChild(a)},[e,r]),(0,n.jsx)(`div`,{ref:i})},Zr=g.css`
|
|
165
|
+
`,_r=({data:e,flagClass:t,onClick:r})=>(0,n.jsx)(i.Tooltip,{relationship:`label`,content:(0,n.jsxs)(i.Card,{className:hr,children:[(0,n.jsx)(`img`,{src:e.imageUrl,alt:e.name,className:mr}),(0,n.jsx)(i.Text,{className:gr,children:e.name})]}),withArrow:!0,positioning:`above`,children:(0,n.jsx)(`img`,{src:e.imageUrl,alt:e.name,className:t||mr,role:`button`,tabIndex:0,onClick:()=>r?.(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r?.(e))}})}),vr=e=>{let[n,r]=(0,t.useState)(void 0),{error:i}=z();return(0,t.useEffect)(()=>{let t=!1;return(async()=>{try{let n=await(await fetch(e)).json();t||r(n)}catch(e){i(`Error loading style:`,e instanceof Error?e:void 0)}})(),()=>{t=!0}},[e]),n},yr=e=>({defaultMapStyles:(0,t.useMemo)(()=>({width:`100%`,height:`600px`,fontFamily:i.tokens.fontFamilyBase}),[]),flagClass:(0,t.useMemo)(()=>(0,l.css)({width:`32px`,height:`20px`,border:`1px solid ${i.tokens.colorNeutralBackground1}`,borderRadius:i.tokens.borderRadiusSmall,boxShadow:i.tokens.shadow4,transition:`transform 0.1s ease`}),[])}),br=`https://api.maptiler.com/maps/topo-v2/style.json?key=fYK99t1qjkKbINH0saMD`,xr=({data:r,onClick:a,mapStyleUrl:o=br,style:s,fitPadding:c=20})=>{lr();let l=(0,t.useRef)(null),u=vr(o),d=r,{defaultMapStyles:f,flagClass:p}=yr(),m=e.b();return(0,t.useEffect)(()=>{if(!l.current||d.length===0)return;let e=d.map(e=>e.coordinates[0]),t=d.map(e=>e.coordinates[1]);l.current.getMap().fitBounds([[Math.min(...e),Math.min(...t)],[Math.max(...e),Math.max(...t)]],{padding:c})},[d,c]),u?(0,n.jsxs)(b.default,{ref:l,initialViewState:{longitude:0,latitude:20,zoom:1},style:{...s??f},mapStyle:u,pixelRatio:window.devicePixelRatio,children:[(0,n.jsx)(pr,{mapRef:l,initialViewState:{longitude:0,latitude:20,zoom:1}}),d.map(e=>(0,n.jsx)(b.Marker,{longitude:e.coordinates[0],latitude:e.coordinates[1],anchor:`center`,children:(0,n.jsx)(_r,{data:e,onClick:a,flagClass:p})},e.id))]}):(0,n.jsx)(i.Text,{children:m.loadingMapStyle})},J=function(e){return e[e.SharePoint=0]=`SharePoint`,e[e.Teams=1]=`Teams`,e[e.TeamsDark=2]=`TeamsDark`,e[e.TeamsHighContrast=3]=`TeamsHighContrast`,e}({}),Sr=(e,t)=>{let n=(0,S.create)();n.put(`.${t}-ac-container:focus`,{outline:`none !important`}),n.put(`.${t}-ac-adaptiveCard:focus`,{outline:`none !important`}),n.put(`.${t}-ac-pushButton`,{overflow:`hidden`,textOverflow:`ellipsis`,textAlign:`center`,verticalAlign:`middle`,cursor:`pointer`,fontFamily:`inherit`,fontSize:`14px`,fontWeight:`600`,padding:`4px 10px 5px 10px`,WebkitUserSelect:`none`,MozUserSelect:`none`,MsUserSelect:`none`,userSelect:`none`,height:`32px`,borderRadius:`2px`,border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-pushButton:hover`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-pushButton:active`,{border:`1px solid ${e.colorNeutralStrokeAccessible}`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-pushButton-disabled`,{overflow:`hidden`,textOverflow:`ellipsis`,textAlign:`center`,verticalAlign:`middle`,cursor:`pointer`,fontFamily:`inherit`,fontSize:`14px`,fontWeight:`600`,padding:`4px 10px 5px 10px`,WebkitUserSelect:`none`,MozUserSelect:`none`,MsUserSelect:`none`,userSelect:`none`,height:`32px`,borderRadius:`2px`,border:`1px solid ${e.colorNeutralStrokeDisabled}`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled}),n.put(`.${t}-ac-ctrl-overlay`,{fontFamily:e.fontFamilyBase,position:`absolute`,left:`0`,top:`0`,zIndex:`10000`}),n.put(`.${t}-ac-ctrl`,{boxSizing:`border-box`,fontSize:`14px`,fontWeight:`normal`}),n.put(`.${t}-ac-ctrl-popup-container`,{backgroundColor:e.colorNeutralBackground1,position:`absolute`,overflowY:`auto`,boxShadow:`0px 3.2px 7.2px rgba(0,0,0,0.13), 0px 0.6px 1.8px rgba(0,0,0,0.11)`,borderRadius:`2px`}),n.put(`.${t}-ac-ctrl-popup-container:focus`,{outline:`0`}),n.put(`.${t}-ac-ctrl-slide`,{animationDuration:`0.5s`,animationTimingFunction:`cubic-bezier(0.1, 0.9, 0.2, 1)`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideTopToBottom`,{animationName:`fadeIn, slideTopToBottom`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideBottomToTop`,{animationName:`fadeIn, slideBottomToTop`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideLeftToRight`,{animationName:`fadeIn, slideLeftToRight`}),n.put(`.${t}-ac-ctrl-slide.${t}-ac-ctrl-slideRightToLeft`,{animationName:`fadeIn, slideRightToLeft`}),n.put(`.${t}-ac-ctrl-dropdown-item`,{width:`100%`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,display:`block`,padding:`0px 12px`,lineHeight:`30px`,cursor:`pointer`,backgroundColor:e.colorNeutralBackground1,color:e.colorNeutralForeground1}),n.put(`.${t}-ac-ctrl-dropdown-item:hover`,{backgroundColor:e.colorNeutralBackground2,color:e.colorNeutralForeground2}),n.put(`.${t}-ac-ctrl-dropdown-item:focus`,{outline:`0`,backgroundColor:e.colorNeutralBackground3,color:e.colorNeutralForeground3}),n.put(`.${t}-ac-ctrl-dropdown-item-disabled`,{width:`100%`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,display:`block`,padding:`0px 12px`,lineHeight:`30px`,cursor:`pointer`,backgroundColor:e.colorNeutralBackgroundDisabled,color:e.colorNeutralForegroundDisabled})},Cr=e=>new x.HostConfig({fontFamily:e.fontFamilyBase,separator:{lineThickness:1,lineColor:e.colorNeutralStroke2},containerStyles:{default:{backgroundColor:e.colorNeutralBackground1,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}},emphasis:{backgroundColor:e.colorNeutralBackground3,foregroundColors:{default:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},dark:{default:e.colorNeutralForeground3,subtle:e.colorNeutralForeground4},light:{default:e.colorNeutralForeground1,subtle:e.colorNeutralForeground2},accent:{default:e.colorBrandForeground1,subtle:e.colorBrandForeground2},attention:{default:e.colorPaletteRedBackground3,subtle:e.colorPaletteRedBackground2},good:{default:e.colorPaletteGreenBackground3,subtle:e.colorPaletteGreenBackground2},warning:{default:e.colorPaletteYellowBackground3,subtle:e.colorPaletteYellowBackground2}}}},inputs:{label:{requiredInputs:{weight:`bold`},optionalInputs:{weight:`bold`}},errorMessage:{color:`attention`,weight:`bold`}},actions:{buttonSpacing:10,actionAlignment:`right`}}),wr=`fluentUITheme`,Tr=(e,t)=>{e.hostCapabilities.setCustomProperty(wr,t)},Er=e=>{let t=e.hostCapabilities.getCustomProperty(wr);return t||=i.webLightTheme,t},Dr=(e,t)=>{let n;switch(e){case J.SharePoint:n={theme:t,hostConfig:Cr(t)};break;case J.Teams:n={theme:i.teamsLightTheme,hostConfig:Cr(i.teamsLightTheme)};break;case J.TeamsDark:n={theme:i.teamsDarkTheme,hostConfig:Cr(i.teamsDarkTheme)};break;case J.TeamsHighContrast:n={theme:i.teamsHighContrastTheme,hostConfig:Cr(i.teamsHighContrastTheme)};break;default:n={theme:t,hostConfig:Cr(t)};break}return n.hostConfig.cssClassNamePrefix=`ach${Math.random().toString().replace(/\./g,``)}`,Tr(n.hostConfig,n.theme),Sr(n.theme,n.hostConfig.cssClassNamePrefix),n},Or=e=>{x.AdaptiveCard.onProcessMarkdown||(x.AdaptiveCard.onProcessMarkdown=(t,n)=>{n.outputHtml=new C.default().render(t),n.didProcess=!0;try{n.outputHtml=new C.default().render(t),n.didProcess=!0}catch(t){e&&e(`AdaptiveCardHost: Error parsing Markdown`,t instanceof Error?t:void 0),n.didProcess=!1}})},kr=(e,t,n)=>{let r,i;return i=n?{theme:t,aadInfo:n?.pageContext?.aadInfo?{instanceUrl:n.pageContext.aadInfo.instanceUrl||``,tenantId:n.pageContext.aadInfo.tenantId||``,userId:n.pageContext.aadInfo.userId||``}:void 0,cultureInfo:n?.pageContext?.cultureInfo?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:n?.pageContext?.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:n?.pageContext?.list?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||``,title:n.pageContext.list.title}:void 0,spListItemInfo:n?.pageContext?.listItem?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:n?.pageContext?.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:n?.pageContext?.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},r=e?{$root:{...e?.$root,"@context":i}}:{$root:{"@context":i}},r};function Ar(e){return(0,w.createRoot)(e)}var jr=e=>{let t;return t=e.iconUrl?(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,appearance:`primary`,children:(0,n.jsxs)(`div`,{style:{display:`flex`,flexDirection:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?`row`:`column`,justifyContent:`center`,alignItems:`center`},children:[(0,n.jsx)(`img`,{src:e.iconUrl,style:{width:e.iconSize,height:e.iconSize,flexShrink:0,marginRight:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?4:0,marginBottom:e.iconPlacement===E.ActionIconPlacement.LeftOfTitle?0:4},alt:``}),(0,n.jsx)(`span`,{children:e.text})]})}):e.style.toLocaleLowerCase().trim()===`positive`||e.style.toLocaleLowerCase().trim()===`destructive`?(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,appearance:`primary`,children:e.text}):(0,n.jsx)(i.Button,{className:e.className,onClick:e.actionClickHandler,children:e.text}),t},Mr=(e,t,r,a,o,s,c,l)=>{let u=document.createElement(`div`);u.className=`fluentUI`;let d=Ar(u);d.render((0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:l,children:(0,n.jsx)(jr,{text:e,className:r,iconUrl:t,iconPlacement:a,iconSize:o,actionClickHandler:s,style:c,theme:l})})}));let f=new MutationObserver(e=>{for(let t of e)for(let e of Array.from(t.removedNodes))if(e===u||u.contains(e)){d.unmount(),f.disconnect();return}});if(u.parentNode)f.observe(u.parentNode,{childList:!0});else{let e=new MutationObserver(()=>{u.parentNode&&(f.observe(u.parentNode,{childList:!0}),e.disconnect())});e.observe(document.body,{childList:!0,subtree:!0})}return u},Nr=class extends T.ExecuteAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(wr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Mr(this.title??``,this.iconUrl||``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Pr=class extends T.OpenUrlAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(wr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Mr(this.title??``,this.iconUrl||``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Fr=class extends T.ShowCardAction{updateCssClasses(){if(this.renderedElement){let e=this.state===1;this.renderedElement.setAttribute(`aria-expanded`,e.toString())}}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Mr(this.title||`Default Title`,this.iconUrl||``,this.iconUrl??``,t.iconPlacement,t.iconSize,this.actionClickHandler,this.style)}},Ir=class extends T.SubmitAction{updateCssClasses(){}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(wr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Mr(this.title??``,this.iconUrl??``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}},Lr=class extends T.ToggleVisibilityAction{updateCssClasses(){if(this.renderedElement){let e=this.state===1;this.renderedElement.setAttribute(`aria-expanded`,e.toString())}}actionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.execute()};render(e){let t=this.hostConfig.hostCapabilities.getCustomProperty(wr),n=this.parent?.hostConfig?.actions??{iconPlacement:`left`,iconSize:24};this._renderedElement=Mr(this.title??``,this.iconUrl??``,e||``,n.iconPlacement,n.iconSize,this.actionClickHandler,this.style,t)}};function Rr(e){e.register(`Action.Submit`,Ir),e.register(`Action.OpenUrl`,Pr),e.register(`Action.ShowCard`,Fr),e.register(`Action.ToggleVisibility`,Lr),e.register(`Action.Execute`,Nr)}var zr=e=>{let t=document.createElement(`div`);return Ar(t).render(e()),t};function Y(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function X(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Z=class extends x.Input{static valueProperty=new x.StringProperty(x.Versions.v1_5,`value`);static choicesProperty=new x.SerializableObjectCollectionProperty(x.Versions.v1_5,`choices`,x.Choice);static styleProperty=new x.ValueSetProperty(x.Versions.v1_5,`style`,[{value:`compact`},{value:`expanded`},{value:`filtered`,targetVersion:x.Versions.v1_5}],`compact`);static isMultiSelectProperty=new x.BoolProperty(x.Versions.v1_5,`isMultiSelect`,!1);static placeholderProperty=new x.StringProperty(x.Versions.v1_5,`placeholder`);static wrapProperty=new x.BoolProperty(x.Versions.v1_5,`wrap`,!1);defaultValue;style;get isCompact(){return!this.style||this.style===`compact`}set isCompact(e){this.style=e?void 0:`expanded`}isMultiSelect=!1;placeholder;wrap=!1;choices=[];element;refControl;selectedValues=[];defaultSelectedValues=[];updateSelectedValues=(e,t,n)=>{t?n?this.selectedValues.includes(e)||this.selectedValues.push(e):this.removeItemFromArray(this.selectedValues,e):this.selectedValues=[e]};removeItemFromArray=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)};internalRender(){let e=Er(this.hostConfig),r=this.choices?this.choices.map(e=>({key:e.value,text:e.title})):[];this.defaultValue&&(this.defaultSelectedValues=this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator),this.selectedValues=[...this.defaultSelectedValues]);let a=()=>{let[e,a]=t.useState(this.selectedValues);return t.useEffect(()=>{a(this.selectedValues)},[this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)]),(0,n.jsx)(i.Combobox,{style:{width:`100%`},placeholder:this.placeholder,multiselect:this.isMultiSelect,value:this.isMultiSelect?e.map(e=>r.find(t=>t.key===e)?.text).join(this.hostConfig.choiceSetInputValueSeparator):r.find(t=>e[0]===t.key)?.text,selectedOptions:this.isMultiSelect?e:[e[0]],autoComplete:this.style===`filtered`?`on`:`off`,onOptionSelect:(e,t)=>{if(this.isMultiSelect)a(t.selectedOptions),this.selectedValues=t.selectedOptions;else{let e=t.optionValue??``;a([e]),this.selectedValues=[e]}this.valueChanged()},ref:e=>{this.refControl=e},children:r.map(e=>(0,n.jsx)(i.Option,{value:e.key,children:e.text??``},e.key))})};return this.element=zr(()=>(0,n.jsxs)(n.Fragment,{children:[!this.isMultiSelect&&this.style===`expanded`&&(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.RadioGroup,{defaultValue:this.defaultValue,onChange:(e,t)=>{this.updateSelectedValues(t.value,this.isMultiSelect,!0),this.valueChanged()},ref:e=>{this.refControl=e},children:this.choices.map((e,t)=>(0,n.jsx)(i.Radio,{value:e.value,label:e.title,style:{marginTop:t>0?this.hostConfig.spacing.default:0}},e.value))})})}),this.isMultiSelect&&this.style===`expanded`&&(0,n.jsx)(`div`,{style:{display:`flex`,gap:this.hostConfig.spacing.default},children:this.choices.map((t,r)=>{let a=this.defaultSelectedValues.indexOf(t.value??``)>-1;return(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.Checkbox,{label:t.title,defaultChecked:a,onChange:(e,n)=>{this.updateSelectedValues(t.value??``,this.isMultiSelect,!!n),this.valueChanged()},ref:e=>{r===0&&(this.refControl=e)}})})},t.value)})}),(this.style===`compact`||this.style===`filtered`)&&(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(a,{})})})]})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.ChoiceSet`}focus(){this.refControl&&this.refControl.focus&&this.refControl.focus()}internalValidateProperties(e){super.internalValidateProperties(e),this.choices.length===0&&e.addFailure(this,x.ValidationEvent.CollectionCantBeEmpty,x.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(let t of this.choices)(!t.title||!t.value)&&e.addFailure(this,x.ValidationEvent.PropertyCantBeNull,x.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}isSet(){return!!this.value}isValid(){return this.value?!0:!this.isRequired}get value(){if(this.selectedValues)return this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)}};X([(0,x.property)(Z.valueProperty),Y(`design:type`,String)],Z.prototype,`defaultValue`,void 0),X([(0,x.property)(Z.styleProperty),Y(`design:type`,String)],Z.prototype,`style`,void 0),X([(0,x.property)(Z.isMultiSelectProperty),Y(`design:type`,Boolean)],Z.prototype,`isMultiSelect`,void 0),X([(0,x.property)(Z.placeholderProperty),Y(`design:type`,String)],Z.prototype,`placeholder`,void 0),X([(0,x.property)(Z.wrapProperty),Y(`design:type`,Boolean)],Z.prototype,`wrap`,void 0),X([(0,x.property)(Z.choicesProperty),Y(`design:type`,Array)],Z.prototype,`choices`,void 0);var Br=class extends x.Input{static valueProperty=new x.StringProperty(x.Versions.v1_5,`value`);static placeholderProperty=new x.StringProperty(x.Versions.v1_5,`placeholder`);static minProperty=new x.StringProperty(x.Versions.v1_0,`min`);static maxProperty=new x.StringProperty(x.Versions.v1_0,`max`);defaultValue;min;max;placeholder;_value;refControl;element;internalRender(){let e=Er(this.hostConfig);return this.element=zr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(D.DatePicker,{id:this.id,placeholder:this.placeholder,minDate:this.convertStringToDate(this.min),maxDate:this.convertStringToDate(this.max),onSelectDate:e=>{this._value=e??void 0,this.valueChanged()},ref:e=>{this.refControl=e},style:{width:`100%`}})})})),this.element.style.width=`100%`,this.element}convertStringToDate(e){if(e)try{let t=new Date(e);return isNaN(t.getTime())?void 0:t}catch{return}}getJsonTypeName(){return`Input.Date`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;let e=new Date(this.value),t=!0;if(this.min){let n=new Date(this.min);t&&=e>=n}if(this.max){let n=new Date(this.max);t&&=e<=n}return t}get value(){if(this._value){let e=this._value.getTimezoneOffset();return new Date(this._value.getTime()-e*60*1e3).toISOString().split(`T`)[0]}}};X([(0,x.property)(Br.valueProperty),Y(`design:type`,String)],Br.prototype,`defaultValue`,void 0),X([(0,x.property)(Br.minProperty),Y(`design:type`,String)],Br.prototype,`min`,void 0),X([(0,x.property)(Br.maxProperty),Y(`design:type`,String)],Br.prototype,`max`,void 0),X([(0,x.property)(Br.placeholderProperty),Y(`design:type`,String)],Br.prototype,`placeholder`,void 0);var Vr=class extends x.Input{static valueProperty=new x.NumProperty(x.Versions.v1_5,`value`);static placeholderProperty=new x.StringProperty(x.Versions.v1_5,`placeholder`);static minProperty=new x.NumProperty(x.Versions.v1_0,`min`);static maxProperty=new x.NumProperty(x.Versions.v1_0,`max`);defaultValue;min;max;placeholder;refControl=null;element;internalRender(){let e=Er(this.hostConfig);return this.element=zr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.SpinButton,{style:{width:`calc(100% - 10px)`},id:this.id,defaultValue:this.defaultValue===void 0?void 0:this.defaultValue,placeholder:this.placeholder,min:this.min,max:this.max,onChange:()=>{this.valueChanged()},ref:e=>{this.refControl=e}})})})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.Number`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){let e=this.value;return e!==void 0&&!isNaN(e)}isValid(){let e=this.value;if(e===void 0)return!this.isRequired;let t=!0;return this.min!==void 0&&(t&&=e>=this.min),this.max!==void 0&&(t&&=e<=this.max),t}get value(){return this.refControl?Number(this.refControl.value):void 0}};X([(0,x.property)(Vr.valueProperty),Y(`design:type`,Number)],Vr.prototype,`defaultValue`,void 0),X([(0,x.property)(Vr.minProperty),Y(`design:type`,Number)],Vr.prototype,`min`,void 0),X([(0,x.property)(Vr.maxProperty),Y(`design:type`,Number)],Vr.prototype,`max`,void 0),X([(0,x.property)(Vr.placeholderProperty),Y(`design:type`,String)],Vr.prototype,`placeholder`,void 0);var Hr=e=>{let{ariaLabel:t,iconProps:r,styles:a,className:o,onClick:s,...c}=e;return(0,n.jsx)(i.Button,{appearance:`transparent`,"aria-label":t,className:o,onClick:s,style:a,...c,children:(0,n.jsx)(`img`,{src:r.src,alt:t,style:{height:r.height||`100%`,width:r.width||`auto`}})})},Ur={marginLeft:8},Wr,Gr,Q=class extends x.Input{static valueProperty=new x.StringProperty(x.Versions.v1_0,`value`);static maxLengthProperty=new x.NumProperty(x.Versions.v1_0,`maxLength`);static isMultilineProperty=new x.BoolProperty(x.Versions.v1_0,`isMultiline`,!1);static placeholderProperty=new x.StringProperty(x.Versions.v1_0,`placeholder`);static styleProperty=new x.EnumProperty(x.Versions.v1_0,`style`,x.InputTextStyle,x.InputTextStyle.Text);static inlineActionProperty=new x.ActionProperty(x.Versions.v1_0,`inlineAction`,[`Action.ShowCard`]);static regexProperty=new x.StringProperty(x.Versions.v1_3,`regex`,!0);defaultValue;maxLength;isMultiline=!1;placeholder;style=x.InputTextStyle.Text;inlineAction;regex;refControl=null;element;_value=this.defaultValue||``;internalRender(){let e=Er(this.hostConfig);return this.element=zr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:this.isMultiline?(0,n.jsx)(i.Textarea,{resize:`vertical`,style:{width:`100%`},id:this.id,defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e}}):(0,n.jsx)(i.Input,{id:this.id,style:{width:`100%`},type:x.InputTextStyle[this.style].toLowerCase(),defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e?e.inputElement:null}})})})),this.element.style.width=`100%`,this.element}handleKeyDown=e=>{e.key===`Enter`&&this.inlineAction&&this.inlineAction?.execute()};overrideInternalRender(){let e=super.overrideInternalRender();return this.inlineAction&&this.inputControlContainerElement.appendChild(this.buildInlineActionButton()),e||document.createElement(`div`)}buildInlineActionButton=()=>zr(this.inlineAction?.iconUrl?this.inlineIconActionButton:this.buildTextOnlyInlineActionActionButton);inlineActionClickHandler=e=>{e.stopPropagation(),e.preventDefault(),this.inlineAction?.execute()};inlineIconActionButton=()=>(0,n.jsx)(i.FluentProvider,{theme:this.hostConfig.hostCapabilities.getCustomProperty(wr),children:(0,n.jsx)(Hr,{ariaLabel:this.inlineAction?.title||`Inline action`,className:this.hostConfig.makeCssClassName(`ac-inlineActionButton`,`iconOnly`),iconProps:{src:this.inlineAction?.iconUrl??``},onClick:this.inlineActionClickHandler,styles:Ur})});buildTextOnlyInlineActionActionButton=()=>{let e=this.hostConfig.hostCapabilities.getCustomProperty(wr);return(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,children:(0,n.jsx)(i.Button,{appearance:`primary`,className:this.hostConfig.makeCssClassName(`ac-inlineActionButton`,`textOnly`),onClick:this.inlineActionClickHandler,style:Ur,children:this.inlineAction?.title??``})})})};getJsonTypeName(){return`Input.Text`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}getActionById(e){let t=super.getActionById(e);if(!t&&this.inlineAction&&(t=this.inlineAction.getActionById(e)),!t)throw Error(`Action with id '${e}' not found.`);return t}isSet(){return!!this.value}isValid(){return this.value?this.regex?new RegExp(this.regex,`g`).test(this.value):!0:!this.isRequired}get value(){if(this._value)return this._value}};X([(0,x.property)(Q.valueProperty),Y(`design:type`,String)],Q.prototype,`defaultValue`,void 0),X([(0,x.property)(Q.maxLengthProperty),Y(`design:type`,Number)],Q.prototype,`maxLength`,void 0),X([(0,x.property)(Q.isMultilineProperty),Y(`design:type`,Boolean)],Q.prototype,`isMultiline`,void 0),X([(0,x.property)(Q.placeholderProperty),Y(`design:type`,String)],Q.prototype,`placeholder`,void 0),X([(0,x.property)(Q.styleProperty),Y(`design:type`,typeof(Wr=x.InputTextStyle!==void 0&&x.InputTextStyle)==`function`?Wr:Object)],Q.prototype,`style`,void 0),X([(0,x.property)(Q.inlineActionProperty),Y(`design:type`,typeof(Gr=x.Action!==void 0&&x.Action)==`function`?Gr:Object)],Q.prototype,`inlineAction`,void 0),X([(0,x.property)(Q.regexProperty),Y(`design:type`,String)],Q.prototype,`regex`,void 0);var Kr=e=>{let{id:r,defaultTime:a,minTime:o,maxTime:s,placeholder:c,theme:l,onTimeChange:u}=e,[f,p]=t.useState(a),[m,h]=t.useState(a?(0,O.formatDateToTimeString)(a??new Date):``);return(0,n.jsx)(i.IdPrefixProvider,{value:r,children:(0,n.jsx)(i.FluentProvider,{theme:l,children:(0,n.jsx)(O.TimePicker,{style:{width:`100%`},expandIcon:(0,n.jsx)(d.ClockRegular,{}),id:r,freeform:!0,min:o?(0,O.formatDateToTimeString)(o):void 0,max:s?(0,O.formatDateToTimeString)(s):void 0,placeholder:c,value:f?(0,O.formatDateToTimeString)(f):m,onTimeChange:(e,t)=>{let n=t.selectedTime??void 0,r=t.selectedTimeText??``;p(n),h(r),u&&n&&u(n,r)},onInput:e=>{h(e.target.value)}})})})},qr=class e extends x.Input{static convertTimeStringToDate(e){return new Date(`1973-09-04T`+e+`:00Z`)}static valueProperty=new x.TimeProperty(x.Versions.v1_0,`value`);static placeholderProperty=new x.StringProperty(x.Versions.v1_0,`placeholder`);static minProperty=new x.TimeProperty(x.Versions.v1_0,`min`);static maxProperty=new x.TimeProperty(x.Versions.v1_0,`max`);defaultValue;min;max;placeholder;_time;element;internalRender(){let t=Er(this.hostConfig),r=this.defaultValue?e.convertTimeStringToDate(this.defaultValue):void 0,i=this.min?e.convertTimeStringToDate(this.min):void 0,a=this.max?e.convertTimeStringToDate(this.max):void 0;return this.element=zr(()=>(0,n.jsx)(Kr,{id:(0,x.generateUniqueId)(),defaultTime:r,minTime:i,maxTime:a,placeholder:this.placeholder,theme:t,onTimeChange:e=>{this._time=e,this.valueChanged()}})),this.element.style.width=`100%`,this.element}getJsonTypeName(){return`Input.Time`}focus(){}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;if(!this._time)return!1;let t=!0;if(this.min){let n=e.convertTimeStringToDate(this.min);t&&=this._time>=n}if(this.max){let n=e.convertTimeStringToDate(this.max);t&&=this._time<=n}return t}get value(){return this._time?(0,O.formatDateToTimeString)(this._time):void 0}};X([(0,x.property)(qr.valueProperty),Y(`design:type`,String)],qr.prototype,`defaultValue`,void 0),X([(0,x.property)(qr.minProperty),Y(`design:type`,String)],qr.prototype,`min`,void 0),X([(0,x.property)(qr.maxProperty),Y(`design:type`,String)],qr.prototype,`max`,void 0),X([(0,x.property)(qr.placeholderProperty),Y(`design:type`,String)],qr.prototype,`placeholder`,void 0);var Jr=class extends x.Input{static valueProperty=new x.StringProperty(x.Versions.v1_5,`value`);static titleProperty=new x.StringProperty(x.Versions.v1_5,`title`);static valueOnProperty=new x.StringProperty(x.Versions.v1_5,`valueOn`,!0,void 0,`true`,e=>`true`);static valueOffProperty=new x.StringProperty(x.Versions.v1_5,`valueOff`,!0,void 0,`false`,e=>`false`);static wrapProperty=new x.BoolProperty(x.Versions.v1_2,`wrap`,!1);defaultValue;title;valueOn=`true`;valueOff=`false`;wrap=!1;_value;refControl=null;element;internalRender(){let e=Er(this.hostConfig);return this.element=zr(()=>(0,n.jsx)(i.IdPrefixProvider,{value:(0,x.generateUniqueId)(),children:(0,n.jsx)(i.FluentProvider,{theme:e,style:{backgroundColor:`transparent`},children:(0,n.jsx)(i.Switch,{id:this.id,label:this.title,onChange:(e,t)=>{this._value=t.checked,this.valueChanged()},defaultChecked:this.defaultValue===this.valueOn,style:{marginBottom:0,marginTop:0},ref:e=>{this.refControl=e}})})})),this.element.style.width=`100%`,this.element}get isNullable(){return!1}getJsonTypeName(){return`Input.Toggle`}focus(){this.refControl?.focus()}updateInputControlAriaLabelledBy(){if(this.element){let e=this.getAllLabelIds().join(` `);e?this.element.setAttribute(`aria-labelledby`,e):this.element.removeAttribute(`aria-labelledby`)}}isSet(){return this.isRequired?this.value===this.valueOn:!!this.value}get value(){return this._value!==null&&this._value!==void 0?this._value?this.valueOn:this.valueOff:this.isRequired?void 0:this.valueOff}};X([(0,x.property)(Jr.valueProperty),Y(`design:type`,String)],Jr.prototype,`defaultValue`,void 0),X([(0,x.property)(Jr.titleProperty),Y(`design:type`,String)],Jr.prototype,`title`,void 0),X([(0,x.property)(Jr.valueOnProperty),Y(`design:type`,String)],Jr.prototype,`valueOn`,void 0),X([(0,x.property)(Jr.valueOffProperty),Y(`design:type`,String)],Jr.prototype,`valueOff`,void 0),X([(0,x.property)(Jr.wrapProperty),Y(`design:type`,Boolean)],Jr.prototype,`wrap`,void 0);function Yr(e){e.register(`Input.Text`,Q),e.register(`Input.Number`,Vr),e.register(`Input.Time`,qr),e.register(`Input.Date`,Br),e.register(`Input.Toggle`,Jr),e.register(`Input.ChoiceSet`,Z)}var Xr=e=>{switch(e){case J.SharePoint:return i.webLightTheme;case J.Teams:return i.teamsLightTheme;case J.TeamsDark:return i.teamsDarkTheme;case J.TeamsHighContrast:return i.teamsHighContrastTheme;default:return i.webLightTheme}},Zr=e=>{let r=(0,t.useRef)(null),{log:a,error:o,LogLevel:s}=z(),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useRef)(null);(0,t.useEffect)(()=>{Or((e,t)=>o(e,t))},[]),(0,t.useEffect)(()=>{c.current=null,c.current=new x.AdaptiveCard,l.current=new x.SerializationContext},[e]);let d=(0,t.useCallback)(t=>{if(e.onInvokeAction){let n={type:``,title:``},r=t.getJsonTypeName();switch(r){case x.OpenUrlAction.JsonTypeName:{let e=t;n={type:r,title:e.title,url:e.url}}break;case x.SubmitAction.JsonTypeName:{let e=t;n={type:r,title:e.title,data:e.data}}break;case x.ExecuteAction.JsonTypeName:{let e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:`Unknown Action`};break}e.onInvokeAction(n)}},[e.onInvokeAction]);return(0,t.useEffect)(()=>{let t,n=e.themeType;u.current=null,n||=J.SharePoint,t=e.theme?e.theme:Xr(n);let r=Dr(n,t),i=r.hostConfig;a(`hostconfig:`,s.Info,i),u.current=t,c.current&&(c.current.hostConfig=r.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(i.hostCapabilities)},[e]),(0,t.useEffect)(()=>{c.current&&(c.current.onExecuteAction=d)},[e,d]),(0,t.useEffect)(()=>{let t=new x.CardObjectRegistry,n=new x.CardObjectRegistry;x.GlobalRegistry.populateWithDefaultElements(t),x.GlobalRegistry.populateWithDefaultActions(n),Yr(t),Rr(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);let r=l.current;r&&r.setElementRegistry(t),r&&r.setActionRegistry(n)},[e]),(0,t.useEffect)(()=>{for(;r?.current?.firstChild;)r.current.lastChild&&r.current.removeChild(r.current.lastChild);let t=r.current;if(!t)return;let n=c.current;try{let r=new k.Template(e.card),i=kr(e.data??{$root:{}},Xr(e.themeType??J.SharePoint),e.context),a=r.expand(i);if(n&&n.parse(a,l.current??void 0),n){let e=n.render();e&&e.outerHTML!==t.innerHTML&&e.outerHTML!==t.innerHTML&&(t.innerHTML=``,t.appendChild(e))}}catch(t){e.onError&&e.onError(t)}},[e,Xr]),(0,n.jsx)(i.IdPrefixProvider,{value:`adaptiveCardHost`,children:(0,n.jsx)(i.FluentProvider,{theme:u.current?u.current:Xr(e.themeType??J.SharePoint),children:(0,n.jsx)(`div`,{ref:r,className:`${e.className?e.className:``}`,style:e.style})})})},Qr=({card:e,data:r})=>{let i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!i.current)return;i.current.innerHTML=``;let t=new k.Template(e).expand({$root:r}),n=new x.AdaptiveCard;n?.parse(t);let a=n.render();a&&i.current.appendChild(a)},[e,r]),(0,n.jsx)(`div`,{ref:i,role:`region`,"aria-label":`Adaptive Card`})},$r=g.css`
|
|
166
166
|
position: relative;
|
|
167
167
|
display: inline-block;
|
|
168
168
|
line-height: 0;
|
|
169
169
|
|
|
170
|
-
`,
|
|
170
|
+
`,ei=g.css`
|
|
171
171
|
display: block;
|
|
172
|
-
|
|
172
|
+
`,ti=g.css`
|
|
173
173
|
position: absolute;
|
|
174
174
|
top: -1px;
|
|
175
175
|
right: -6px;
|
|
@@ -193,32 +193,32 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
193
193
|
box-shadow: ${i.tokens.shadow8};
|
|
194
194
|
background: ${i.tokens.colorBrandBackgroundHover};
|
|
195
195
|
}
|
|
196
|
-
`,
|
|
197
|
-
${
|
|
196
|
+
`,ni=g.css`
|
|
197
|
+
${ti};
|
|
198
198
|
font-size: 9px;
|
|
199
199
|
padding: 2px 4px;
|
|
200
200
|
border-radius: 8px;
|
|
201
201
|
top: -2px;
|
|
202
202
|
right: -7px;
|
|
203
|
-
`,
|
|
204
|
-
${
|
|
203
|
+
`,ri=g.css`
|
|
204
|
+
${ti};
|
|
205
205
|
font-size: 6px;
|
|
206
206
|
padding: 1px 2px;
|
|
207
207
|
border-radius: 4px;
|
|
208
208
|
top: 0px;
|
|
209
209
|
right: -4px;
|
|
210
210
|
letter-spacing: 0.1px;
|
|
211
|
-
`,
|
|
212
|
-
${e>=24?
|
|
211
|
+
`,ii=({size:e=20,className:t,color:n,aiIndicatorColor:r})=>{let i=g.css`
|
|
212
|
+
${e>=24?ni:e<=16?ri:ti};
|
|
213
213
|
${r?`
|
|
214
214
|
background: ${r};
|
|
215
215
|
border-color: ${r};
|
|
216
216
|
`:``}
|
|
217
217
|
`,a=g.css`
|
|
218
|
-
${
|
|
218
|
+
${ei};
|
|
219
219
|
font-size: ${e}px;
|
|
220
220
|
${n?`color: ${n};`:`color: inherit;`}
|
|
221
|
-
`;return(0,_.jsxs)(`span`,{css:[
|
|
221
|
+
`;return(0,_.jsxs)(`span`,{css:[$r,t&&g.css`${t}`],children:[(0,_.jsx)(d.SearchRegular,{css:a}),(0,_.jsx)(`span`,{css:i,children:`AI`})]})},ai=()=>({searchBoxStyles:g.css`
|
|
222
222
|
border: 1px solid ${i.tokens.colorNeutralStroke2};
|
|
223
223
|
border-radius: 50px; /* Fully circular/pill shape */
|
|
224
224
|
background-color: ${i.tokens.colorNeutralBackground1};
|
|
@@ -282,7 +282,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=requi
|
|
|
282
282
|
align-items: center;
|
|
283
283
|
padding: 2px;
|
|
284
284
|
margin-right: 8px;
|
|
285
|
-
`}),
|
|
285
|
+
`}),oi=e=>({generateText:async(e,t)=>`Azure OpenAI not configured - please provide configuration`,isConfigured:!1}),si=e=>JSON.stringify(e),ci=({systemPromptTemplate:n,azureOpenAIConfig:r,placeholder:a,onSearchQueryGenerated:o,onSearchStart:s,onSearchError:c,disabled:l=!1,className:u,width:d})=>{let{error:f}=z(),p=e.r(),m=a||p.placeholder,{generateText:h,isConfigured:g}=oi({config:r}),[v,y]=(0,t.useState)(!1),[b,x]=(0,t.useState)(``),S=(0,t.useRef)(null),{searchBoxStyles:C,iconWrapperStyles:w}=ai(),T=(0,t.useCallback)(async e=>{if(!e.trim())return;if(!g){let t=p.notConfiguredError;c?.(t,e.trim());return}let t=e.trim();y(!0);try{s?.(t);let e=await h(n,t);o?.(e,t)}catch(e){let n=e instanceof Error?e.message:p.generationError;f(`AISearchControl - Error generating AI search query: `+si({operation:`handleAISearch`,userInput:t,errorMessage:n,isConfigured:g})),c?.(n,t)}finally{y(!1)}},[h,n,o,s,c,f,g]),E=(0,t.useCallback)((e,t)=>{x(t.value)},[]),D=(0,t.useCallback)(()=>{x(``),S.current?.blur(),o?.(``,``)},[o]),O=(0,t.useCallback)(e=>{e.key===`Enter`&&!v&&b.trim()?T(b).catch(e=>{f(`Error in handleAISearch:`,e)}):e.key===`Escape`&&(S.current?.blur(),x(``),o?.(``,``))},[T,v,b,o]);return(0,_.jsx)(i.SearchBox,{ref:S,css:C,className:u,style:{width:d},placeholder:m,value:b,onChange:E,onKeyDown:O,disabled:l||v,contentBefore:(0,_.jsx)(`span`,{css:w,children:(0,_.jsx)(ii,{size:20})}),dismiss:{onClick:D}})},li=(0,i.makeStyles)({container:{display:`flex`,flexDirection:`column`,gap:`20px`,padding:`20px`},section:{display:`flex`,flexDirection:`column`,gap:`10px`},iconRow:{display:`flex`,alignItems:`center`,gap:`15px`,padding:`10px`,border:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRadius:`8px`},label:{minWidth:`150px`,fontWeight:600},buttonExample:{display:`flex`,alignItems:`center`,gap:`8px`},codeBlock:{background:i.tokens.colorNeutralBackground2,padding:`10px`,borderRadius:`4px`,fontSize:`12px`,overflow:`auto`,border:`1px solid ${i.tokens.colorNeutralStroke2}`}}),ui=()=>{let e=li();return(0,n.jsxs)(`div`,{className:e.container,children:[(0,n.jsx)(`h2`,{children:`AI Search Icon Examples`}),(0,n.jsxs)(`div`,{className:e.section,children:[(0,n.jsx)(`h3`,{children:`Standard AI Search Icon`}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Small (16px):`}),(0,n.jsx)(ii,{size:16})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Medium (20px):`}),(0,n.jsx)(ii,{size:20})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Large (24px):`}),(0,n.jsx)(ii,{size:24})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Extra Large (32px):`}),(0,n.jsx)(ii,{size:32})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Custom Colors:`}),(0,n.jsx)(ii,{size:24,color:i.tokens.colorPaletteBlueForeground2,aiIndicatorColor:i.tokens.colorPaletteGreenForeground2})]})]}),(0,n.jsxs)(`div`,{className:e.section,children:[(0,n.jsx)(`h3`,{children:`Usage in Buttons`}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Primary Button:`}),(0,n.jsx)(i.Button,{appearance:`primary`,icon:(0,n.jsx)(ii,{size:16}),children:`AI Search`})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Secondary Button:`}),(0,n.jsx)(i.Button,{appearance:`secondary`,icon:(0,n.jsx)(ii,{size:16}),children:`Smart Search`})]}),(0,n.jsxs)(`div`,{className:e.iconRow,children:[(0,n.jsx)(`span`,{className:e.label,children:`Icon Only Button:`}),(0,n.jsx)(i.Button,{appearance:`subtle`,icon:(0,n.jsx)(ii,{size:20}),title:`AI Search`})]})]}),(0,n.jsxs)(`div`,{className:e.section,children:[(0,n.jsx)(`h3`,{children:`Usage Example Code`}),(0,n.jsx)(`pre`,{className:e.codeBlock,children:`// Basic usage
|
|
286
286
|
import { AISearchIcon } from './AISearchIcon';
|
|
287
287
|
|
|
288
288
|
// Standard icon with AI badge
|
|
@@ -301,7 +301,7 @@ import { AISearchIcon } from './AISearchIcon';
|
|
|
301
301
|
icon={<AISearchIcon size={16} />}
|
|
302
302
|
>
|
|
303
303
|
AI Search
|
|
304
|
-
</Button>`})]})]})},
|
|
304
|
+
</Button>`})]})]})},di=()=>({container:(0,l.css)({backgroundColor:i.tokens.colorNeutralBackground1,border:`1px solid `+i.tokens.colorNeutralStroke1,borderRadius:i.tokens.borderRadiusLarge,padding:`${i.tokens.spacingVerticalXS} ${i.tokens.spacingHorizontalS}`,minHeight:`40px`,":focus-within::after":{borderBottom:`2px solid ${i.tokens.colorBrandStroke1}`}}),textarea:(0,l.css)({width:`calc(100% - 5px)`,flex:1,border:`none`,outline:`none`,backgroundColor:`transparent`,fontSize:i.tokens.fontSizeBase300,color:i.tokens.colorNeutralForeground1,resize:`none`,"::placeholder":{color:i.tokens.colorNeutralForegroundDisabled},"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),iconContainer:(0,l.css)({display:`flex`,alignItems:`center`,gap:i.tokens.spacingHorizontalXS,marginLeft:i.tokens.spacingHorizontalXS}),buttonSend:(0,l.css)({width:`36px !important`,height:`36px !important`,maxWidth:`36px !important`,maxHeight:`36px !important`,minWidth:`36px !important`,minHeight:`36px !important`})}),fi=t.forwardRef(({value:r,onChange:i,onSend:a,placeholder:o,isRunning:s,onAbort:c},l)=>{let u=di(),f=e.n(),p=o||f.typeAMessage,m=t.useCallback(()=>{let e=r.trim();e.length>0&&a(e)},[r,a]),h=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),m())};return(0,n.jsxs)(H,{width:`100%`,className:u.container,children:[(0,n.jsx)(`textarea`,{ref:l,className:u.textarea,placeholder:p,"aria-label":p,value:r,onChange:e=>i(e.target.value),onKeyDown:h,rows:3}),(0,n.jsx)(H,{horizontal:!0,horizontalAlign:`end`,width:`100%`,children:s?(0,n.jsx)(kt,{icon:(0,n.jsx)(d.RecordStopRegular,{}),hoverIcon:(0,n.jsx)(d.RecordStopFilled,{}),width:32,height:32,onClick:c,ariaLabel:`Stop generating`}):(0,n.jsx)(kt,{icon:(0,n.jsx)(d.ArrowCircleUp32Regular,{}),hoverIcon:(0,n.jsx)(d.ArrowCircleUp32Filled,{}),width:32,height:32,onClick:m,enabled:r.trim().length>0,ariaLabel:`Send message`})})]})}),pi=()=>({listContainer:(0,l.css)({display:`grid`,gridTemplateColumns:`1fr`,gap:i.tokens.spacingVerticalXXS,maxHeight:`400px`,overflowY:`auto`,overflowX:`hidden`,padding:i.tokens.spacingVerticalS,minWidth:`280px`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),suggestionsHeader:(0,l.css)({color:i.tokens.colorBrandBackground,padding:i.tokens.spacingVerticalXS}),noResults:(0,l.css)({padding:i.tokens.spacingVerticalS,textAlign:`center`,color:i.tokens.colorNeutralForeground3})}),mi=({context:r,inputValue:a,parentRef:o,mentionChars:s,onUserSelect:c,theme:l,suggestionsHeader:u,maxSuggestions:d=100,userFilter:f})=>{let p=R(),m=r||p,h=m?.graphClient,g=m?.pageContext?.web?.absoluteUrl||``,_=e.p(),v=e.y(),{verbose:y,warn:b,error:x}=z(),[S,C]=(0,t.useState)(!1),[w,T]=(0,t.useState)({top:0,left:0}),[E,D]=(0,t.useState)([]),[O,k]=(0,t.useState)(``),[j,M]=(0,t.useState)(``),N=(0,t.useRef)({}),ee=pi(),P=(0,t.useCallback)(async e=>{if(!h)return b(`Graph client not available`),[];let t=`${e}_${d}`;if(N.current[t])return N.current[t];try{let n=e&&e.length>0?`startswith(displayName,'${e}') or startswith(givenName,'${e}') or startswith(surname,'${e}')`:``,r=n?`/users?$filter=${n}&$select=id,displayName,mail,userPrincipalName&$top=${d}`:`/users?$select=id,displayName,mail,userPrincipalName&$orderby=displayName&$top=${d}`;y(`[fetchUsers]: API query:`,r);let i=await h.get(r);y(`[fetchUsers]: Graph response:`,i);let a=(i.value||[]).map(e=>({id:e.id||``,displayName:e.displayName||e.userPrincipalName||v.unknownUser,mail:e.mail||e.userPrincipalName||``,avatar:g?`${g}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail||e.userPrincipalName}`:void 0})).filter(e=>e.id&&e.displayName);return y(`[fetchUsers]: Processed users:`,a),N.current[t]=a,a}catch(e){return x(`[fetchUsers]: Error fetching users from Graph:`,e instanceof Error?e:void 0),[]}},[h,g,d]),F=(0,t.useCallback)(we(async(e,t)=>{y(`[debouncedFetch]: Fetching users for query:`,e);let n=await P(e),r=f?n.filter(t=>f(t,e)):n;y(`[debouncedFetch]: Filtered users:`,r),r.sort((e,t)=>e.displayName.localeCompare(t.displayName)),D(r),k(t),M(e),C(!0),y(`[debouncedFetch]: Menu should be shown now`)},300),[m,d,f,P]),I=e=>{let t=o.current;if(!t)return{top:0,left:0};if(t.tagName===`TEXTAREA`){let n=t,r=(0,A.default)(n,e),i=n.getBoundingClientRect();return{top:i.top+r.top+22,left:i.left+r.left+16}}let n=t.getBoundingClientRect();return{top:n.bottom+5,left:n.left}};(0,t.useEffect)(()=>{if(!a){C(!1);return}y(`[Mensions]: Analyzing input:`,a);let e=!1;for(let t of s){let n=a.lastIndexOf(t);if(y(`[Mensions]: Checking mention char:`,t),n!==-1&&(n===0||a[n-1]===` `)){let r=a.slice(n+1);if(y(`[Mensions]: Search text:`,r),!r.includes(` `)){e=!0;let i=I(n);y(`[Mensions]: Menu position:`,i),T(i),F(r,t);break}}}e||(y(`[Mensions]: No mention found, hiding menu`),C(!1))},[a,s,o,F]);let L=e=>{c(e,O),C(!1),D([])},te=(0,t.useCallback)(({users:e})=>(0,n.jsxs)(`div`,{className:ee.listContainer,role:`listbox`,"aria-label":`User suggestions`,children:[e.length===0&&(0,n.jsxs)(i.Caption1,{className:ee.noResults,children:[_.noResults,` "`,j,`"`]}),e.map(e=>(0,n.jsx)(i.Card,{appearance:`subtle`,role:`option`,tabIndex:0,onMouseDown:e=>e.preventDefault(),onClick:()=>L(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),L(e))},children:(0,n.jsx)(i.Persona,{name:e.displayName||v.unknownUser,secondaryText:e.mail||e.userPrincipalName||``,avatar:{image:{src:e.avatar}}})},e.id))]}),[ee,j,L]);return(0,n.jsxs)(ht,{theme:l,anchorPoint:w,isOpen:S,onClose:()=>C(!1),excludeRefs:o?[o]:[],children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsx)(i.Body1Strong,{className:ee.suggestionsHeader,children:u})}),(0,n.jsx)(i.Divider,{}),(0,n.jsx)(te,{users:E})]})},hi=({context:e})=>{let[r,a]=(0,t.useState)(``),[o,s]=(0,t.useState)(``),c=(0,t.useRef)(null),l=(0,t.useRef)(null);return(0,n.jsxs)(H,{RowGap:20,children:[(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`h3`,{children:`Input with @ mentions`}),(0,n.jsx)(i.Input,{ref:c,value:r,onChange:(e,t)=>a(t.value),placeholder:`Type @ to mention someone...`}),(0,n.jsx)(mi,{context:e,inputValue:r,parentRef:c,mentionChars:[`@`],onUserSelect:(e,t)=>{let n=RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(\\w*)$`);a(r.replace(n,`${t}${e.displayName} `)),setTimeout(()=>{c.current?.focus()},0)},theme:i.webLightTheme,suggestionsHeader:`Mention User`,maxSuggestions:8})]}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`h3`,{children:`Textarea with @ and # mentions`}),(0,n.jsx)(i.Textarea,{ref:l,value:o,onChange:(e,t)=>s(t.value),placeholder:`Type @ to mention someone or # for tags...`,rows:4}),(0,n.jsx)(mi,{context:e,inputValue:o,parentRef:l,mentionChars:[`@`,`#`],onUserSelect:(e,t)=>{let n=RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(\\w*)$`);s(o.replace(n,`${t}${e.displayName} `)),setTimeout(()=>{l.current?.focus()},0)},theme:i.webLightTheme,suggestionsHeader:`Select User or Tag`,maxSuggestions:10,userFilter:(e,t)=>e.displayName.toLowerCase().includes(t.toLowerCase())||(e.mail?.toLowerCase().includes(t.toLowerCase())??!1)})]})]})},gi=()=>({inputContainer:(0,l.css)({marginTop:`auto`,marginLeft:`auto`,"::after":{content:`""`,position:`absolute`,bottom:0,left:0,right:0,borderBottom:`2px solid transparent`,pointerEvents:`none`,borderRadius:i.tokens.borderRadiusMedium}}),listContainer:(0,l.css)({maxHeight:`400px`,overflowY:`auto`,overflowX:`hidden`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),sugestionsHeader:(0,l.css)({color:i.tokens.colorBrandBackground})}),_i=({context:e,onChange:r,value:a,placeholder:o,onSend:s,theme:c=i.webLightTheme,isRunning:l,onAbort:u})=>{let[d,f]=(0,t.useState)(a||``),p=(0,t.useRef)(null),m=gi();return(0,t.useEffect)(()=>{p.current?.focus(),f(a||``)},[a]),(0,n.jsxs)(H,{horizontal:!0,width:`100%`,className:m.inputContainer,children:[(0,n.jsx)(fi,{ref:p,onSend:s,value:d,onChange:e=>{f(e),r&&r(e)},theme:c,placeholder:o,isRunning:l,onAbort:u}),(0,n.jsx)(mi,{context:e,inputValue:d,parentRef:p,mentionChars:[`@`],onUserSelect:(e,t)=>{let n=RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(\\w*)$`),i=d.replace(n,`${t}${e.mail} `);f(i),r&&r(i),setTimeout(()=>{p.current?.focus()},0)},theme:c,suggestionsHeader:`Suggestions`,maxSuggestions:10})]})},vi=()=>{let e=i.tokens.colorBrandBackground,t=l.keyframes`
|
|
305
305
|
0%, 80%, 100% {
|
|
306
306
|
opacity: 0;
|
|
307
307
|
transform: scale(0.8);
|
|
@@ -329,7 +329,7 @@ import { AISearchIcon } from './AISearchIcon';
|
|
|
329
329
|
animation-delay: 0.2s;
|
|
330
330
|
`,dot3:l.css`
|
|
331
331
|
animation-delay: 0.4s;
|
|
332
|
-
`}},_i=()=>{let e=gi();return(0,n.jsxs)(`div`,{className:e.root,children:[(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot1}`}),(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot2}`}),(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot3}`})]})},vi=(e,t)=>{switch(t.type){case`INIT`:return{...e,messages:[t.welcomeMessage],isLoading:!1};case`SET_INPUT`:return{...e,inputText:t.inputText};case`ADD_USER_MESSAGE`:return{...e,messages:[...e.messages,t.message]};case`ADD_ASSISTANT_MESSAGE`:return{...e,messages:[...e.messages,t.message]};case`UPDATE_LAST_ASSISTANT_MESSAGE`:{let n=[...e.messages],r=n.length-1;return r>=0&&n[r].senderName===`Assistant`&&(n[r]=t.message),{...e,messages:n}}case`SET_ERROR`:return{...e,error:t.error};case`CLEAR_INPUT`:return{...e,inputText:``};case`SET_IS_RUNNING`:return{...e,isRunning:!e.isRunning};default:return e}},yi=()=>({markdown:(0,l.css)({fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,"& p":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalM,fontWeight:i.tokens.fontWeightSemibold},"& h1":{fontSize:i.tokens.fontSizeBase500},"& h2":{fontSize:i.tokens.fontSizeBase400},"& h3":{fontSize:i.tokens.fontSizeBase300},"& ul, & ol":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM,paddingLeft:i.tokens.spacingHorizontalXXL},"& li":{marginBottom:i.tokens.spacingVerticalXS},"& code":{fontFamily:i.tokens.fontFamilyMonospace,fontSize:i.tokens.fontSizeBase200,backgroundColor:i.tokens.colorNeutralBackground3,padding:`2px 4px`,borderRadius:i.tokens.borderRadiusSmall},"& pre":{backgroundColor:i.tokens.colorNeutralBackground3,padding:i.tokens.spacingVerticalM,borderRadius:i.tokens.borderRadiusMedium,overflowX:`auto`,marginBottom:i.tokens.spacingVerticalM},"& pre code":{backgroundColor:`transparent`,padding:`0`},"& table":{borderCollapse:`collapse`,width:`100%`,marginBottom:i.tokens.spacingVerticalM,border:`1px solid ${i.tokens.colorNeutralStroke1}`},"& thead":{backgroundColor:i.tokens.colorNeutralBackground3},"& th":{padding:i.tokens.spacingVerticalS+` `+i.tokens.spacingHorizontalM,textAlign:`left`,fontWeight:i.tokens.fontWeightSemibold,borderBottom:`2px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke2}`},"& td":{padding:i.tokens.spacingVerticalS+` `+i.tokens.spacingHorizontalM,borderBottom:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke2}`},"& tr:last-child td":{borderBottom:`none`},"& th:last-child, & td:last-child":{borderRight:`none`},"& blockquote":{borderLeft:`4px solid ${i.tokens.colorBrandStroke1}`,paddingLeft:i.tokens.spacingHorizontalM,marginLeft:`0`,marginBottom:i.tokens.spacingVerticalM,color:i.tokens.colorNeutralForeground2},"& a":{color:i.tokens.colorBrandForeground1,textDecoration:`none`,":hover":{textDecoration:`underline`}},"& hr":{border:`none`,borderTop:`1px solid ${i.tokens.colorNeutralStroke2}`,marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalL}})}),bi=({content:e,className:r})=>{let i=yi(),[a,o]=t.useState(``);return t.useEffect(()=>{o(new w.default({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e))},[e]),(0,n.jsx)(`div`,{className:`${i.markdown} ${r||``}`,dangerouslySetInnerHTML:{__html:a}})},xi=(0,i.makeStyles)({plainText:{fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,whiteSpace:`pre-wrap`,wordBreak:`break-word`},htmlContent:{fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,"& p":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalM,fontWeight:i.tokens.fontWeightSemibold},"& table":{borderCollapse:`collapse`,width:`100%`,marginBottom:i.tokens.spacingVerticalM},"& th, & td":{border:`1px solid ${i.tokens.colorNeutralStroke1}`,padding:i.tokens.spacingHorizontalS,textAlign:`left`},"& th":{backgroundColor:i.tokens.colorNeutralBackground3,fontWeight:i.tokens.fontWeightSemibold}},debugBadge:{display:`inline-block`,padding:`${i.tokens.spacingVerticalXS} ${i.tokens.spacingHorizontalS}`,marginBottom:i.tokens.spacingVerticalS,backgroundColor:i.tokens.colorNeutralBackground3,borderRadius:i.tokens.borderRadiusSmall,fontSize:i.tokens.fontSizeBase200,fontFamily:i.tokens.fontFamilyMonospace,color:i.tokens.colorNeutralForeground2},adaptiveCardWrapper:{width:`100%`}}),Si=({content:e,forceType:r,onTypeDetected:i,context:a,theme:o=Y.SharePoint,fluentTheme:s,onAdaptiveCardAction:c,className:l,debug:u=!1})=>{let d=xi(),{error:f}=z(),[p,m]=t.useState(null);if(t.useEffect(()=>{if(t.isValidElement(e)||typeof e!=`string`&&typeof e!=`object`)return;let n=Be(e);m(n),i&&i(n)},[e,i]),t.isValidElement(e))return(0,n.jsx)(n.Fragment,{children:e});let h=r||p?.type,g=p?.content||e;return(0,n.jsxs)(n.Fragment,{children:[!u||!p?null:(0,n.jsxs)(`div`,{className:d.debugBadge,children:[`Type: `,p.type,` | Confidence: `,(p.confidence*100).toFixed(0),`%`]}),(()=>{switch(h){case H.MARKDOWN:return(0,n.jsx)(bi,{content:g,className:l});case H.HTML:return(0,n.jsx)(`div`,{className:` ${l||``}`,dangerouslySetInnerHTML:{__html:g}});case H.ADAPTIVE_CARD:return(0,n.jsx)(`div`,{className:`${d.adaptiveCardWrapper} ${l||``}`,children:(0,n.jsx)(Yr,{card:typeof g==`string`?JSON.parse(g):g,context:a,theme:s,themeType:o,onInvokeAction:c||(()=>{}),onError:e=>f(`Adaptive Card Error:`,e instanceof Error?e:void 0)})});case H.PLAIN_TEXT:default:return(0,n.jsx)(`div`,{className:`${d.plainText} ${l||``}`,children:g})}})()]})},Ci=t.forwardRef((e,r)=>{let{messages:a,context:o}=e,s=e=>t.isValidElement(e)?e:typeof e==`string`?e.replace(/\{"status"\s*:\s*"executing"\}/gi,``).replace(/\{'status'\s*:\s*'executing'\}/gi,``).trim():e;return(0,n.jsx)(`div`,{ref:r,className:(0,l.css)({flex:`1 1 0`,overflowY:`auto`,overflowX:`hidden`,padding:`16px`,paddingRight:`25px`,"::-webkit-scrollbar":{width:`6px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),children:(0,n.jsx)(j.Chat,{className:(0,l.css)({display:`flex`,flexDirection:`column`,gap:`10px`,paddingRight:`30px`}),children:a.map((e,t)=>e.senderName===`User`?(0,n.jsx)(j.ChatMyMessage,{status:e.status,author:e.senderName,children:s(e.message)},t):(0,n.jsx)(j.ChatMessage,{decoration:e.status===`failed`?`important`:void 0,avatar:(0,n.jsx)(p.Icon,{icon:`carbon:ibm-consulting-advantage-assistant`,width:`32`,height:`32`,style:{color:i.tokens.colorBrandBackground}}),author:e.senderName,children:(0,n.jsx)(Si,{content:s(e.message),context:o})},t))})})});Ci.displayName=`ChatList`;var wi=()=>({container:(0,l.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:(0,l.css)({display:`flex`,flexDirection:`column`,gap:`10px`,paddingRight:`30px`,width:`100%`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),chatAIAssistantRoot:(0,l.css)({padding:`10px`,display:`flex`,flexDirection:`column`,position:`relative`,height:`calc(100% - 20px)`}),inputContainer:(0,l.css)({display:`flex`,flexDirection:`row`,flex:1,marginTop:`10px`,gap:`10px`,alignItems:`center`}),input:(0,l.css)({width:`100%`,fontSize:`14px`}),aiAssistantContainer:(0,l.css)({display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,boxSizing:`border-box`}),aiAssistantInputContainer:(0,l.css)({flex:`0 0 auto`,padding:`16px`,paddingBottom:`20px`,borderTop:`1px solid ${i.tokens.colorNeutralStroke2}`,backgroundColor:i.tokens.colorNeutralBackground1,boxSizing:`border-box`})}),Ti=(e,t)=>{let{getFormatRelative:n}=_e(e,t);return n(new Date)},Ei=r=>{let{instrutions:a,timezone:o,locale:s,onResponse:c,openAIConfig:l,theme:u,placeholder:d,context:f}=r,[p,m]=t.useReducer(vi,{messages:[],inputText:``,isLoading:!0,error:void 0,isRunning:!1}),{messages:h,inputText:g,isLoading:_,error:v,isRunning:y}=p,b=t.useRef([]),x=t.useRef(null),S=wi(),C=e.n(),{error:w}=z(),{sendMessage:T,cancelRequest:E}=ie({endpoint:l?.endpoint,mcpServers:l?.mcpServers,requestHeaders:l?.requestHeaders}),D=t.useCallback(()=>{x.current&&(x.current.scrollTop=x.current.scrollHeight-x.current.clientHeight)},[]);t.useEffect(()=>{let e=setTimeout(()=>{D()},100);return()=>clearTimeout(e)},[h,D]),t.useEffect(()=>{m({type:`INIT`,welcomeMessage:{message:`Welcome to AI Assistant! How can I help you today?`,senderName:`Assistant`,timeStamp:Ti(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`received`}})},[]);let O=t.useCallback(async()=>{if(!g.trim())return;let e={message:g,senderName:`User`,timeStamp:Ti(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`received`},t=g;m({type:`ADD_USER_MESSAGE`,message:e}),m({type:`CLEAR_INPUT`}),m({type:`SET_IS_RUNNING`});let r={message:(0,n.jsx)(_i,{}),senderName:`Assistant`,timeStamp:Ti(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`sending`};m({type:`ADD_ASSISTANT_MESSAGE`,message:r});try{let e=await T({instructions:a,input:t,timezone:o,locale:s,history:b.current,mcpServers:l?.mcpServers});if(c){let{message:t,status:n}=await c(e);m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:t||e,status:n||`received`}})}else m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:e,status:`received`}});m({type:`SET_IS_RUNNING`}),b.current.push(t),b.current.push(e)}catch(e){w(`Error during streaming:`,e instanceof Error?e:void 0);let t=`Error occurred while processing your request.`;e instanceof Error&&(t=e.message.includes(`Rate limit`)||e.message.includes(`429`)?`Rate limit exceeded. Please wait a moment before sending another message.`:e.message.includes(`quota`)?`API quota exceeded. Please try again later.`:e.message.includes(`abort`)?`Request was cancelled.`:e.message),m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:t,status:`failed`}}),m({type:`SET_IS_RUNNING`})}},[g,a,s,c,l,o,T,D,f]),k=t.useCallback(e=>{m({type:`SET_INPUT`,inputText:e})},[]);return _?(0,n.jsx)(i.Spinner,{size:`medium`}):v?(0,n.jsx)(Jn,{message:C.processingError,messageType:F.INFO}):(0,n.jsxs)(`div`,{className:S.aiAssistantContainer,children:[(0,n.jsx)(Ci,{ref:x,messages:h,context:f}),(0,n.jsx)(`div`,{className:S.aiAssistantInputContainer,children:(0,n.jsx)(hi,{context:f,value:g,onChange:k,placeholder:d,onSend:O,onAbort:E,theme:u,isRunning:y})})]})},Di=({context:r,onChange:a,value:o,placeholder:s,onSend:c,theme:l,isRunning:u,onAbort:d})=>{let[f,p]=(0,t.useState)(o||``),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(null),_=e.n(),[v,y]=(0,t.useState)({top:0,left:0}),[b,x]=(0,t.useState)([]),S=(0,t.useRef)({}),C=mi(),{warn:w,error:T}=z();t.default.useEffect(()=>{g.current?.focus(),p(o||``)},[o]);let E=async e=>{if(S.current[e])return S.current[e];if(!r?.graphClient)return w(`Graph client not available`),[];try{let t=e&&e.length>0?`/users?$filter=startswith(displayName,'${e}')`:`/users?$orderby=displayName&$top=10`,n=(await r.graphClient.get(t))?.value||[],i=r.pageContext?.web?.absoluteUrl||``;return n.forEach(e=>{i?e.avatar=`${i}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:e.avatar=`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),S.current[e]=n,n}catch(e){return T(`Error fetching users from Graph:`,e instanceof Error?e:void 0),[]}},D=(0,t.useCallback)(Se(async e=>{let t=await E(e);t.sort((e,t)=>e.displayName.localeCompare(t.displayName)),x(t),h(!0),setTimeout(()=>{g.current?.focus()},0)},300),[r]),O=async e=>{p(e),a&&a(e),g.current?.focus();let t=e.lastIndexOf(`@`);if(t!==-1&&(t===0||e[t-1]===` `)){await D(e.slice(t+1));let n=g.current;if(n){let e=(0,A.default)(n,t),r=n.getBoundingClientRect();y({top:r.top+e.top+22,left:r.left+e.left+16})}}else h(!1)},k=e=>{let t=f.replace(/@(\w*)$/,`@${e} `);p(t),a&&a(t),h(!1),x([]),g.current?.focus()},j=(0,t.useCallback)(({users:e})=>(0,n.jsxs)(`div`,{className:C.listContainer,children:[e.length===0&&(0,n.jsx)(i.Caption1,{children:_.noUsersFound}),e.map(e=>(0,n.jsx)(i.Card,{size:`small`,appearance:`subtle`,onMouseDown:e=>e.preventDefault(),onClick:()=>k(e.mail),children:(0,n.jsx)(i.Persona,{name:e.displayName,role:`gridcell`,secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,k]);return(0,n.jsxs)(U,{horizontal:!0,width:`100%`,className:C.inputContainer,children:[(0,n.jsx)(ui,{ref:g,onSend:c,value:f,onChange:O,theme:l,placeholder:s,isRunning:u,onAbort:d}),(0,n.jsxs)(pt,{theme:l,anchorPoint:v,isOpen:m,onClose:()=>h(!1),excludeRefs:[g],children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsx)(i.Body1Strong,{className:C.sugestionsHeader,children:`Sugestions`})}),(0,n.jsx)(i.Divider,{}),(0,n.jsx)(j,{users:b})]})]})},Oi=()=>({inputContainer:(0,l.css)({marginTop:`auto`,marginLeft:`auto`,"::after":{content:`""`,position:`absolute`,bottom:0,left:0,right:0,borderBottom:`2px solid transparent`,pointerEvents:`none`,borderRadius:i.tokens.borderRadiusMedium}}),listContainer:(0,l.css)({maxHeight:`400px`,overflowY:`auto`,overflowX:`hidden`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),sugestionsHeader:(0,l.css)({color:i.tokens.colorBrandBackground})}),ki=e=>{let{width:t,height:n,zoomable:r=!1}=e;return{root:(0,l.css)({position:`relative`,borderRadius:i.tokens.borderRadiusMedium,border:`1px solid ${i.tokens.colorNeutralStroke2}`,width:t??`100%`,height:n??`auto`,...r?{cursor:`grab`}:{}}),svgContainer:(0,l.css)({width:`100%`}),loading:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300})}},Ai=0,ji=e=>{let[n,r]=t.useState(!1);return t.useEffect(()=>{let t=e.current;if(!t)return;let n=getComputedStyle(t).getPropertyValue(`--colorNeutralBackground1`).trim();if(n&&n.startsWith(`#`)&&n.length>=7){let e=parseInt(n.substring(1,3),16),t=parseInt(n.substring(3,5),16),i=parseInt(n.substring(5,7),16);r(.299*e+.587*t+.114*i<128)}}),n},Mi=r=>{let{source:a,url:o,theme:s,backgroundColor:c,className:l,styles:u,zoomable:d=!1,onRendered:f,onError:p,loadingContent:m,errorContent:h}=r,g=ki(r),_=t.useRef(null),v=t.useRef(null),y=ji(_),b=s??(y?`dark`:`default`),[x,S]=t.useState(null),[C,w]=t.useState(null),[T,E]=t.useState(!1),[D,O]=t.useState(null),{loading:k,errorMessage:A,noSource:j}=e.m();t.useEffect(()=>{if(a){O(a),w(null);return}if(o){let e=!1;return E(!0),w(null),fetch(o).then(e=>{if(!e.ok)throw Error(`Failed to fetch ${o}: ${e.status} ${e.statusText}`);return e.text()}).then(t=>{e||(O(t),E(!1))}).catch(t=>{if(!e){let e=t instanceof Error?t:Error(String(t));w(e),E(!1),p?.(e)}}),()=>{e=!0}}O(null)},[a,o,p]),t.useEffect(()=>{if(!D){S(null);return}let e=!1,t=`mermaid-diagram-${++Ai}`;return M.default.initialize({startOnLoad:!1,theme:b,securityLevel:`loose`,fontFamily:i.tokens.fontFamilyBase,suppressErrorRendering:!0}),M.default.render(t,D).then(({svg:t})=>{e||(S(t),w(null),f?.(t))}).catch(n=>{if(!e){let e=n instanceof Error?n:Error(String(n));w(e),S(null),p?.(e)}document.getElementById(t)?.remove()}),()=>{e=!0,document.getElementById(t)?.remove()}},[D,b,f,p]);let[N,P]=t.useState(1),[I,L]=t.useState({x:0,y:0}),R=t.useRef(!1),z=t.useRef({x:0,y:0});t.useEffect(()=>{let e=_.current;if(!e||!d)return;let t=e=>{e.preventDefault();let t=e.deltaY>0?-.1:.1;P(e=>Math.min(Math.max(e+t,.25),4))},n=e=>{R.current=!0,z.current={x:e.clientX,y:e.clientY}},r=e=>{if(!R.current)return;let t=e.clientX-z.current.x,n=e.clientY-z.current.y;z.current={x:e.clientX,y:e.clientY},L(e=>({x:e.x+t,y:e.y+n}))},i=()=>{R.current=!1};return e.addEventListener(`wheel`,t,{passive:!1}),e.addEventListener(`mousedown`,n),e.addEventListener(`mousemove`,r),e.addEventListener(`mouseup`,i),e.addEventListener(`mouseleave`,i),()=>{e.removeEventListener(`wheel`,t),e.removeEventListener(`mousedown`,n),e.removeEventListener(`mousemove`,r),e.removeEventListener(`mouseup`,i),e.removeEventListener(`mouseleave`,i)}},[d]),t.useEffect(()=>{P(1),L({x:0,y:0})},[D]),t.useEffect(()=>{let e=v.current;e&&(e.innerHTML=x??``)},[x]);let ee=[g.root,l].filter(Boolean).join(` `);if(T)return(0,n.jsx)(G,{className:ee,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:(0,n.jsx)(G,{className:g.loading,alignItems:`center`,justifyContent:`center`,padding:`xxl`,children:m??(0,n.jsx)(_t,{size:`small`,label:k})})});if(C)return(0,n.jsx)(G,{className:ee,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:h?h(C):(0,n.jsx)(Jn,{message:A,messageType:F.ERROR})});if(!x)return(0,n.jsx)(G,{className:ee,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:(0,n.jsx)(G,{className:g.loading,alignItems:`center`,justifyContent:`center`,padding:`xxl`,children:(0,n.jsx)(i.Text,{children:j})})});let te=d?{transform:`translate(${I.x}px, ${I.y}px) scale(${N})`,transformOrigin:`center center`}:void 0;return(0,n.jsx)(G,{ref:_,className:ee,style:u,alignItems:`center`,justifyContent:`center`,overflow:d?`auto`:`hidden`,background:c,children:(0,n.jsx)(G,{ref:v,className:g.svgContainer,alignItems:`center`,justifyContent:`center`,style:te,children:(0,n.jsx)(n.Fragment,{})})})},Ni=e=>{let{template:t}=e;return(0,n.jsx)(n.Fragment,{children:t})},Pi=()=>({toolbar:l.css`
|
|
332
|
+
`}},yi=()=>{let e=vi();return(0,n.jsxs)(`div`,{className:e.root,role:`status`,"aria-label":`Loading response`,children:[(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot1}`}),(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot2}`}),(0,n.jsx)(`div`,{className:`${e.dot} ${e.dot3}`})]})},bi=(e,t)=>{switch(t.type){case`INIT`:return{...e,messages:[t.welcomeMessage],isLoading:!1};case`SET_INPUT`:return{...e,inputText:t.inputText};case`ADD_USER_MESSAGE`:return{...e,messages:[...e.messages,t.message]};case`ADD_ASSISTANT_MESSAGE`:return{...e,messages:[...e.messages,t.message]};case`UPDATE_LAST_ASSISTANT_MESSAGE`:{let n=[...e.messages],r=n.length-1;return r>=0&&n[r].senderName===`Assistant`&&(n[r]=t.message),{...e,messages:n}}case`SET_ERROR`:return{...e,error:t.error};case`CLEAR_INPUT`:return{...e,inputText:``};case`SET_IS_RUNNING`:return{...e,isRunning:!e.isRunning};default:return e}},xi=()=>({markdown:(0,l.css)({fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,"& p":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalM,fontWeight:i.tokens.fontWeightSemibold},"& h1":{fontSize:i.tokens.fontSizeBase500},"& h2":{fontSize:i.tokens.fontSizeBase400},"& h3":{fontSize:i.tokens.fontSizeBase300},"& ul, & ol":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM,paddingLeft:i.tokens.spacingHorizontalXXL},"& li":{marginBottom:i.tokens.spacingVerticalXS},"& code":{fontFamily:i.tokens.fontFamilyMonospace,fontSize:i.tokens.fontSizeBase200,backgroundColor:i.tokens.colorNeutralBackground3,padding:`2px 4px`,borderRadius:i.tokens.borderRadiusSmall},"& pre":{backgroundColor:i.tokens.colorNeutralBackground3,padding:i.tokens.spacingVerticalM,borderRadius:i.tokens.borderRadiusMedium,overflowX:`auto`,marginBottom:i.tokens.spacingVerticalM},"& pre code":{backgroundColor:`transparent`,padding:`0`},"& table":{borderCollapse:`collapse`,width:`100%`,marginBottom:i.tokens.spacingVerticalM,border:`1px solid ${i.tokens.colorNeutralStroke1}`},"& thead":{backgroundColor:i.tokens.colorNeutralBackground3},"& th":{padding:i.tokens.spacingVerticalS+` `+i.tokens.spacingHorizontalM,textAlign:`left`,fontWeight:i.tokens.fontWeightSemibold,borderBottom:`2px solid ${i.tokens.colorNeutralStroke1}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke2}`},"& td":{padding:i.tokens.spacingVerticalS+` `+i.tokens.spacingHorizontalM,borderBottom:`1px solid ${i.tokens.colorNeutralStroke2}`,borderRight:`1px solid ${i.tokens.colorNeutralStroke2}`},"& tr:last-child td":{borderBottom:`none`},"& th:last-child, & td:last-child":{borderRight:`none`},"& blockquote":{borderLeft:`4px solid ${i.tokens.colorBrandStroke1}`,paddingLeft:i.tokens.spacingHorizontalM,marginLeft:`0`,marginBottom:i.tokens.spacingVerticalM,color:i.tokens.colorNeutralForeground2},"& a":{color:i.tokens.colorBrandForeground1,textDecoration:`none`,":hover":{textDecoration:`underline`}},"& hr":{border:`none`,borderTop:`1px solid ${i.tokens.colorNeutralStroke2}`,marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalL}})}),Si=({content:e,className:r})=>{let i=xi(),[a,o]=t.useState(``);return t.useEffect(()=>{o(new C.default({html:!1,linkify:!0,typographer:!0,breaks:!0}).render(e))},[e]),(0,n.jsx)(`div`,{className:`${i.markdown} ${r||``}`,dangerouslySetInnerHTML:{__html:M.default.sanitize(a)}})},Ci=(0,i.makeStyles)({plainText:{fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,whiteSpace:`pre-wrap`,wordBreak:`break-word`},htmlContent:{fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300,lineHeight:i.tokens.lineHeightBase300,color:i.tokens.colorNeutralForeground1,"& p":{marginTop:`0`,marginBottom:i.tokens.spacingVerticalM},"& h1, & h2, & h3, & h4, & h5, & h6":{marginTop:i.tokens.spacingVerticalL,marginBottom:i.tokens.spacingVerticalM,fontWeight:i.tokens.fontWeightSemibold},"& table":{borderCollapse:`collapse`,width:`100%`,marginBottom:i.tokens.spacingVerticalM},"& th, & td":{border:`1px solid ${i.tokens.colorNeutralStroke1}`,padding:i.tokens.spacingHorizontalS,textAlign:`left`},"& th":{backgroundColor:i.tokens.colorNeutralBackground3,fontWeight:i.tokens.fontWeightSemibold}},debugBadge:{display:`inline-block`,padding:`${i.tokens.spacingVerticalXS} ${i.tokens.spacingHorizontalS}`,marginBottom:i.tokens.spacingVerticalS,backgroundColor:i.tokens.colorNeutralBackground3,borderRadius:i.tokens.borderRadiusSmall,fontSize:i.tokens.fontSizeBase200,fontFamily:i.tokens.fontFamilyMonospace,color:i.tokens.colorNeutralForeground2},adaptiveCardWrapper:{width:`100%`}}),wi=({content:e,forceType:r,onTypeDetected:i,context:a,theme:o=J.SharePoint,fluentTheme:s,onAdaptiveCardAction:c,className:l,debug:u=!1})=>{let d=Ci(),{error:f}=z(),[p,m]=t.useState(null);if(t.useEffect(()=>{if(t.isValidElement(e)||typeof e!=`string`&&typeof e!=`object`)return;let n=He(e);m(n),i&&i(n)},[e,i]),t.isValidElement(e))return(0,n.jsx)(n.Fragment,{children:e});let h=r||p?.type,g=p?.content||e;return(0,n.jsxs)(n.Fragment,{children:[!u||!p?null:(0,n.jsxs)(`div`,{className:d.debugBadge,children:[`Type: `,p.type,` | Confidence: `,(p.confidence*100).toFixed(0),`%`]}),(()=>{switch(h){case V.MARKDOWN:return(0,n.jsx)(Si,{content:g,className:l});case V.HTML:return(0,n.jsx)(`div`,{className:` ${l||``}`,dangerouslySetInnerHTML:{__html:M.default.sanitize(g)}});case V.ADAPTIVE_CARD:return(0,n.jsx)(`div`,{className:`${d.adaptiveCardWrapper} ${l||``}`,children:(0,n.jsx)(Zr,{card:typeof g==`string`?JSON.parse(g):g,context:a,theme:s,themeType:o,onInvokeAction:c||(()=>{}),onError:e=>f(`Adaptive Card Error:`,e instanceof Error?e:void 0)})});case V.PLAIN_TEXT:default:return(0,n.jsx)(`div`,{className:`${d.plainText} ${l||``}`,children:g})}})()]})},Ti=t.forwardRef((e,r)=>{let{messages:a,context:o}=e,s=e=>t.isValidElement(e)?e:typeof e==`string`?e.replace(/\{"status"\s*:\s*"executing"\}/gi,``).replace(/\{'status'\s*:\s*'executing'\}/gi,``).trim():e,c=(0,l.css)({flex:`1 1 0`,overflowY:`auto`,overflowX:`hidden`,padding:`16px`,paddingRight:`25px`,"::-webkit-scrollbar":{width:`6px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),u=(0,l.css)({display:`flex`,flexDirection:`column`,gap:`10px`,paddingRight:`30px`});return(0,n.jsx)(`div`,{ref:r,className:c,role:`log`,"aria-live":`polite`,"aria-label":`Chat history`,children:(0,n.jsx)(j.Chat,{className:u,children:a.map((e,t)=>e.senderName===`User`?(0,n.jsx)(j.ChatMyMessage,{status:e.status,author:e.senderName,children:s(e.message)},t):(0,n.jsx)(j.ChatMessage,{decoration:e.status===`failed`?`important`:void 0,avatar:(0,n.jsx)(p.Icon,{icon:`carbon:ibm-consulting-advantage-assistant`,width:`32`,height:`32`,"aria-hidden":`true`,style:{color:i.tokens.colorBrandBackground}}),author:e.senderName,children:(0,n.jsx)(wi,{content:s(e.message),context:o})},t))})})});Ti.displayName=`ChatList`;var Ei=()=>({container:(0,l.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:(0,l.css)({display:`flex`,flexDirection:`column`,gap:`10px`,paddingRight:`30px`,width:`100%`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),chatAIAssistantRoot:(0,l.css)({padding:`10px`,display:`flex`,flexDirection:`column`,position:`relative`,height:`calc(100% - 20px)`}),inputContainer:(0,l.css)({display:`flex`,flexDirection:`row`,flex:1,marginTop:`10px`,gap:`10px`,alignItems:`center`}),input:(0,l.css)({width:`100%`,fontSize:`14px`}),aiAssistantContainer:(0,l.css)({display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,boxSizing:`border-box`}),aiAssistantInputContainer:(0,l.css)({flex:`0 0 auto`,padding:`16px`,paddingBottom:`20px`,borderTop:`1px solid ${i.tokens.colorNeutralStroke2}`,backgroundColor:i.tokens.colorNeutralBackground1,boxSizing:`border-box`})}),Di=(e,t)=>{let{getFormatRelative:n}=ye(e,t);return n(new Date)},Oi=r=>{let{instrutions:a,timezone:o,locale:s,onResponse:c,openAIConfig:l,theme:u,placeholder:d,context:f}=r,[p,m]=t.useReducer(bi,{messages:[],inputText:``,isLoading:!0,error:void 0,isRunning:!1}),{messages:h,inputText:g,isLoading:_,error:v,isRunning:y}=p,b=t.useRef([]),x=t.useRef(null),S=Ei(),C=e.n(),{error:w}=z(),{sendMessage:T,cancelRequest:E}=oe({endpoint:l?.endpoint,mcpServers:l?.mcpServers,requestHeaders:l?.requestHeaders}),D=t.useCallback(()=>{x.current&&(x.current.scrollTop=x.current.scrollHeight-x.current.clientHeight)},[]);t.useEffect(()=>{let e=setTimeout(()=>{D()},100);return()=>clearTimeout(e)},[h,D]),t.useEffect(()=>{m({type:`INIT`,welcomeMessage:{message:`Welcome to AI Assistant! How can I help you today?`,senderName:`Assistant`,timeStamp:Di(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`received`}})},[]);let O=t.useCallback(async()=>{if(!g.trim())return;let e={message:g,senderName:`User`,timeStamp:Di(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`received`},t=g;m({type:`ADD_USER_MESSAGE`,message:e}),m({type:`CLEAR_INPUT`}),m({type:`SET_IS_RUNNING`});let r={message:(0,n.jsx)(yi,{}),senderName:`Assistant`,timeStamp:Di(o,f?.pageContext?.cultureInfo?.currentUICultureName||`en-US`),status:`sending`};m({type:`ADD_ASSISTANT_MESSAGE`,message:r});try{let e=await T({instructions:a,input:t,timezone:o,locale:s,history:b.current,mcpServers:l?.mcpServers});if(c){let{message:t,status:n}=await c(e);m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:t||e,status:n||`received`}})}else m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:e,status:`received`}});m({type:`SET_IS_RUNNING`}),b.current.push(t),b.current.push(e)}catch(e){w(`Error during streaming:`,e instanceof Error?e:void 0);let t=`Error occurred while processing your request.`;e instanceof Error&&(t=e.message.includes(`Rate limit`)||e.message.includes(`429`)?`Rate limit exceeded. Please wait a moment before sending another message.`:e.message.includes(`quota`)?`API quota exceeded. Please try again later.`:e.message.includes(`abort`)?`Request was cancelled.`:e.message),m({type:`UPDATE_LAST_ASSISTANT_MESSAGE`,message:{...r,message:t,status:`failed`}}),m({type:`SET_IS_RUNNING`})}},[g,a,s,c,l,o,T,D,f]),k=t.useCallback(e=>{m({type:`SET_INPUT`,inputText:e})},[]);return _?(0,n.jsx)(i.Spinner,{size:`medium`}):v?(0,n.jsx)(Xn,{message:C.processingError,messageType:F.INFO}):(0,n.jsxs)(`div`,{className:S.aiAssistantContainer,children:[(0,n.jsx)(Ti,{ref:x,messages:h,context:f}),(0,n.jsx)(`div`,{className:S.aiAssistantInputContainer,children:(0,n.jsx)(_i,{context:f,value:g,onChange:k,placeholder:d,onSend:O,onAbort:E,theme:u,isRunning:y})})]})},ki=({context:r,onChange:a,value:o,placeholder:s,onSend:c,theme:l,isRunning:u,onAbort:d})=>{let[f,p]=(0,t.useState)(o||``),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(null),_=e.n(),[v,y]=(0,t.useState)({top:0,left:0}),[b,x]=(0,t.useState)([]),S=(0,t.useRef)({}),C=gi(),{warn:w,error:T}=z();t.default.useEffect(()=>{g.current?.focus(),p(o||``)},[o]);let E=async e=>{if(S.current[e])return S.current[e];if(!r?.graphClient)return w(`Graph client not available`),[];try{let t=e&&e.length>0?`/users?$filter=startswith(displayName,'${e}')`:`/users?$orderby=displayName&$top=10`,n=(await r.graphClient.get(t))?.value||[],i=r.pageContext?.web?.absoluteUrl||``;return n.forEach(e=>{i?e.avatar=`${i}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:e.avatar=`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),S.current[e]=n,n}catch(e){return T(`Error fetching users from Graph:`,e instanceof Error?e:void 0),[]}},D=(0,t.useCallback)(we(async e=>{let t=await E(e);t.sort((e,t)=>e.displayName.localeCompare(t.displayName)),x(t),h(!0),setTimeout(()=>{g.current?.focus()},0)},300),[r]),O=async e=>{p(e),a&&a(e),g.current?.focus();let t=e.lastIndexOf(`@`);if(t!==-1&&(t===0||e[t-1]===` `)){await D(e.slice(t+1));let n=g.current;if(n){let e=(0,A.default)(n,t),r=n.getBoundingClientRect();y({top:r.top+e.top+22,left:r.left+e.left+16})}}else h(!1)},k=e=>{let t=f.replace(/@(\w*)$/,`@${e} `);p(t),a&&a(t),h(!1),x([]),g.current?.focus()},j=(0,t.useCallback)(({users:e})=>(0,n.jsxs)(`div`,{className:C.listContainer,children:[e.length===0&&(0,n.jsx)(i.Caption1,{children:_.noUsersFound}),e.map(e=>(0,n.jsx)(i.Card,{size:`small`,appearance:`subtle`,onMouseDown:e=>e.preventDefault(),onClick:()=>k(e.mail),children:(0,n.jsx)(i.Persona,{name:e.displayName,role:`gridcell`,secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,k]);return(0,n.jsxs)(H,{horizontal:!0,width:`100%`,className:C.inputContainer,children:[(0,n.jsx)(fi,{ref:g,onSend:c,value:f,onChange:O,theme:l,placeholder:s,isRunning:u,onAbort:d}),(0,n.jsxs)(ht,{theme:l,anchorPoint:v,isOpen:m,onClose:()=>h(!1),excludeRefs:[g],children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsx)(i.Body1Strong,{className:C.sugestionsHeader,children:`Sugestions`})}),(0,n.jsx)(i.Divider,{}),(0,n.jsx)(j,{users:b})]})]})},Ai=()=>({inputContainer:(0,l.css)({marginTop:`auto`,marginLeft:`auto`,"::after":{content:`""`,position:`absolute`,bottom:0,left:0,right:0,borderBottom:`2px solid transparent`,pointerEvents:`none`,borderRadius:i.tokens.borderRadiusMedium}}),listContainer:(0,l.css)({maxHeight:`400px`,overflowY:`auto`,overflowX:`hidden`,"::-webkit-scrollbar":{width:`5px`,height:`5px`},"::-webkit-scrollbar-track":{background:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2}}),sugestionsHeader:(0,l.css)({color:i.tokens.colorBrandBackground})}),ji=e=>{let{width:t,height:n,zoomable:r=!1}=e;return{root:(0,l.css)({position:`relative`,borderRadius:i.tokens.borderRadiusMedium,border:`1px solid ${i.tokens.colorNeutralStroke2}`,width:t??`100%`,height:n??`auto`,...r?{cursor:`grab`}:{}}),svgContainer:(0,l.css)({width:`100%`}),loading:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontFamily:i.tokens.fontFamilyBase,fontSize:i.tokens.fontSizeBase300})}},Mi=0,Ni=e=>{let[n,r]=t.useState(!1);return t.useEffect(()=>{let t=e.current;if(!t)return;let n=getComputedStyle(t).getPropertyValue(`--colorNeutralBackground1`).trim();if(n&&n.startsWith(`#`)&&n.length>=7){let e=parseInt(n.substring(1,3),16),t=parseInt(n.substring(3,5),16),i=parseInt(n.substring(5,7),16);r(.299*e+.587*t+.114*i<128)}}),n},Pi=r=>{let{source:a,url:o,theme:s,backgroundColor:c,className:l,styles:u,zoomable:d=!1,onRendered:f,onError:p,loadingContent:m,errorContent:h}=r,g=ji(r),_=t.useRef(null),v=t.useRef(null),y=Ni(_),b=s??(y?`dark`:`default`),[x,S]=t.useState(null),[C,w]=t.useState(null),[T,E]=t.useState(!1),[D,O]=t.useState(null),{loading:k,errorMessage:A,noSource:j}=e.m();t.useEffect(()=>{if(a){O(a),w(null);return}if(o){let e=!1;return E(!0),w(null),fetch(o).then(e=>{if(!e.ok)throw Error(`Failed to fetch ${o}: ${e.status} ${e.statusText}`);return e.text()}).then(t=>{e||(O(t),E(!1))}).catch(t=>{if(!e){let e=t instanceof Error?t:Error(String(t));w(e),E(!1),p?.(e)}}),()=>{e=!0}}O(null)},[a,o,p]),t.useEffect(()=>{if(!D){S(null);return}let e=!1,t=`mermaid-diagram-${++Mi}`;return N.default.initialize({startOnLoad:!1,theme:b,securityLevel:`loose`,fontFamily:i.tokens.fontFamilyBase,suppressErrorRendering:!0}),N.default.render(t,D).then(({svg:t})=>{e||(S(t),w(null),f?.(t))}).catch(n=>{if(!e){let e=n instanceof Error?n:Error(String(n));w(e),S(null),p?.(e)}document.getElementById(t)?.remove()}),()=>{e=!0,document.getElementById(t)?.remove()}},[D,b,f,p]);let[M,ee]=t.useState(1),[P,I]=t.useState({x:0,y:0}),L=t.useRef(!1),R=t.useRef({x:0,y:0});t.useEffect(()=>{let e=_.current;if(!e||!d)return;let t=e=>{e.preventDefault();let t=e.deltaY>0?-.1:.1;ee(e=>Math.min(Math.max(e+t,.25),4))},n=e=>{L.current=!0,R.current={x:e.clientX,y:e.clientY}},r=e=>{if(!L.current)return;let t=e.clientX-R.current.x,n=e.clientY-R.current.y;R.current={x:e.clientX,y:e.clientY},I(e=>({x:e.x+t,y:e.y+n}))},i=()=>{L.current=!1};return e.addEventListener(`wheel`,t,{passive:!1}),e.addEventListener(`mousedown`,n),e.addEventListener(`mousemove`,r),e.addEventListener(`mouseup`,i),e.addEventListener(`mouseleave`,i),()=>{e.removeEventListener(`wheel`,t),e.removeEventListener(`mousedown`,n),e.removeEventListener(`mousemove`,r),e.removeEventListener(`mouseup`,i),e.removeEventListener(`mouseleave`,i)}},[d]),t.useEffect(()=>{ee(1),I({x:0,y:0})},[D]),t.useEffect(()=>{let e=v.current;e&&(e.innerHTML=x??``,e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,`Mermaid diagram`))},[x]);let z=[g.root,l].filter(Boolean).join(` `);if(T)return(0,n.jsx)(W,{className:z,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:(0,n.jsx)(W,{className:g.loading,alignItems:`center`,justifyContent:`center`,padding:`xxl`,children:m??(0,n.jsx)(yt,{size:`small`,label:k})})});if(C)return(0,n.jsx)(W,{className:z,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:h?h(C):(0,n.jsx)(Xn,{message:A,messageType:F.ERROR})});if(!x)return(0,n.jsx)(W,{className:z,style:u,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,background:c,children:(0,n.jsx)(W,{className:g.loading,alignItems:`center`,justifyContent:`center`,padding:`xxl`,children:(0,n.jsx)(i.Text,{children:j})})});let te=d?{transform:`translate(${P.x}px, ${P.y}px) scale(${M})`,transformOrigin:`center center`}:void 0;return(0,n.jsx)(W,{ref:_,className:z,style:u,alignItems:`center`,justifyContent:`center`,overflow:d?`auto`:`hidden`,background:c,children:(0,n.jsx)(W,{ref:v,className:g.svgContainer,alignItems:`center`,justifyContent:`center`,style:te,children:(0,n.jsx)(n.Fragment,{})})})},Fi=e=>{let{template:t}=e;return(0,n.jsx)(n.Fragment,{children:t})},Ii=()=>({toolbar:l.css`
|
|
333
333
|
display: flex !important;
|
|
334
334
|
flex-wrap: nowrap !important;
|
|
335
335
|
align-items: center !important;
|
|
@@ -395,7 +395,7 @@ import { AISearchIcon } from './AISearchIcon';
|
|
|
395
395
|
@media (max-width: 768px) {
|
|
396
396
|
display: none;
|
|
397
397
|
}
|
|
398
|
-
`}),Fi=[{minWidth:1280,gap:100},{minWidth:1024,gap:60},{minWidth:768,gap:40},{minWidth:480,gap:24},{minWidth:0,gap:12}];function Ii(e){for(let t of Fi)if(e>t.minWidth)return t.gap;return Fi[Fi.length-1].gap}function Li(e,n,r,i,a=48){let[o,s]=t.useState(i);return t.useEffect(()=>{let t=e.current,o=n.current,c=r.current;if(!t||!c)return;let l=()=>{let e=t.offsetWidth;if(e===0)return;let n=getComputedStyle(t),r=parseFloat(n.paddingLeft||`0`),l=parseFloat(n.paddingRight||`0`),u=parseFloat(n.columnGap||n.gap||`0`),d=Ii(e),f=o?o.offsetWidth:0,p=f>0?f+d+u:0,m=e-r-l-p;if(m<=0)return;let h=Array.from(c.children);if(h.length===0){s(i);return}let g=parseFloat(getComputedStyle(c).columnGap||`0`),_=0;for(let e of h)_+=e.offsetWidth;if(_+=Math.max(0,h.length-1)*g,_<=m){s(h.length);return}let v=m-a,y=0,b=0;for(let e=0;e<h.length;e++){let t=h[e].offsetWidth,n=e>0?g:0;if(y+n+t>v)break;y+=n+t,b++}s(Math.max(1,b))},u=requestAnimationFrame(l),d=new ResizeObserver(l);return d.observe(t),()=>{cancelAnimationFrame(u),d.disconnect()}},[e,n,r,i,a]),o}var Ri=({item:e,isLoading:t,itemClass:r,labelClass:a})=>{if(e.visible===!1)return null;if(e.onRender)return e.onRender();let o=a?(0,n.jsx)(`span`,{className:a,children:e.label}):e.label,s=e.label?(0,n.jsx)(i.ToolbarButton,{className:r,"aria-label":e.ariaLabel||e.tooltip||e.label,icon:e.icon,onClick:e.onClick,disabled:e.disabled||t,appearance:e.appearance,children:o}):(0,n.jsx)(i.ToolbarButton,{className:r,"aria-label":e.ariaLabel||e.tooltip||e.key,icon:e.icon,onClick:e.onClick,disabled:e.disabled||t,appearance:e.appearance});return e.tooltip?(0,n.jsx)(i.Tooltip,{content:e.tooltip,relationship:`label`,children:s}):s};function zi(e){let t=new Map;for(let n of e){let e=n.group||`default`;t.has(e)||t.set(e,[]),t.get(e).push(n)}return t}function Bi(e,t){let n=[],r=zi(e),i=Array.from(r.entries());for(let e=0;e<i.length;e++){let[,r]=i[e],a=e===i.length-1;for(let e of r)e.dividerBefore&&n.push({type:`divider`,key:`${e.key}-div-before`}),n.push({type:`item`,item:e,key:e.key}),e.dividerAfter&&n.push({type:`divider`,key:`${e.key}-div-after`});t&&!a&&n.push({type:`divider`,key:`group-div-${e}`})}return n}var Vi=({items:e,farItems:r=[],isLoading:a=!1,ariaLabel:o=`Toolbar`,totalCount:s,className:c,showGroupDividers:l=!0})=>{let u=Pi(),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),g=t.useMemo(()=>e.filter(e=>!e.isFarItem&&e.visible!==!1),[e]),_=t.useMemo(()=>{let t=e.filter(e=>e.isFarItem&&e.visible!==!1),n=r.filter(e=>e.visible!==!1);return[...t,...n]},[e,r]),v=t.useMemo(()=>zi(_),[_]),y=t.useMemo(()=>Bi(g,l),[g,l]),b=Li(f,m,h,y.length),x=t.useMemo(()=>{let e=new Set;for(let t=0;t<b&&t<y.length;t++)y[t].type===`item`&&e.add(y[t].key);return e},[y,b]),S=t.useMemo(()=>g.filter(e=>!x.has(e.key)),[g,x]),C=S.length>0,w=(e,t,r)=>{let o=[];for(let t of e)t.dividerBefore&&o.push((0,n.jsx)(i.ToolbarDivider,{},`${t.key}-divider-before`)),o.push((0,n.jsx)(Ri,{item:t,isLoading:a,itemClass:u.farItemButton,labelClass:u.farItemLabel},t.key)),t.dividerAfter&&o.push((0,n.jsx)(i.ToolbarDivider,{},`${t.key}-divider-after`));return l&&!r&&o.push((0,n.jsx)(i.ToolbarDivider,{},`group-divider-${t}`)),o};return(0,n.jsxs)(`div`,{ref:f,role:`toolbar`,"aria-label":o,className:`${u.toolbar} ${c||``}`,children:[(0,n.jsx)(`div`,{ref:h,className:u.measureSection,"aria-hidden":`true`,children:y.map(e=>e.type===`divider`?(0,n.jsx)(i.ToolbarDivider,{},e.key):(0,n.jsx)(Ri,{item:e.item,isLoading:a,itemClass:u.toolbarItem},e.key))}),(0,n.jsxs)(`div`,{ref:p,className:u.leftSection,children:[y.map((e,t)=>t>=b?null:e.type===`divider`?(0,n.jsx)(i.ToolbarDivider,{},e.key):(0,n.jsx)(Ri,{item:e.item,isLoading:a,itemClass:u.toolbarItem},e.key)),C&&(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.Tooltip,{content:`${S.length} more actions`,relationship:`label`,children:(0,n.jsx)(i.ToolbarButton,{className:u.overflowButton,icon:(0,n.jsx)(d.MoreHorizontalRegular,{}),"aria-label":`${S.length} more actions`})})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:S.map(e=>(0,n.jsx)(i.MenuItem,{icon:e.icon,disabled:e.disabled||a,onClick:e.onClick,children:e.label||e.tooltip||e.key},e.key))})})]}),s!==void 0&&s>0&&(0,n.jsx)(i.Badge,{appearance:`filled`,color:`informative`,className:u.countBadge,children:(0,n.jsxs)(i.Text,{size:200,children:[s,` items`]})})]}),(0,n.jsx)(`div`,{ref:m,className:u.rightGroup,children:_.length>0&&(0,n.jsx)(`div`,{className:u.farItemsContainer,children:Array.from(v.entries()).map(([e,t],n)=>w(t,n,n===v.size-1))})})]})},Hi=()=>({root:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`fit-content`,gap:`10px`,"&[data-fui-focus-within]:focus-within::after":{borderWidth:`0px`}}),personContainer:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`100%`,maxWidth:`100%`,overflow:`hidden`,paddingBottom:`0px`}),textStyle:(0,l.css)({width:`100%`,maxWidth:`100%`,overflow:`hidden`,display:`-webkit-box`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,paddingBottom:`0px`,textAlign:`start`,wordBreak:`break-all`,textOverflow:`ellipsis`,textOverlay:`hidden`}),spinnerContainer:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,width:`100%`})}),Ui=6e4,Wi=new Map,Gi=300*1e3,Ki=120*1e3;setInterval(()=>{let e=Date.now(),t=[];Wi.forEach((n,r)=>{e>n.expiresAt&&t.push(r)}),t.forEach(e=>Wi.delete(e))},600*1e3);var qi=(n,r)=>{let i=R(),a=(r||i)?.graphClient,{error:o,warn:s,verbose:c}=z(),[l,u]=(0,t.useState)(void 0),[d,f]=(0,t.useState)(!0),p=(0,t.useCallback)(async e=>{if(!a)return s(`Graph client not available`),null;try{return await a.get(`/users/${e}`)}catch(e){return o(`Error fetching user:`,e instanceof Error?e:void 0),null}},[a]),m=(0,t.useCallback)(async e=>{if(!a)return s(`Graph client not available`),null;try{return await a.get(`/users/${e}/presence`)}catch(e){return o(`Error fetching user presence:`,e instanceof Error?e:void 0),null}},[a]),h=(0,t.useCallback)(async e=>{if(!a){s(`Graph client not available`);return}try{let t=await a.getBlob(`/users/${e}/photo/$value`);return t?new Promise((e,n)=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)}):void 0}catch{c(`No photo available for user:`,e);return}},[a]),g=(0,t.useCallback)(async()=>{if(!n){f(!1);return}let t=Wi.get(n),r=Date.now();if(t&&r<t.expiresAt){u(t.data),f(!1);return}try{let t=await p(n);if(!t)return;let i={availability:`Offline`,activity:`Offline`},a;try{if(t.id){let e=await m(t.id);e&&(i=e)}}catch(n){n?.message?.toLowerCase().includes(`exceed`)?(o(`fetchUser: Exceeded resource error during presence check`,n,e.w.Error),i=t.presence||{availability:`Offline`,activity:`Offline`}):o(`fetchUser: Error fetching user presence`,n,e.w.Error)}try{t.id&&(a=await h(t.id))}catch(t){o(`fetchUser: Error fetching user photo`,t,e.w.Warning)}let s={...t,presence:i,userPhoto:a};Wi.set(n,{data:s,timestamp:r,expiresAt:r+Gi}),u(s)}catch(t){o(`fetchUser: Error fetching user`,t,e.w.Error)}finally{f(!1)}},[n,p,m,h,o]),_=(0,t.useCallback)(async()=>{if(!n||!l)return;let t=Wi.get(n),r=Date.now();if(!(t&&t.data.presence&&r-t.timestamp<Ki))try{let i={availability:`Offline`,activity:`Offline`};try{if(l.id){let e=await m(l.id);e&&(i=e)}}catch(t){t.message?.toLowerCase().includes(`exceed`)?(o(`checkUserPresence: Exceeded resource error during presence check`,t,e.w.Error),i=l.presence||{availability:`Offline`,activity:`Offline`}):o(`checkUserPresence: Error fetching user presence`,t,e.w.Error)}let a={...l,presence:i};Wi.set(n,{data:a,timestamp:r,expiresAt:t?.expiresAt||r+Gi}),u(a)}catch(t){o(`checkUserPresence: Error in checkUserPresence`,t,e.w.Error)}},[n,l,m,o]);(0,t.useEffect)(()=>{(async()=>{await g()})()},[g]);let{startPolling:v,stopPolling:y}=B(_,l?Ui:Ui*2,!1);return(0,t.useEffect)(()=>(l&&v(),()=>{y()}),[l,v,y]),{user:l,loading:d,refetch:g}},Ji=t.default.memo(({userId:r,avatarSize:a=32,showHoverCard:o=!0,context:s,textPosition:c=`after`,className:l,avatarOnly:u=!1,secondaryText:d,tertiaryText:f,quaternaryText:p})=>{let m=Hi(),{user:h}=qi(r,s),g=e.y(),_=(0,t.useMemo)(()=>{let e=h?.presence?.availability?.toLowerCase(),t=h?.presence?.activity?.toLowerCase();switch(e){case`available`:return{status:`available`,text:g.available};case`availableidle`:return{status:`available`,text:g.availableIdle};case`away`:return{status:`away`,text:g.away};case`busy`:return{status:`busy`,text:g.busy};case`busyidle`:return{status:`busy`,text:g.busyIdle};case`donotdisturb`:return{status:`do-not-disturb`,text:g.doNotDisturb};case`berighback`:return{status:`away`,text:g.beRightBack};case`invisible`:return{status:`offline`,text:g.appearOffline};case`presenceunknown`:return{status:`unknown`,text:g.unknown};case`offline`:return{status:`offline`,text:t===`outofoffice`?g.outOfOffice:g.offline,outOfOffice:t===`outofoffice`};default:return{status:`offline`,text:g.offline,outOfOffice:t===`outofoffice`}}},[h?.presence?.availability,h?.presence?.activity,g]);return(0,n.jsx)(Ni,{upn:o&&h?.mail||``,template:(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(m.root,l),children:u?(0,n.jsx)(i.Avatar,{color:`colorful`,image:{src:h?.userPhoto,alt:h?.displayName||g.userAvatar},size:a,name:h?.displayName||r||g.unknownUser,badge:{status:_.status,outOfOffice:_.outOfOffice}}):(0,n.jsx)(i.Persona,{primaryText:(0,n.jsxs)(i.Body1Strong,{className:m.textStyle,children:[` `,h?.displayName||r||g.unknownUser]}),textPosition:c??`after`,presence:{status:_.status,outOfOffice:_.outOfOffice},secondaryText:d?.showSecondaryText?d.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:d.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:h?.jobTitle||`Unknown Job Title`})}):void 0,tertiaryText:f?.showTertiaryText?f.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:f.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:h?.mail||`Unknown Email`})}):void 0,quaternaryText:p?.showQuaternaryText?p.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:p.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:_.text})}):void 0,avatar:{color:`colorful`,image:{src:h?.userPhoto,alt:h?.displayName||g.userAvatar},size:a},textAlignment:`start`})})})},(e,t)=>e.userId===t.userId&&e.avatarSize===t.avatarSize&&e.showHoverCard===t.showHoverCard&&e.textPosition===t.textPosition&&e.avatarOnly===t.avatarOnly&&e.className===t.className&&JSON.stringify(e.secondaryText)===JSON.stringify(t.secondaryText)&&JSON.stringify(e.tertiaryText)===JSON.stringify(t.tertiaryText)&&JSON.stringify(e.quaternaryText)===JSON.stringify(t.quaternaryText)),Yi=()=>({container:(0,l.css)({display:`flex`,alignItems:`center`,gap:`4px`}),stackLayout:(0,l.css)({"& > *:not(:first-child)":{marginLeft:`-8px`}}),spreadLayout:(0,l.css)({display:`flex`,flexDirection:`row`,gap:`8px`,"& > *":{marginLeft:`0`}}),userCardWrapper:(0,l.css)({position:`relative`,zIndex:1,transition:`transform 0.2s ease, z-index 0.2s ease`,"&:hover":{transform:`scale(1.1)`,zIndex:10}}),overflowButton:(0,l.css)({backgroundColor:i.tokens.colorNeutralBackground1,border:`2px solid ${i.tokens.colorNeutralStroke1}`,borderRadius:`50%`,color:i.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:i.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:(0,l.css)({maxWidth:`300px`,padding:`12px`}),popoverUserList:(0,l.css)({display:`flex`,flexDirection:`column`,gap:`8px`}),popoverUserCard:(0,l.css)({padding:`4px`,borderRadius:`4px`,transition:`background-color 0.2s ease`,"&:hover":{backgroundColor:i.tokens.colorNeutralBackground1Hover}})}),Xi=({users:e,maxVisible:r=5,avatarSize:a=32,showHoverCard:o=!0,context:s,className:c,layout:l=`stack`,overflowText:u})=>{let d=Yi(),{warn:f}=z(),{visibleUsers:p,overflowUsers:m}=(0,t.useMemo)(()=>!e||e.length===0?{visibleUsers:[],overflowUsers:[]}:{visibleUsers:e.slice(0,r),overflowUsers:e.slice(r)},[e,r]),h=(0,t.useMemo)(()=>u||`+${m.length}`,[u,m.length]);return!e||e.length===0?null:s?(0,n.jsxs)(G,{direction:`horizontal`,alignItems:`start`,gap:l===`stack`?`4px`:`12px`,className:`${l===`stack`?d.stackLayout:d.spreadLayout} ${c||``}`,children:[p.map((e,t)=>(0,n.jsx)(`div`,{className:d.userCardWrapper,children:(0,n.jsx)(Ji,{userId:e.id,avatarSize:a,showHoverCard:o??!0,context:s,avatarOnly:!0})},`user-${e.id||t}`)),m.length>0&&(0,n.jsxs)(i.Popover,{withArrow:!0,children:[(0,n.jsx)(i.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.Button,{className:d.overflowButton,style:{width:`${a}px`,height:`${a}px`,fontSize:a>40?`14px`:`12px`},appearance:`subtle`,children:h})}),(0,n.jsx)(i.PopoverSurface,{className:d.popover,children:(0,n.jsx)(`div`,{className:d.popoverUserList,children:m.map((e,t)=>(0,n.jsx)(`div`,{className:d.popoverUserCard,children:(0,n.jsx)(Ji,{userId:e.id,avatarSize:32,showHoverCard:o??!0,context:s,textPosition:`after`,avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(f(`StackedUsers: context is required to display user cards`),null)},Zi=e=>{let n=R(),r=(e||n)?.graphClient,{warn:i,error:a}=z();return{getItemActivities:(0,t.useCallback)(async(e,t,n)=>{if(!r)return i(`Graph client not available for SharePoint activities`),{activities:[]};try{let i=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return i&&i.value?{activities:i.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(e){throw a(`Error fetching SharePoint activities:`,e instanceof Error?e:void 0),e}},[r])}},Qi={width:`20px`,height:`20px`,color:i.tokens.colorBrandBackground},$i=[`access`,`comment`,`create`,`delete`,`edit`,`mention`,`move`,`rename`,`restore`,`share`,`version`],ea=new Map([]),ta=({siteId:r,listId:i,itemId:a,currentUserEmail:o,strings:s,context:c})=>{let{getItemActivities:l}=Zi(c),u=e.d(),{warn:f,error:p}=z(),m=new Map([[`access`,{message:s?.access||u.accessed||ea.get(`access`)?.message||``,icon:(0,n.jsx)(d.OpenRegular,{style:Qi})}],[`comment`,{message:s?.comment||u.commented||ea.get(`comment`)?.message||``,icon:(0,n.jsx)(d.CommentRegular,{style:Qi})}],[`create`,{message:s?.create||u.created||ea.get(`create`)?.message||``,icon:(0,n.jsx)(d.AddRegular,{style:Qi})}],[`delete`,{message:s?.delete||u.deleted||ea.get(`delete`)?.message||``,icon:(0,n.jsx)(d.DeleteRegular,{style:Qi})}],[`edit`,{message:s?.edit||u.edited||ea.get(`edit`)?.message||``,icon:(0,n.jsx)(d.EditRegular,{style:Qi})}],[`mention`,{message:s?.mention||u.mentioned||ea.get(`mention`)?.message||``,icon:(0,n.jsx)(d.MentionRegular,{style:Qi})}],[`move`,{message:s?.move||u.moved||ea.get(`move`)?.message||``,icon:(0,n.jsx)(d.ArrowMoveRegular,{style:Qi})}],[`rename`,{message:s?.rename||u.renamed||ea.get(`rename`)?.message||``,icon:(0,n.jsx)(d.RenameRegular,{style:Qi})}],[`restore`,{message:s?.restore||u.restored||ea.get(`restore`)?.message||``,icon:(0,n.jsx)(d.ArrowSyncRegular,{style:Qi})}],[`share`,{message:s?.share||u.shared||ea.get(`share`)?.message||``,icon:(0,n.jsx)(d.PeopleRegular,{style:Qi})}],[`version`,{message:s?.version||u.versioned||ea.get(`version`)?.message||``,icon:(0,n.jsx)(d.HistoryRegular,{style:Qi})}]]),[h,g]=t.useState({message:``,icon:(0,n.jsx)(n.Fragment,{})}),[_,v]=t.useState(!0),y=t.useRef(void 0),b=t.useRef(void 0),[x]=t.useState(30),S=t.useCallback(e=>e.user.email===o,[o]),C=t.useCallback(e=>{if(!e)return{message:``,icon:(0,n.jsx)(n.Fragment,{})};let{action:t,actor:r}=e,{displayName:i}=r?.user||{displayName:``},a=$i.find(e=>t[e]);if(a){let e=m.get(a);if(e)return{message:`${S(r)?u.you:i} ${e.message}`,icon:e.icon}}return{message:``,icon:(0,n.jsx)(n.Fragment,{})}},[m,S]);return t.useEffect(()=>{b.current?.setPlaybackRate(x/100)},[x,_]),t.useEffect(()=>{let e=!1,t=async(n=1e3)=>{if(r&&i&&a)try{let t=await l(r,i,a);if(e)return;let n=t.activities[0];(!y.current||JSON.stringify(y.current)!==JSON.stringify(n))&&(y.current=n,g(C(n)))}catch(e){if(e.status===429){let r=e.headers?.get(`Retry-After`),i=r?parseInt(r,10)*1e3:n;f(`Throttled. Retrying after ${i}ms`),setTimeout(()=>t(i*2),i);return}else p(`Activity Error`,e instanceof Error?e:void 0)}finally{e||v(!1)}},n=setTimeout(()=>{t()},1e3);return()=>{clearTimeout(n),e=!0}},[r,i,a,l,C]),(0,n.jsx)(N.Fade,{imperativeRef:b,visible:!_,children:(0,n.jsx)(`div`,{children:(0,n.jsxs)(U,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`center`,RowGap:4,columnGap:4,children:[h.icon,` `,h.message]})})})},na=e=>(0,n.jsxs)(`svg`,{width:`100`,height:`100`,viewBox:`0 0 100 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`rect`,{x:`20`,y:`30`,width:`60`,height:`50`,fill:`#0078D4`,opacity:`0.1`}),(0,n.jsx)(`rect`,{x:`30`,y:`50`,width:`10`,height:`20`,fill:`#0078D4`}),(0,n.jsx)(`rect`,{x:`45`,y:`40`,width:`10`,height:`30`,fill:`#0078D4`}),(0,n.jsx)(`rect`,{x:`60`,y:`35`,width:`10`,height:`35`,fill:`#0078D4`})]}),ra=t=>{let{height:r}=t,a=e.i();return(0,n.jsxs)(`div`,{style:{height:r||`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,flexDirection:`column`},children:[(0,n.jsx)(na,{width:200,height:200}),(0,n.jsx)(i.Text,{size:500,weight:`semibold`,children:a.noDashboardsAvailable})]})},ia=()=>({gridContainer:l.css`
|
|
398
|
+
`}),Li=[{minWidth:1280,gap:100},{minWidth:1024,gap:60},{minWidth:768,gap:40},{minWidth:480,gap:24},{minWidth:0,gap:12}];function Ri(e){for(let t of Li)if(e>t.minWidth)return t.gap;return Li[Li.length-1].gap}function zi(e,n,r,i,a=48){let[o,s]=t.useState(i);return t.useEffect(()=>{let t=e.current,o=n.current,c=r.current;if(!t||!c)return;let l=()=>{let e=t.offsetWidth;if(e===0)return;let n=getComputedStyle(t),r=parseFloat(n.paddingLeft||`0`),l=parseFloat(n.paddingRight||`0`),u=parseFloat(n.columnGap||n.gap||`0`),d=Ri(e),f=o?o.offsetWidth:0,p=f>0?f+d+u:0,m=e-r-l-p;if(m<=0)return;let h=Array.from(c.children);if(h.length===0){s(i);return}let g=parseFloat(getComputedStyle(c).columnGap||`0`),_=0;for(let e of h)_+=e.offsetWidth;if(_+=Math.max(0,h.length-1)*g,_<=m){s(h.length);return}let v=m-a,y=0,b=0;for(let e=0;e<h.length;e++){let t=h[e].offsetWidth,n=e>0?g:0;if(y+n+t>v)break;y+=n+t,b++}s(Math.max(1,b))},u=requestAnimationFrame(l),d=new ResizeObserver(l);return d.observe(t),()=>{cancelAnimationFrame(u),d.disconnect()}},[e,n,r,i,a]),o}var Bi=({item:e,isLoading:t,itemClass:r,labelClass:a})=>{if(e.visible===!1)return null;if(e.onRender)return e.onRender();let o=a?(0,n.jsx)(`span`,{className:a,children:e.label}):e.label,s=e.label?(0,n.jsx)(i.ToolbarButton,{className:r,"aria-label":e.ariaLabel||e.tooltip||e.label,icon:e.icon,onClick:e.onClick,disabled:e.disabled||t,appearance:e.appearance,children:o}):(0,n.jsx)(i.ToolbarButton,{className:r,"aria-label":e.ariaLabel||e.tooltip||e.key,icon:e.icon,onClick:e.onClick,disabled:e.disabled||t,appearance:e.appearance});return e.tooltip?(0,n.jsx)(i.Tooltip,{content:e.tooltip,relationship:`label`,children:s}):s};function Vi(e){let t=new Map;for(let n of e){let e=n.group||`default`;t.has(e)||t.set(e,[]),t.get(e).push(n)}return t}function Hi(e,t){let n=[],r=Vi(e),i=Array.from(r.entries());for(let e=0;e<i.length;e++){let[,r]=i[e],a=e===i.length-1;for(let e of r)e.dividerBefore&&n.push({type:`divider`,key:`${e.key}-div-before`}),n.push({type:`item`,item:e,key:e.key}),e.dividerAfter&&n.push({type:`divider`,key:`${e.key}-div-after`});t&&!a&&n.push({type:`divider`,key:`group-div-${e}`})}return n}var Ui=({items:e,farItems:r=[],isLoading:a=!1,ariaLabel:o=`Toolbar`,totalCount:s,className:c,showGroupDividers:l=!0})=>{let u=Ii(),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),g=t.useMemo(()=>e.filter(e=>!e.isFarItem&&e.visible!==!1),[e]),_=t.useMemo(()=>{let t=e.filter(e=>e.isFarItem&&e.visible!==!1),n=r.filter(e=>e.visible!==!1);return[...t,...n]},[e,r]),v=t.useMemo(()=>Vi(_),[_]),y=t.useMemo(()=>Hi(g,l),[g,l]),b=zi(f,m,h,y.length),x=t.useMemo(()=>{let e=new Set;for(let t=0;t<b&&t<y.length;t++)y[t].type===`item`&&e.add(y[t].key);return e},[y,b]),S=t.useMemo(()=>g.filter(e=>!x.has(e.key)),[g,x]),C=S.length>0,w=(e,t,r)=>{let o=[];for(let t of e)t.dividerBefore&&o.push((0,n.jsx)(i.ToolbarDivider,{},`${t.key}-divider-before`)),o.push((0,n.jsx)(Bi,{item:t,isLoading:a,itemClass:u.farItemButton,labelClass:u.farItemLabel},t.key)),t.dividerAfter&&o.push((0,n.jsx)(i.ToolbarDivider,{},`${t.key}-divider-after`));return l&&!r&&o.push((0,n.jsx)(i.ToolbarDivider,{},`group-divider-${t}`)),o};return(0,n.jsxs)(`div`,{ref:f,role:`toolbar`,"aria-label":o,className:`${u.toolbar} ${c||``}`,children:[(0,n.jsx)(`div`,{ref:h,className:u.measureSection,"aria-hidden":`true`,children:y.map(e=>e.type===`divider`?(0,n.jsx)(i.ToolbarDivider,{},e.key):(0,n.jsx)(Bi,{item:e.item,isLoading:a,itemClass:u.toolbarItem},e.key))}),(0,n.jsxs)(`div`,{ref:p,className:u.leftSection,children:[y.map((e,t)=>t>=b?null:e.type===`divider`?(0,n.jsx)(i.ToolbarDivider,{},e.key):(0,n.jsx)(Bi,{item:e.item,isLoading:a,itemClass:u.toolbarItem},e.key)),C&&(0,n.jsxs)(i.Menu,{children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.Tooltip,{content:`${S.length} more actions`,relationship:`label`,children:(0,n.jsx)(i.ToolbarButton,{className:u.overflowButton,icon:(0,n.jsx)(d.MoreHorizontalRegular,{}),"aria-label":`${S.length} more actions`})})}),(0,n.jsx)(i.MenuPopover,{children:(0,n.jsx)(i.MenuList,{children:S.map(e=>(0,n.jsx)(i.MenuItem,{icon:e.icon,disabled:e.disabled||a,onClick:e.onClick,children:e.label||e.tooltip||e.key},e.key))})})]}),s!==void 0&&s>0&&(0,n.jsx)(i.Badge,{appearance:`filled`,color:`informative`,className:u.countBadge,children:(0,n.jsxs)(i.Text,{size:200,children:[s,` items`]})})]}),(0,n.jsx)(`div`,{ref:m,className:u.rightGroup,children:_.length>0&&(0,n.jsx)(`div`,{className:u.farItemsContainer,children:Array.from(v.entries()).map(([e,t],n)=>w(t,n,n===v.size-1))})})]})},Wi=()=>({root:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`fit-content`,gap:`10px`,"&[data-fui-focus-within]:focus-within::after":{borderWidth:`0px`}}),personContainer:(0,l.css)({display:`flex`,flexDirection:`column`,justifyContent:`flex-start`,alignItems:`flex-start`,width:`100%`,maxWidth:`100%`,overflow:`hidden`,paddingBottom:`0px`}),textStyle:(0,l.css)({width:`100%`,maxWidth:`100%`,overflow:`hidden`,display:`-webkit-box`,WebkitLineClamp:`1`,WebkitBoxOrient:`vertical`,paddingBottom:`0px`,textAlign:`start`,wordBreak:`break-all`,textOverflow:`ellipsis`,textOverlay:`hidden`}),spinnerContainer:(0,l.css)({display:`flex`,flexDirection:`row`,justifyContent:`center`,alignItems:`center`,width:`100%`})}),Gi=6e4,Ki=new Map,qi=300*1e3,Ji=120*1e3;setInterval(()=>{let e=Date.now(),t=[];Ki.forEach((n,r)=>{e>n.expiresAt&&t.push(r)}),t.forEach(e=>Ki.delete(e))},600*1e3);var Yi=(n,r)=>{let i=R(),a=(r||i)?.graphClient,{error:o,warn:s,verbose:c}=z(),[l,u]=(0,t.useState)(void 0),[d,f]=(0,t.useState)(!0),p=(0,t.useCallback)(async e=>{if(!a)return s(`Graph client not available`),null;try{return await a.get(`/users/${e}`)}catch(e){return o(`Error fetching user:`,e instanceof Error?e:void 0),null}},[a]),m=(0,t.useCallback)(async e=>{if(!a)return s(`Graph client not available`),null;try{return await a.get(`/users/${e}/presence`)}catch(e){return o(`Error fetching user presence:`,e instanceof Error?e:void 0),null}},[a]),h=(0,t.useCallback)(async e=>{if(!a){s(`Graph client not available`);return}try{let t=await a.getBlob(`/users/${e}/photo/$value`);return t?new Promise((e,n)=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)}):void 0}catch{c(`No photo available for user:`,e);return}},[a]),g=(0,t.useCallback)(async()=>{if(!n){f(!1);return}let t=Ki.get(n),r=Date.now();if(t&&r<t.expiresAt){u(t.data),f(!1);return}try{let t=await p(n);if(!t)return;let i={availability:`Offline`,activity:`Offline`},a;try{if(t.id){let e=await m(t.id);e&&(i=e)}}catch(n){n?.message?.toLowerCase().includes(`exceed`)?(o(`fetchUser: Exceeded resource error during presence check`,n,e.w.Error),i=t.presence||{availability:`Offline`,activity:`Offline`}):o(`fetchUser: Error fetching user presence`,n,e.w.Error)}try{t.id&&(a=await h(t.id))}catch(t){o(`fetchUser: Error fetching user photo`,t,e.w.Warning)}let s={...t,presence:i,userPhoto:a};Ki.set(n,{data:s,timestamp:r,expiresAt:r+qi}),u(s)}catch(t){o(`fetchUser: Error fetching user`,t,e.w.Error)}finally{f(!1)}},[n,p,m,h,o]),_=(0,t.useCallback)(async()=>{if(!n||!l)return;let t=Ki.get(n),r=Date.now();if(!(t&&t.data.presence&&r-t.timestamp<Ji))try{let i={availability:`Offline`,activity:`Offline`};try{if(l.id){let e=await m(l.id);e&&(i=e)}}catch(t){t.message?.toLowerCase().includes(`exceed`)?(o(`checkUserPresence: Exceeded resource error during presence check`,t,e.w.Error),i=l.presence||{availability:`Offline`,activity:`Offline`}):o(`checkUserPresence: Error fetching user presence`,t,e.w.Error)}let a={...l,presence:i};Ki.set(n,{data:a,timestamp:r,expiresAt:t?.expiresAt||r+qi}),u(a)}catch(t){o(`checkUserPresence: Error in checkUserPresence`,t,e.w.Error)}},[n,l,m,o]);(0,t.useEffect)(()=>{(async()=>{await g()})()},[g]);let{startPolling:v,stopPolling:y}=re(_,l?Gi:Gi*2,!1);return(0,t.useEffect)(()=>(l&&v(),()=>{y()}),[l,v,y]),{user:l,loading:d,refetch:g}},Xi=t.default.memo(({userId:r,avatarSize:a=32,showHoverCard:o=!0,context:s,textPosition:c=`after`,className:l,avatarOnly:u=!1,secondaryText:d,tertiaryText:f,quaternaryText:p})=>{let m=Wi(),{user:h}=Yi(r,s),g=e.y(),_=(0,t.useMemo)(()=>{let e=h?.presence?.availability?.toLowerCase(),t=h?.presence?.activity?.toLowerCase();switch(e){case`available`:return{status:`available`,text:g.available};case`availableidle`:return{status:`available`,text:g.availableIdle};case`away`:return{status:`away`,text:g.away};case`busy`:return{status:`busy`,text:g.busy};case`busyidle`:return{status:`busy`,text:g.busyIdle};case`donotdisturb`:return{status:`do-not-disturb`,text:g.doNotDisturb};case`berighback`:return{status:`away`,text:g.beRightBack};case`invisible`:return{status:`offline`,text:g.appearOffline};case`presenceunknown`:return{status:`unknown`,text:g.unknown};case`offline`:return{status:`offline`,text:t===`outofoffice`?g.outOfOffice:g.offline,outOfOffice:t===`outofoffice`};default:return{status:`offline`,text:g.offline,outOfOffice:t===`outofoffice`}}},[h?.presence?.availability,h?.presence?.activity,g]);return(0,n.jsx)(Fi,{upn:o&&h?.mail||``,template:(0,n.jsx)(`div`,{className:(0,i.mergeClasses)(m.root,l),children:u?(0,n.jsx)(i.Avatar,{color:`colorful`,image:{src:h?.userPhoto,alt:h?.displayName||g.userAvatar},size:a,name:h?.displayName||r||g.unknownUser,badge:{status:_.status,outOfOffice:_.outOfOffice}}):(0,n.jsx)(i.Persona,{primaryText:(0,n.jsxs)(i.Body1Strong,{className:m.textStyle,children:[` `,h?.displayName||r||g.unknownUser]}),textPosition:c??`after`,presence:{status:_.status,outOfOffice:_.outOfOffice},secondaryText:d?.showSecondaryText?d.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:d.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:h?.jobTitle||`Unknown Job Title`})}):void 0,tertiaryText:f?.showTertiaryText?f.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:f.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:h?.mail||`Unknown Email`})}):void 0,quaternaryText:p?.showQuaternaryText?p.text?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:p.text})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`span`,{className:m.textStyle,children:_.text})}):void 0,avatar:{color:`colorful`,image:{src:h?.userPhoto,alt:h?.displayName||g.userAvatar},size:a},textAlignment:`start`})})})},(e,t)=>e.userId===t.userId&&e.avatarSize===t.avatarSize&&e.showHoverCard===t.showHoverCard&&e.textPosition===t.textPosition&&e.avatarOnly===t.avatarOnly&&e.className===t.className&&JSON.stringify(e.secondaryText)===JSON.stringify(t.secondaryText)&&JSON.stringify(e.tertiaryText)===JSON.stringify(t.tertiaryText)&&JSON.stringify(e.quaternaryText)===JSON.stringify(t.quaternaryText)),Zi=()=>({container:(0,l.css)({display:`flex`,alignItems:`center`,gap:`4px`}),stackLayout:(0,l.css)({"& > *:not(:first-child)":{marginLeft:`-8px`}}),spreadLayout:(0,l.css)({display:`flex`,flexDirection:`row`,gap:`8px`,"& > *":{marginLeft:`0`}}),userCardWrapper:(0,l.css)({position:`relative`,zIndex:1,transition:`transform 0.2s ease, z-index 0.2s ease`,"&:hover":{transform:`scale(1.1)`,zIndex:10}}),overflowButton:(0,l.css)({backgroundColor:i.tokens.colorNeutralBackground1,border:`2px solid ${i.tokens.colorNeutralStroke1}`,borderRadius:`50%`,color:i.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:i.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:(0,l.css)({maxWidth:`300px`,padding:`12px`}),popoverUserList:(0,l.css)({display:`flex`,flexDirection:`column`,gap:`8px`}),popoverUserCard:(0,l.css)({padding:`4px`,borderRadius:`4px`,transition:`background-color 0.2s ease`,"&:hover":{backgroundColor:i.tokens.colorNeutralBackground1Hover}})}),Qi=({users:e,maxVisible:r=5,avatarSize:a=32,showHoverCard:o=!0,context:s,className:c,layout:l=`stack`,overflowText:u})=>{let d=Zi(),{warn:f}=z(),{visibleUsers:p,overflowUsers:m}=(0,t.useMemo)(()=>!e||e.length===0?{visibleUsers:[],overflowUsers:[]}:{visibleUsers:e.slice(0,r),overflowUsers:e.slice(r)},[e,r]),h=(0,t.useMemo)(()=>u||`+${m.length}`,[u,m.length]);return!e||e.length===0?null:s?(0,n.jsxs)(W,{direction:`horizontal`,alignItems:`start`,gap:l===`stack`?`4px`:`12px`,className:`${l===`stack`?d.stackLayout:d.spreadLayout} ${c||``}`,children:[p.map((e,t)=>(0,n.jsx)(`div`,{className:d.userCardWrapper,children:(0,n.jsx)(Xi,{userId:e.id,avatarSize:a,showHoverCard:o??!0,context:s,avatarOnly:!0})},`user-${e.id||t}`)),m.length>0&&(0,n.jsxs)(i.Popover,{withArrow:!0,children:[(0,n.jsx)(i.PopoverTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.Button,{className:d.overflowButton,"aria-label":`Show ${m.length} more users`,style:{width:`${a}px`,height:`${a}px`,fontSize:a>40?`14px`:`12px`},appearance:`subtle`,children:h})}),(0,n.jsx)(i.PopoverSurface,{className:d.popover,children:(0,n.jsx)(`div`,{className:d.popoverUserList,children:m.map((e,t)=>(0,n.jsx)(`div`,{className:d.popoverUserCard,children:(0,n.jsx)(Xi,{userId:e.id,avatarSize:32,showHoverCard:o??!0,context:s,textPosition:`after`,avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(f(`StackedUsers: context is required to display user cards`),null)},$i=e=>{let n=R(),r=(e||n)?.graphClient,{warn:i,error:a}=z();return{getItemActivities:(0,t.useCallback)(async(e,t,n)=>{if(!r)return i(`Graph client not available for SharePoint activities`),{activities:[]};try{let i=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return i&&i.value?{activities:i.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(e){throw a(`Error fetching SharePoint activities:`,e instanceof Error?e:void 0),e}},[r])}},ea={width:`20px`,height:`20px`,color:i.tokens.colorBrandBackground},ta=[`access`,`comment`,`create`,`delete`,`edit`,`mention`,`move`,`rename`,`restore`,`share`,`version`],$=new Map([]),na=({siteId:r,listId:i,itemId:a,currentUserEmail:o,strings:s,context:c})=>{let{getItemActivities:l}=$i(c),u=e.d(),{warn:f,error:p}=z(),m=new Map([[`access`,{message:s?.access||u.accessed||$.get(`access`)?.message||``,icon:(0,n.jsx)(d.OpenRegular,{style:ea,"aria-hidden":`true`})}],[`comment`,{message:s?.comment||u.commented||$.get(`comment`)?.message||``,icon:(0,n.jsx)(d.CommentRegular,{style:ea,"aria-hidden":`true`})}],[`create`,{message:s?.create||u.created||$.get(`create`)?.message||``,icon:(0,n.jsx)(d.AddRegular,{style:ea,"aria-hidden":`true`})}],[`delete`,{message:s?.delete||u.deleted||$.get(`delete`)?.message||``,icon:(0,n.jsx)(d.DeleteRegular,{style:ea,"aria-hidden":`true`})}],[`edit`,{message:s?.edit||u.edited||$.get(`edit`)?.message||``,icon:(0,n.jsx)(d.EditRegular,{style:ea,"aria-hidden":`true`})}],[`mention`,{message:s?.mention||u.mentioned||$.get(`mention`)?.message||``,icon:(0,n.jsx)(d.MentionRegular,{style:ea,"aria-hidden":`true`})}],[`move`,{message:s?.move||u.moved||$.get(`move`)?.message||``,icon:(0,n.jsx)(d.ArrowMoveRegular,{style:ea,"aria-hidden":`true`})}],[`rename`,{message:s?.rename||u.renamed||$.get(`rename`)?.message||``,icon:(0,n.jsx)(d.RenameRegular,{style:ea,"aria-hidden":`true`})}],[`restore`,{message:s?.restore||u.restored||$.get(`restore`)?.message||``,icon:(0,n.jsx)(d.ArrowSyncRegular,{style:ea,"aria-hidden":`true`})}],[`share`,{message:s?.share||u.shared||$.get(`share`)?.message||``,icon:(0,n.jsx)(d.PeopleRegular,{style:ea,"aria-hidden":`true`})}],[`version`,{message:s?.version||u.versioned||$.get(`version`)?.message||``,icon:(0,n.jsx)(d.HistoryRegular,{style:ea,"aria-hidden":`true`})}]]),[h,g]=t.useState({message:``,icon:(0,n.jsx)(n.Fragment,{})}),[_,v]=t.useState(!0),y=t.useRef(void 0),b=t.useRef(void 0),[x]=t.useState(30),S=t.useCallback(e=>e.user.email===o,[o]),C=t.useCallback(e=>{if(!e)return{message:``,icon:(0,n.jsx)(n.Fragment,{})};let{action:t,actor:r}=e,{displayName:i}=r?.user||{displayName:``},a=ta.find(e=>t[e]);if(a){let e=m.get(a);if(e)return{message:`${S(r)?u.you:i} ${e.message}`,icon:e.icon}}return{message:``,icon:(0,n.jsx)(n.Fragment,{})}},[m,S]);return t.useEffect(()=>{b.current?.setPlaybackRate(x/100)},[x,_]),t.useEffect(()=>{let e=!1,t=async(n=1e3)=>{if(r&&i&&a)try{let t=await l(r,i,a);if(e)return;let n=t.activities[0];(!y.current||JSON.stringify(y.current)!==JSON.stringify(n))&&(y.current=n,g(C(n)))}catch(e){if(e.status===429){let r=e.headers?.get(`Retry-After`),i=r?parseInt(r,10)*1e3:n;f(`Throttled. Retrying after ${i}ms`),setTimeout(()=>t(i*2),i);return}else p(`Activity Error`,e instanceof Error?e:void 0)}finally{e||v(!1)}},n=setTimeout(()=>{t()},1e3);return()=>{clearTimeout(n),e=!0}},[r,i,a,l,C]),(0,n.jsx)(ee.Fade,{imperativeRef:b,visible:!_,children:(0,n.jsx)(`div`,{children:(0,n.jsxs)(H,{horizontal:!0,verticalAlign:`center`,horizontalAlign:`center`,RowGap:4,columnGap:4,children:[h.icon,` `,h.message]})})})},ra=e=>(0,n.jsxs)(`svg`,{width:`100`,height:`100`,viewBox:`0 0 100 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,"aria-label":`Business report`,...e,children:[(0,n.jsx)(`title`,{children:`Business report`}),(0,n.jsx)(`rect`,{x:`20`,y:`30`,width:`60`,height:`50`,fill:`#0078D4`,opacity:`0.1`}),(0,n.jsx)(`rect`,{x:`30`,y:`50`,width:`10`,height:`20`,fill:`#0078D4`}),(0,n.jsx)(`rect`,{x:`45`,y:`40`,width:`10`,height:`30`,fill:`#0078D4`}),(0,n.jsx)(`rect`,{x:`60`,y:`35`,width:`10`,height:`35`,fill:`#0078D4`})]}),ia=t=>{let{height:r}=t,a=e.i();return(0,n.jsxs)(`div`,{style:{height:r||`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`,flexDirection:`column`},children:[(0,n.jsx)(ra,{width:200,height:200}),(0,n.jsx)(i.Text,{size:500,weight:`semibold`,children:a.noDashboardsAvailable})]})},aa=()=>({gridContainer:l.css`
|
|
399
399
|
display: grid;
|
|
400
400
|
gap: 4px;
|
|
401
401
|
padding: 8px;
|
|
@@ -418,11 +418,11 @@ import { AISearchIcon } from './AISearchIcon';
|
|
|
418
418
|
`,bottomText:l.css`
|
|
419
419
|
padding-left: 8px;
|
|
420
420
|
padding-right: 8px;
|
|
421
|
-
`,zoomContainer:(0,l.css)({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,width:`100%`,boxSizing:`border-box`,padding:`8px 0px`})}),
|
|
421
|
+
`,zoomContainer:(0,l.css)({display:`flex`,flexDirection:`row`,alignItems:`center`,gap:`6px`,width:`100%`,boxSizing:`border-box`,padding:`8px 0px`})}),oa=r=>{let{onChange:a,values:o,maxCols:s,maxRows:c}=r,l=(0,d.bundleIcon)(d.Settings20Filled,d.Settings20Regular),u=aa(),f=e.i(),[p,m]=t.useState(o),[h,g]=t.useState(null),[_,v]=t.useState(!1);t.useEffect(()=>{m(o)},[o]);let y=(e,t)=>{v(t.open),g(null)},b=(e,t)=>{let n={spanCols:t+1,spanRows:e+1};m(n),a?.(n),v(!1)},x=(e,t)=>{g({spanCols:t+1,spanRows:e+1})},S=()=>{g(null)},C=()=>{let e=[];for(let t=0;t<c;t++)for(let r=0;r<s;r++){let i=t<p.spanRows&&r<p.spanCols,a=h&&t<h.spanRows&&r<h.spanCols;e.push((0,n.jsx)(`div`,{role:`gridcell`,tabIndex:0,"aria-label":`Set span to ${r+1} columns by ${t+1} rows`,"aria-selected":i,className:`${u.cell} ${a?u.hoveredCell:``} ${i?u.selectedCell:``}`,onMouseEnter:()=>x(t,r),onClick:()=>b(t,r),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(t,r))},onFocus:()=>x(t,r)},`${t}-${r}`))}return e},w=t.useMemo(()=>30*s+4*(s-1)+32,[s]);return(0,n.jsxs)(i.Menu,{open:_,onOpenChange:y,children:[(0,n.jsx)(i.MenuTrigger,{disableButtonEnhancement:!0,children:(0,n.jsx)(i.Tooltip,{content:f.configure,relationship:`label`,children:(0,n.jsx)(i.MenuButton,{icon:(0,n.jsx)(l,{}),size:`small`,appearance:`transparent`})})}),(0,n.jsxs)(i.MenuPopover,{style:{width:`${w}px`,minWidth:`120px`,padding:8},children:[(0,n.jsx)(`div`,{className:u.zoomContainer,children:(0,n.jsx)(_t,{label:`Span (${p.spanCols} × ${p.spanRows})`})}),(0,n.jsx)(`div`,{className:u.gridContainer,style:{gridTemplateColumns:`repeat(${s}, 30px)`,gridTemplateRows:`repeat(${c}, 30px)`},onMouseLeave:S,children:C()}),(0,n.jsx)(i.Caption1,{className:u.bottomText,children:f.clickToSetSpan})]})]})},sa=()=>({dashboardContainer:(0,l.css)({display:`grid`,padding:`20px`,gap:`16px`,backgroundColor:i.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:i.tokens.colorNeutralBackground4,borderRadius:`10px`},"::-webkit-scrollbar-thumb":{background:i.tokens.colorBrandStroke2Hover,borderRadius:`10px`},"::-webkit-scrollbar-thumb:hover":{background:i.tokens.colorNeutralStroke2},justifyContent:`center`,gridAutoFlow:`dense`}),cardBody:(0,l.css)({display:`flex`,flexDirection:`column`,height:`100%`,minHeight:`320px`}),chartContainer:(0,l.css)({flex:1,width:`100%`,minHeight:`280px`}),cardDescription:(0,l.css)({color:`${i.tokens.colorNeutralForeground2}`}),cardWrapper:(0,l.css)({position:`relative`,height:`100%`,minHeight:`300px`,borderRadius:i.tokens.borderRadiusMedium,transition:`all 0.2s ease`,"&:hover":{transform:`translateY(-2px)`,boxShadow:`${i.tokens.shadow16}`},"&:active":{transform:`translateY(0)`,boxShadow:`${i.tokens.shadow8}`}})}),ca=600,la=4,ua=`app-dashboard`,da=30,fa=({cards:e,containerWidth:r,containerHeight:a=`100%`,maxSpanRows:o=la,enableDragAndDrop:s=!0,enableCache:c=!0,cacheKeyPrefix:l=ua,onCardsReorder:u,onCardResize:d})=>{let{warn:f}=z(),p=sa(),m=`${l}-layout-settings`,h=`${l}-card-order`,{getCachedData:g,setCachedData:_}=ne(),v=(0,t.useCallback)(e=>g(e),[g]),y=(0,t.useCallback)((e,t)=>_(e,t,da*24*60),[_]),{getCachedData:b,setCachedData:x}=ne(),S=(0,t.useCallback)(e=>b(e),[b]),C=(0,t.useCallback)((e,t)=>x(e,t,da*24*60),[x]),[w,T]=(0,t.useState)([]),[E,D]=(0,t.useState)({}),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null);(0,t.useEffect)(()=>{(async()=>{try{let t=e,n={};if(c){let[r,i]=await Promise.all([v(m),S(h)]);if(i&&i.length>0){let n=new Map(e.map(e=>[e.id,e])),r=i.filter(e=>n.has(e)),a=e.filter(e=>!i.includes(e.id));t=[...r.map(e=>n.get(e)),...a]}e.forEach(e=>{let t=r?.[e.id];n[e.id]={spanCols:t?.spanCols??e.defaultSpan?.spanCols??1,spanRows:t?.spanRows??e.defaultSpan?.spanRows??1}})}else e.forEach(e=>{n[e.id]={spanCols:e.defaultSpan?.spanCols??1,spanRows:e.defaultSpan?.spanRows??1}});T(t),D(n)}catch(t){f(`Failed to load dashboard data from cache:`,t),T(e);let n={};e.forEach(e=>{n[e.id]={spanCols:e.defaultSpan?.spanCols??1,spanRows:e.defaultSpan?.spanRows??1}}),D(n)}})()},[e,c,m,h,v,S]),(0,t.useEffect)(()=>{!c||Object.keys(E).length===0||(async()=>{try{await y(m,E)}catch(e){f(`Failed to save dashboard layout to cache:`,e)}})()},[E,c,m,y]),(0,t.useEffect)(()=>{!c||w.length===0||(async()=>{try{await C(h,w.map(e=>e.id))}catch(e){f(`Failed to save dashboard order to cache:`,e)}})()},[w,c,h,C]),(0,t.useEffect)(()=>{r<=ca&&D(()=>{let e={};return w.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[r,w]);let j=(0,t.useMemo)(()=>r>ca,[r]),{minCardWidth:M,gridGap:N,containerPadding:ee}=(0,t.useMemo)(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),P=r-ee*2,F=(0,t.useMemo)(()=>Math.floor((P+N)/(M+N)),[P,N,M]),I=Math.max(F,1),L=(0,t.useCallback)(()=>{if(O.current!==null&&k.current!==null&&O.current!==k.current){let e=[...w],[t]=e.splice(O.current,1);e.splice(k.current,0,t),T(e),u&&u(e)}O.current=null,k.current=null},[w,u]),R=(0,t.useCallback)((e,t)=>{let n={spanCols:Math.min(Math.max(t.spanCols,1),I),spanRows:Math.min(Math.max(t.spanRows,1),o)};D(t=>({...t,[e]:n})),d&&d(e,n)},[I,o,d]),te=(0,t.useMemo)(()=>w.reduce((e,t)=>(e[t.id]={spanCols:Math.min(t.defaultSpan?.spanCols??1,F),spanRows:t.defaultSpan?.spanRows??1},e),{}),[w,F]),re=(0,t.useMemo)(()=>w.map((e,t)=>{let r=e.showZoom!==!1&&j,c=e.headerAction||(r?(0,n.jsx)(oa,{values:E[e.id]||te[e.id]||{spanCols:1,spanRows:1},maxCols:I,maxRows:o,IsOpen:!1,onChange:t=>R(e.id,t)}):void 0);return(0,n.jsx)(`div`,{className:p.cardWrapper,tabIndex:s?0:void 0,role:s?`listitem`:void 0,"aria-label":s?`${e.cardTitle}, press Ctrl+Arrow keys to reorder`:void 0,draggable:s,onDragStart:()=>s&&(O.current=t),onDragEnter:()=>s&&(k.current=t),onDragOver:e=>s&&e.preventDefault(),onDragEnd:s?L:void 0,onKeyDown:s?e=>{!e.ctrlKey&&!e.metaKey||(e.key===`ArrowLeft`||e.key===`ArrowUp`?t>0&&(e.preventDefault(),O.current=t,k.current=t-1,L()):(e.key===`ArrowRight`||e.key===`ArrowDown`)&&t<w.length-1&&(e.preventDefault(),O.current=t,k.current=t+1,L()))}:void 0,style:{gridColumnEnd:E[e.id]?.spanCols?`span ${E[e.id].spanCols}`:`span ${te[e.id]?.spanCols||1}`,gridRowEnd:E[e.id]?.spanRows?`span ${E[e.id].spanRows}`:`span ${te[e.id]?.spanRows||1}`,cursor:s?`grab`:`default`},children:(0,n.jsxs)(i.Card,{className:`${p.cardBody} ${e.className||``}`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsxs)(W,{gap:`0px`,children:[(0,n.jsx)(i.Text,{as:`h3`,weight:`semibold`,size:400,children:e.cardTitle}),e.cardDescription&&(0,n.jsx)(i.Text,{className:p.cardDescription,size:200,children:e.cardDescription})]}),action:c}),(0,n.jsx)(`div`,{className:p.chartContainer,style:{height:a,...e.style},children:e.content})]})},e.id)}),[w,s,L,E,p.cardBody,p.cardDescription,p.chartContainer,p.cardWrapper,j,I,o,R,a,te]);return w.length===0?(0,n.jsx)(ia,{}):(0,n.jsx)(`div`,{ref:A,className:p.dashboardContainer,style:{height:a},children:re})},pa=l.keyframes`
|
|
422
422
|
0%, 100% { transform: translateY(0px); }
|
|
423
423
|
50% { transform: translateY(-8px); }
|
|
424
|
-
`,
|
|
424
|
+
`,ma=l.keyframes`
|
|
425
425
|
0% { background-position: -200% center; }
|
|
426
426
|
100% { background-position: 200% center; }
|
|
427
|
-
`,ma=()=>({card:(0,l.css)({width:`100%`,height:`310px`,borderRadius:10,background:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke1}`,boxShadow:i.tokens.shadow8,overflow:`visible`,position:`relative`,padding:`0px 15px !important`,transition:`transform 0.25s ease, box-shadow 0.25s ease`,"&:hover, &:focus-within":{zIndex:10,transform:`translateY(-2px)`,boxShadow:i.tokens.shadow16}}),description:(0,l.css)({fontSize:i.tokens.fontSizeBase300,color:i.tokens.colorNeutralForeground4,lineHeight:i.tokens.lineHeightBase400,position:`relative`,zIndex:1}),footerMetric:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:i.tokens.spacingVerticalXXS}),footerIcon:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontSize:i.tokens.fontSizeBase300}),footerLabel:(0,l.css)({fontSize:`${i.tokens.fontSizeBase100} !important`,color:i.tokens.colorNeutralForeground3,textTransform:`uppercase`,letterSpacing:`0.8px`,fontWeight:i.tokens.fontWeightMedium,textAlign:`center`}),footerValue:(0,l.css)({fontSize:`${i.tokens.fontSizeBase400} !important`,fontWeight:i.tokens.fontWeightSemibold,color:i.tokens.colorNeutralForeground2,textAlign:`center`}),footerDivider:(0,l.css)({height:`32px`,borderColor:i.tokens.colorNeutralStroke1}),glowBlob:(0,l.css)({position:`absolute`,top:`-60px`,right:`-60px`,width:`180px`,height:`180px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,filter:`blur(40px)`}),glowBlobSuccess:(0,l.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${i.tokens.colorPaletteLightGreenBackground2} 0%, transparent 70%)`,opacity:.7,filter:`blur(20px)`}),glowBlobError:(0,l.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${i.tokens.colorPaletteRedBackground2} 0%, transparent 70%)`,opacity:.6,filter:`blur(20px)`}),headerActionBadge:(0,l.css)({minWidth:`32px`,height:`32px`,borderRadius:`50% !important`,background:`${i.tokens.colorNeutralBackground3} !important`,border:`none !important`,padding:`0 !important`,display:`flex`,alignItems:`center`,justifyContent:`center`}),kpiContainer:(0,l.css)({width:`100%`,backgroundColor:i.tokens.colorNeutralBackground2,borderRadius:8,display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, 280px), 1fr))`,gap:16,padding:16}),iconContainer:(0,l.css)({width:48,height:48,borderRadius:8,display:`grid`,placeItems:`center`,background:i.tokens.colorNeutralBackgroundInverted}),noKpiCard:(0,l.css)({width:280,minHeight:160,display:`flex`,alignItems:`center`,justifyContent:`center`}),noKpiCardContainer:(0,l.css)({width:`100%`,minWidth:`280px`,minHeight:`280px`,borderRadius:`16px`,background:`linear-gradient(135deg, ${i.tokens.colorNeutralBackground1} 0%, ${i.tokens.colorNeutralBackground3} 100%)`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,boxShadow:i.tokens.shadow16,overflow:`hidden`,position:`relative`,padding:`32px`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,"&:hover":{transform:`translateY(-4px)`,boxShadow:i.tokens.shadow28}}),noKpiBackgroundOrb1:(0,l.css)({position:`absolute`,top:`0px`,right:`0px`,width:`180px`,height:`180px`,borderRadius:`50%`,background:`radial-gradient(circle, ${i.tokens.colorBrandBackground2} 0%, transparent 70%)`,opacity:.8,pointerEvents:`none`,filter:`blur(25px)`,transform:`translate(30%, -30%)`}),noKpiBackgroundOrb2:(0,l.css)({position:`absolute`,bottom:`-30px`,left:`-30px`,width:`120px`,height:`120px`,borderRadius:`50%`,background:`radial-gradient(circle, ${i.tokens.colorPaletteLavenderBackground2} 0%, transparent 70%)`,opacity:.5,pointerEvents:`none`,filter:`blur(20px)`}),noKpiIconContainer:(0,l.css)({width:`80px`,height:`80px`,borderRadius:`20px`,background:`linear-gradient(135deg, ${i.tokens.colorBrandBackground} 0%, ${i.tokens.colorBrandBackground2} 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px ${i.tokens.colorBrandBackground}40`,animation:`${fa} 3s ease-in-out infinite`,position:`relative`,zIndex:1}),noKpiIcon:(0,l.css)({fontSize:`36px`,color:i.tokens.colorNeutralForegroundOnBrand}),noKpiSparkle1:(0,l.css)({position:`absolute`,top:`-8px`,right:`-8px`,color:i.tokens.colorPaletteYellowForeground1,fontSize:`20px`,animation:`${fa} 2s ease-in-out infinite 0.5s`}),noKpiSparkle2:(0,l.css)({position:`absolute`,bottom:`-4px`,left:`-8px`,color:i.tokens.colorPaletteLavenderForeground2,fontSize:`16px`,animation:`${fa} 2.5s ease-in-out infinite`}),noKpiTitle:(0,l.css)({fontSize:`22px`,fontWeight:i.tokens.fontWeightSemibold,color:i.tokens.colorNeutralForeground1,marginTop:`24px`,textAlign:`center`,position:`relative`,zIndex:1}),noKpiSubtitle:(0,l.css)({fontSize:`14px`,color:i.tokens.colorNeutralForeground3,textAlign:`center`,lineHeight:`1.6`,maxWidth:`320px`,marginTop:`8px`,position:`relative`,zIndex:1}),noKpiHighlight:(0,l.css)({background:`linear-gradient(90deg, ${i.tokens.colorBrandForeground1}, ${i.tokens.colorPaletteLavenderForeground2}, ${i.tokens.colorBrandForeground1})`,backgroundSize:`200% auto`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`,fontWeight:i.tokens.fontWeightSemibold,animation:`${pa} 3s linear infinite`}),noKpiButtonContainer:(0,l.css)({marginTop:`24px`,position:`relative`,zIndex:1}),noKpiButton:(0,l.css)({borderRadius:`10px`,padding:`10px 20px`,fontWeight:i.tokens.fontWeightSemibold,transition:`transform 0.2s ease`,"&:hover":{transform:`scale(1.02)`}}),noKpiDecorativeLine:(0,l.css)({width:`60px`,height:`4px`,borderRadius:`2px`,background:`linear-gradient(90deg, ${i.tokens.colorBrandBackground}, ${i.tokens.colorPaletteLavenderBackground2})`,marginTop:`16px`,position:`relative`,zIndex:1}),footerGrid:(0,l.css)({width:`100%`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(80px, 1fr))`,alignItems:`center`})}),ha=function(e){return e[e.LOWER_IS_BETTER=1]=`LOWER_IS_BETTER`,e[e.HIGHER_IS_BETTER=2]=`HIGHER_IS_BETTER`,e}({}),ga=r=>{let{dataCard:a}=r,o=ma(),s=e.u(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),f=t.useMemo(()=>a.goalMetric===ha.LOWER_IS_BETTER?a.currentValue<=a.goal:a.currentValue>=a.goal,[a.currentValue,a.goal,a.goalMetric]),p=t.useMemo(()=>f?`success`:`error`,[f]),m=t.useMemo(()=>a.goal.toLocaleString(),[a.goal]),h=t.useMemo(()=>a.currentValue/a.totalItems*100,[a.currentValue,a.totalItems]),g=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenForeground2:i.tokens.colorPaletteRedForeground2,[f]),_=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenBackground1:i.tokens.colorPaletteRedBackground1,[f]),v=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenBorder1:i.tokens.colorPaletteRedBorder1,[f]),y=t.useMemo(()=>({background:_,border:`1px solid ${v}`,color:g,borderRadius:`20px`,padding:`12px 12px`,fontSize:i.tokens.fontSizeBase200,fontWeight:i.tokens.fontWeightSemibold,letterSpacing:`0.3px`,maxWidth:`fit-content`}),[_,v,g]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Card,{className:o.card,onMouseLeave:u,children:[(0,n.jsx)(`div`,{className:f?o.glowBlobSuccess:o.glowBlobError}),(0,n.jsxs)(G,{gap:`m`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsxs)(G,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(G,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.InfoLabel,{style:{zIndex:99999},infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:a.description||s.noDescription})}),children:(0,n.jsx)(i.Text,{weight:`bold`,size:300,children:a.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(i.Text,{size:200,style:{color:i.tokens.colorNeutralForeground3,fontStyle:`italic`},children:a.goalMetric===ha.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(i.Tooltip,{content:f?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`inaccessible`,children:(0,n.jsx)(i.Badge,{className:o.headerActionBadge,appearance:`ghost`,size:`small`,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{color:g,fontSize:`22px`}}):(0,n.jsx)(d.AlertFilled,{style:{color:g,fontSize:`22px`}})})})}),(0,n.jsxs)(G,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsxs)(i.Text,{weight:`bold`,size:900,children:[a.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(i.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,a.goal,` `,s.goal]})]}),(0,n.jsxs)(G,{gap:`s`,children:[(0,n.jsxs)(G,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(i.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(a.currentValue/a.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(i.ProgressBar,{value:a.currentValue/a.goal,color:p,style:{height:`8px`},shape:`rounded`})]}),(0,n.jsxs)(i.CardFooter,{children:[(0,n.jsx)(i.Tooltip,{content:s.maxAllowedThreshold,relationship:`inaccessible`,children:(0,n.jsxs)(G,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.TargetRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:`Goal`}),(0,n.jsx)(i.Text,{className:o.footerValue,children:m})]})}),(0,n.jsx)(i.Divider,{vertical:!0,className:o.footerDivider}),(0,n.jsx)(i.Tooltip,{content:s.totalItemsInScope,relationship:`inaccessible`,children:(0,n.jsxs)(G,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.DocumentRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:s.totalItems}),(0,n.jsx)(i.Text,{className:o.footerValue,children:a.totalItems.toLocaleString()})]})}),(0,n.jsx)(i.Divider,{vertical:!0,className:o.footerDivider}),(0,n.jsx)(i.Tooltip,{content:s.currentValueAsPercent,relationship:`inaccessible`,children:(0,n.jsxs)(G,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.CalculatorRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:s.percentOfTotal}),(0,n.jsxs)(i.Text,{className:o.footerValue,children:[h.toFixed(2),`%`]})]})})]}),(0,n.jsx)(G,{children:(0,n.jsx)(i.Badge,{appearance:`outline`,size:`small`,style:y,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{fontSize:`14px`}}):(0,n.jsx)(d.AlertFilled,{style:{fontSize:`14px`}}),children:f?s.onTrack:s.exceedGoal})})]})]})})},_a=()=>{let e=ma(),t={headerTitle:(0,l.css)({width:`120px`,height:`16px`}),headerBadge:(0,l.css)({width:`32px`,height:`32px`,borderRadius:`50%`}),mainValue:(0,l.css)({width:`80px`,height:`42px`}),goalText:(0,l.css)({width:`70px`,height:`16px`}),progressLabel:(0,l.css)({width:`80px`,height:`12px`}),progressValue:(0,l.css)({width:`50px`,height:`12px`}),progressBar:(0,l.css)({width:`100%`,height:`8px`,borderRadius:`4px`}),footerIcon:(0,l.css)({width:`16px`,height:`16px`,borderRadius:`4px`}),footerLabel:(0,l.css)({width:`50px`,height:`10px`}),footerValue:(0,l.css)({width:`40px`,height:`14px`}),badge:(0,l.css)({width:`90px`,height:`32px`,borderRadius:`20px`})};return(0,n.jsx)(i.Card,{className:e.card,children:(0,n.jsx)(i.Skeleton,{animation:`pulse`,children:(0,n.jsxs)(G,{gap:`m`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsx)(G,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.SkeletonItem,{className:t.headerTitle})}),action:(0,n.jsx)(i.SkeletonItem,{className:t.headerBadge,shape:`circle`})}),(0,n.jsxs)(G,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.mainValue}),(0,n.jsx)(i.SkeletonItem,{className:t.goalText})]}),(0,n.jsxs)(G,{gap:`s`,children:[(0,n.jsxs)(G,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.progressLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.progressValue})]}),(0,n.jsx)(i.SkeletonItem,{className:t.progressBar})]}),(0,n.jsxs)(i.CardFooter,{children:[(0,n.jsxs)(G,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(i.Divider,{vertical:!0,style:{height:`32px`,borderColor:i.tokens.colorNeutralStroke1}}),(0,n.jsxs)(G,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(i.Divider,{vertical:!0,style:{height:`32px`,borderColor:i.tokens.colorNeutralStroke1}}),(0,n.jsxs)(G,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]})]}),(0,n.jsx)(G,{children:(0,n.jsx)(i.SkeletonItem,{className:t.badge})})]})})})},va=`/sites/mock-site/Lists/Directory Status Config`,ya=()=>{let r=ma(),a=e.h(),o=va,s=t.useCallback(()=>{let e=`${window.location.origin}${o}/AllItems.aspx`;window.open(e,`_blank`)},[o]);return(0,n.jsxs)(i.Card,{className:r.noKpiCardContainer,children:[(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb1}),(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb2}),(0,n.jsxs)(G,{alignItems:`center`,justifyContent:`center`,gap:`s`,children:[(0,n.jsxs)(`div`,{className:r.noKpiIconContainer,children:[(0,n.jsx)(d.DataBarVerticalStarRegular,{className:r.noKpiIcon}),(0,n.jsx)(d.SparkleRegular,{className:r.noKpiSparkle1}),(0,n.jsx)(d.SparkleRegular,{className:r.noKpiSparkle2})]}),(0,n.jsx)(i.Text,{className:r.noKpiTitle,children:a.title}),(0,n.jsx)(`div`,{className:r.noKpiDecorativeLine}),(0,n.jsxs)(i.Text,{className:r.noKpiSubtitle,children:[a.subtitle.split(`{highlight}`)[0],(0,n.jsx)(`span`,{className:r.noKpiHighlight,children:a.highlightText}),a.subtitle.split(`{highlight}`)[1]]}),(0,n.jsx)(`div`,{className:r.noKpiButtonContainer,children:(0,n.jsx)(i.Button,{appearance:`outline`,icon:(0,n.jsx)(d.SettingsRegular,{}),className:r.noKpiButton,onClick:s,children:a.configureButton})})]})]})},ba=r=>{let{dataCard:a}=r,o=ma(),s=e.u(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),f=t.useMemo(()=>a.goalMetric===ha.LOWER_IS_BETTER?a.currentValue<=a.goal:a.currentValue>=a.goal,[a.currentValue,a.goal,a.goalMetric]),p=t.useMemo(()=>f?`success`:`error`,[f]),m=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenForeground2:i.tokens.colorPaletteRedForeground2,[f]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Card,{className:o.card,style:{height:`168px`},onMouseLeave:u,children:[(0,n.jsx)(`div`,{className:f?o.glowBlobSuccess:o.glowBlobError}),(0,n.jsxs)(G,{gap:`0px`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsxs)(G,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(G,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.InfoLabel,{infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:a.description||s.noDescription})}),children:(0,n.jsx)(i.Text,{weight:`bold`,size:300,children:a.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(i.Text,{size:200,style:{color:i.tokens.colorNeutralForeground3,fontStyle:`italic`},children:a.goalMetric===ha.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(i.Tooltip,{content:f?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`inaccessible`,children:(0,n.jsx)(i.Badge,{className:o.headerActionBadge,appearance:`ghost`,size:`small`,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{color:m,fontSize:`22px`}}):(0,n.jsx)(d.AlertFilled,{style:{color:m,fontSize:`22px`}})})})}),(0,n.jsxs)(G,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,children:[(0,n.jsxs)(i.Text,{weight:`bold`,size:900,children:[a.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(i.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,a.goal,` `,s.goal]})]}),(0,n.jsxs)(G,{gap:`s`,children:[(0,n.jsxs)(G,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(i.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(a.currentValue/a.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(i.ProgressBar,{value:a.currentValue/a.goal,color:p,style:{height:`3px`},shape:`rounded`})]})]})]})})},xa=[{identifier:`kpi-1`,title:`Sales Revenue`,currentValue:125,goal:150,totalItems:200,description:`This is a comprehensive description of the Total Sales Revenue KPI for Q1. This metric tracks all revenue generated from product sales, service contracts, and recurring subscriptions across all business units and geographic regions. The goal is set based on historical performance, market conditions, and strategic growth objectives. Performance is evaluated weekly with detailed breakdowns by product category, sales team, and customer segment. This KPI is critical for quarterly business reviews and investor reporting.`,goalMetric:2},{identifier:`kpi-2`,title:`Customer Satisfaction`,currentValue:87,goal:90,totalItems:100,description:`Customer satisfaction score`,goalMetric:1},{identifier:`kpi-3`,title:`Tasks Completed`,currentValue:42,goal:50,totalItems:60,description:`Number of tasks completed this month`,goalMetric:2},{identifier:`kpi-4`,title:`New Customers`,currentValue:156,goal:200,totalItems:250,description:`New customer acquisitions this quarter`,goalMetric:1},{identifier:`kpi-5`,title:`Response Time`,currentValue:2.5,goal:2,totalItems:5,description:`Average response time in hours`,goalMetric:2},{identifier:`kpi-6`,title:`Employee Engagement`,currentValue:78,goal:85,totalItems:100,description:`Employee engagement score percentage`,goalMetric:1}],Sa=e=>{let{skeletonCount:r=3,compact:i=!1}=e,a=ma(),o=xa;return t.useCallback(()=>Array.from({length:r}).map((e,t)=>(0,n.jsx)(_a,{},`kpi-skeleton-${t}`)),[r]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(G,{gap:`l`,direction:`horizontal`,padding:`l`,paddingTop:`s`,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:a.kpiContainer,children:o.length>0?o.map(e=>i?(0,n.jsx)(ba,{dataCard:e},e.identifier):(0,n.jsx)(ga,{dataCard:e},e.identifier)):(0,n.jsx)(ya,{})})})})})},Ca=()=>{let e=t.useRef(``);return e.current||=`fui-`+Math.random().toString(36).slice(2,9),e.current},wa=e=>{let t=Ca(),{theme:r=i.webLightTheme,applicationName:a=t,targetDocument:o=document,applyStylesToPortals:s=!0,className:c,styles:l,children:u}=e;return(0,n.jsx)(i.IdPrefixProvider,{value:a,children:(0,n.jsx)(i.FluentProvider,{theme:r,applyStylesToPortals:s,targetDocument:o,className:c,style:l,children:u})})};exports.AIAssistant=Ei,exports.AISearchControl=oi,exports.AISearchIcon=ni,exports.AISearchIconExample=ci,exports.AdaptiveCardHost=Yr,exports.AdaptiveCardHostThemeType=Y,exports.AppDashboard=da,exports.AspectRatio=et,exports.Breadcrumb=Tt,exports.ButtonMenu=xt,exports.CalendarControl=fn,exports.CalendarMonth=Zt,exports.Card=Ue,exports.Carousel=ut,exports.Center=rt,exports.ChatInput=ui,exports.ChatInputWithMensions=hi,exports.ChatInputWithMensionsV1=Di,exports.ChatList=Ci,exports.Container=at,exports.ContentRenderer=Si,exports.ContentType=H,exports.CustomControlBar=Xn,exports.DataGrid=Pn,exports.DataGridV2=Ln,exports.DropdownField=mn,exports.EBreakPoints=P,exports.ECalendarViews=q,exports.EGoalMetric=ha,exports.EMessageType=F,exports.ErrorType=e.w,exports.FluentUIProvider=wa,exports.GenericOverFlowMenu=er,exports.Grid=Ge,exports.IconButton=Et,exports.InputField=gn,exports.ItemPicker=jn,exports.KPICard=ga,exports.KPICardCompact=ba,exports.KPICardSkeleton=_a,exports.Kpis=Sa,exports.Layout=Je,exports.LayoutItem=Ye,exports.ListItemActivityMessage=ta,exports.ListToolbar=Vi,exports.LivePersona=Ni,exports.LocalizationProvider=e.t,exports.LogLevel=e.T,exports.MaplibreWorldMap=vr,exports.MarkdownRenderer=bi,exports.Mensions=fi,exports.MensionsExample=pi,exports.MermaidDiagram=Mi,exports.Navigation=tr,exports.NoKpisCard=ya,exports.OptionTime=Dn,exports.Popup=pt,exports.RenderAdaptiveCard=Xr,exports.RenderDialog=Bn,exports.RenderDrawer=Vn,exports.RenderHeader=Hn,exports.RenderLabel=ht,exports.RenderSpinner=_t,exports.SearchControl=vn,exports.SelectDay=Jt,exports.SelectMonth=Qt,exports.SelectTime=kn,exports.SelectView=yn,exports.SelectWeek=nn,exports.ShareDialog=Wn,exports.ShowError=Kn,exports.ShowMessage=Jn,exports.Space=Ze,exports.SplitPane=ft,exports.Stack=U,exports.StackItem=$e,exports.StackV2=G,exports.StackedUsers=Xi,exports.TIME_RADIO_GROUP=Sn,exports.TypographyControl=bt,exports.UniversalProvider=L,exports.UserCard=Ji,exports.VideoPlayer=ir,exports.cloneDeep=we,exports.debounce=Se,exports.deepMerge=e.S,exports.defaultCalendarControlStrings=cn,exports.defaultCalendarMonthStrings=Xt,exports.defaultSelectWeekStrings=$t,exports.detectContentType=Be,exports.en=e.C,exports.every=Pe,exports.filter=Me,exports.formatTime=wn,exports.get=Ee,exports.getContentType=Ve,exports.groupBy=Ae,exports.isEmpty=Te,exports.map=je,exports.set=De,exports.some=Ne,exports.throttle=Ce,exports.timeKey=Tn,exports.uniq=Oe,exports.uniqBy=ke,exports.useAIAssistantStrings=e.n,exports.useAISearchControlStrings=e.r,exports.useAppDashboardStrings=e.i,exports.useApplicationContext=R,exports.useAspectRatioStyles=tt,exports.useBrandCenterFonts=he,exports.useCalendar=Vt,exports.useCalendarStrings=e.a,exports.useCalendarStyles=Pt,exports.useCenterStyles=nt,exports.useCommonStrings=e.o,exports.useComponentStrings=e.s,exports.useComponentUtils=V,exports.useDataGridStyles=Nn,exports.useDateUtils=ve,exports.useDayViewStyles=Ht,exports.useGraphAPI=ee,exports.useGridStyles=We,exports.useImageUtils=xe,exports.useIndexedDBCache=te,exports.useInputFieldStrings=e.c,exports.useItemPickerStrings=e.l,exports.useKpiStrings=e.u,exports.useLayoutStyles=Ke,exports.useListItemActivityStrings=e.d,exports.useLocalization=e.f,exports.useLogging=z,exports.useMensionsStrings=e.p,exports.useMensionsStyles=di,exports.useMermaidDiagramStrings=e.m,exports.useMermaidDiagramStyles=ki,exports.useNavigationStyles=nr,exports.useNoKpiStrings=e.h,exports.useOptionTimeStyles=xn,exports.usePolling=B,exports.useRenderHeaderStyles=Un,exports.useSearchControlStrings=e.g,exports.useSelectTimeStyles=bn,exports.useShareDialogStrings=e._,exports.useShowErrorStyles=Gn,exports.useShowMessageStyles=qn,exports.useSpaceStyles=Xe,exports.useSplitPaneStyles=dt,exports.useStackStyles=Qe,exports.useStrings=e.v,exports.useStyles=Oi,exports.useTimeZoneHelper=ne,exports.useUserCardStrings=e.y,exports.useUtils=Ot,exports.useVideoStyles=rr,exports.useWeekViewStyles=Lt,exports.useWorldMapStrings=e.b;
|
|
427
|
+
`,ha=()=>({card:(0,l.css)({width:`100%`,height:`310px`,borderRadius:10,background:i.tokens.colorNeutralBackground1,border:`1px solid ${i.tokens.colorNeutralStroke1}`,boxShadow:i.tokens.shadow8,overflow:`visible`,position:`relative`,padding:`0px 15px !important`,transition:`transform 0.25s ease, box-shadow 0.25s ease`,"&:hover, &:focus-within":{zIndex:10,transform:`translateY(-2px)`,boxShadow:i.tokens.shadow16}}),description:(0,l.css)({fontSize:i.tokens.fontSizeBase300,color:i.tokens.colorNeutralForeground4,lineHeight:i.tokens.lineHeightBase400,position:`relative`,zIndex:1}),footerMetric:(0,l.css)({display:`flex`,flexDirection:`column`,alignItems:`center`,gap:i.tokens.spacingVerticalXXS}),footerIcon:(0,l.css)({color:i.tokens.colorNeutralForeground3,fontSize:i.tokens.fontSizeBase300}),footerLabel:(0,l.css)({fontSize:`${i.tokens.fontSizeBase100} !important`,color:i.tokens.colorNeutralForeground3,textTransform:`uppercase`,letterSpacing:`0.8px`,fontWeight:i.tokens.fontWeightMedium,textAlign:`center`}),footerValue:(0,l.css)({fontSize:`${i.tokens.fontSizeBase400} !important`,fontWeight:i.tokens.fontWeightSemibold,color:i.tokens.colorNeutralForeground2,textAlign:`center`}),footerDivider:(0,l.css)({height:`32px`,borderColor:i.tokens.colorNeutralStroke1}),glowBlob:(0,l.css)({position:`absolute`,top:`-60px`,right:`-60px`,width:`180px`,height:`180px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,filter:`blur(40px)`}),glowBlobSuccess:(0,l.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${i.tokens.colorPaletteLightGreenBackground2} 0%, transparent 70%)`,opacity:.7,filter:`blur(20px)`}),glowBlobError:(0,l.css)({position:`absolute`,top:`-40px`,right:`-40px`,width:`160px`,height:`160px`,borderRadius:`50%`,pointerEvents:`none`,zIndex:0,background:`radial-gradient(circle, ${i.tokens.colorPaletteRedBackground2} 0%, transparent 70%)`,opacity:.6,filter:`blur(20px)`}),headerActionBadge:(0,l.css)({minWidth:`32px`,height:`32px`,borderRadius:`50% !important`,background:`${i.tokens.colorNeutralBackground3} !important`,border:`none !important`,padding:`0 !important`,display:`flex`,alignItems:`center`,justifyContent:`center`}),kpiContainer:(0,l.css)({width:`100%`,backgroundColor:i.tokens.colorNeutralBackground2,borderRadius:8,display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, 280px), 1fr))`,gap:16,padding:16}),iconContainer:(0,l.css)({width:48,height:48,borderRadius:8,display:`grid`,placeItems:`center`,background:i.tokens.colorNeutralBackgroundInverted}),noKpiCard:(0,l.css)({width:280,minHeight:160,display:`flex`,alignItems:`center`,justifyContent:`center`}),noKpiCardContainer:(0,l.css)({width:`100%`,minWidth:`280px`,minHeight:`280px`,borderRadius:`16px`,background:`linear-gradient(135deg, ${i.tokens.colorNeutralBackground1} 0%, ${i.tokens.colorNeutralBackground3} 100%)`,border:`1px solid ${i.tokens.colorNeutralStroke1}`,boxShadow:i.tokens.shadow16,overflow:`hidden`,position:`relative`,padding:`32px`,transition:`transform 0.3s ease, box-shadow 0.3s ease`,"&:hover":{transform:`translateY(-4px)`,boxShadow:i.tokens.shadow28}}),noKpiBackgroundOrb1:(0,l.css)({position:`absolute`,top:`0px`,right:`0px`,width:`180px`,height:`180px`,borderRadius:`50%`,background:`radial-gradient(circle, ${i.tokens.colorBrandBackground2} 0%, transparent 70%)`,opacity:.8,pointerEvents:`none`,filter:`blur(25px)`,transform:`translate(30%, -30%)`}),noKpiBackgroundOrb2:(0,l.css)({position:`absolute`,bottom:`-30px`,left:`-30px`,width:`120px`,height:`120px`,borderRadius:`50%`,background:`radial-gradient(circle, ${i.tokens.colorPaletteLavenderBackground2} 0%, transparent 70%)`,opacity:.5,pointerEvents:`none`,filter:`blur(20px)`}),noKpiIconContainer:(0,l.css)({width:`80px`,height:`80px`,borderRadius:`20px`,background:`linear-gradient(135deg, ${i.tokens.colorBrandBackground} 0%, ${i.tokens.colorBrandBackground2} 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 24px ${i.tokens.colorBrandBackground}40`,animation:`${pa} 3s ease-in-out infinite`,position:`relative`,zIndex:1}),noKpiIcon:(0,l.css)({fontSize:`36px`,color:i.tokens.colorNeutralForegroundOnBrand}),noKpiSparkle1:(0,l.css)({position:`absolute`,top:`-8px`,right:`-8px`,color:i.tokens.colorPaletteYellowForeground1,fontSize:`20px`,animation:`${pa} 2s ease-in-out infinite 0.5s`}),noKpiSparkle2:(0,l.css)({position:`absolute`,bottom:`-4px`,left:`-8px`,color:i.tokens.colorPaletteLavenderForeground2,fontSize:`16px`,animation:`${pa} 2.5s ease-in-out infinite`}),noKpiTitle:(0,l.css)({fontSize:`22px`,fontWeight:i.tokens.fontWeightSemibold,color:i.tokens.colorNeutralForeground1,marginTop:`24px`,textAlign:`center`,position:`relative`,zIndex:1}),noKpiSubtitle:(0,l.css)({fontSize:`14px`,color:i.tokens.colorNeutralForeground3,textAlign:`center`,lineHeight:`1.6`,maxWidth:`320px`,marginTop:`8px`,position:`relative`,zIndex:1}),noKpiHighlight:(0,l.css)({background:`linear-gradient(90deg, ${i.tokens.colorBrandForeground1}, ${i.tokens.colorPaletteLavenderForeground2}, ${i.tokens.colorBrandForeground1})`,backgroundSize:`200% auto`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`,fontWeight:i.tokens.fontWeightSemibold,animation:`${ma} 3s linear infinite`}),noKpiButtonContainer:(0,l.css)({marginTop:`24px`,position:`relative`,zIndex:1}),noKpiButton:(0,l.css)({borderRadius:`10px`,padding:`10px 20px`,fontWeight:i.tokens.fontWeightSemibold,transition:`transform 0.2s ease`,"&:hover":{transform:`scale(1.02)`}}),noKpiDecorativeLine:(0,l.css)({width:`60px`,height:`4px`,borderRadius:`2px`,background:`linear-gradient(90deg, ${i.tokens.colorBrandBackground}, ${i.tokens.colorPaletteLavenderBackground2})`,marginTop:`16px`,position:`relative`,zIndex:1}),footerGrid:(0,l.css)({width:`100%`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(80px, 1fr))`,alignItems:`center`})}),ga=function(e){return e[e.LOWER_IS_BETTER=1]=`LOWER_IS_BETTER`,e[e.HIGHER_IS_BETTER=2]=`HIGHER_IS_BETTER`,e}({}),_a=r=>{let{dataCard:a}=r,o=ha(),s=e.u(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),f=t.useMemo(()=>a.goalMetric===ga.LOWER_IS_BETTER?a.currentValue<=a.goal:a.currentValue>=a.goal,[a.currentValue,a.goal,a.goalMetric]),p=t.useMemo(()=>f?`success`:`error`,[f]),m=t.useMemo(()=>a.goal.toLocaleString(),[a.goal]),h=t.useMemo(()=>a.currentValue/a.totalItems*100,[a.currentValue,a.totalItems]),g=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenForeground2:i.tokens.colorPaletteRedForeground2,[f]),_=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenBackground1:i.tokens.colorPaletteRedBackground1,[f]),v=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenBorder1:i.tokens.colorPaletteRedBorder1,[f]),y=t.useMemo(()=>({background:_,border:`1px solid ${v}`,color:g,borderRadius:`20px`,padding:`12px 12px`,fontSize:i.tokens.fontSizeBase200,fontWeight:i.tokens.fontWeightSemibold,letterSpacing:`0.3px`,maxWidth:`fit-content`}),[_,v,g]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Card,{className:o.card,onMouseLeave:u,"aria-label":`${a.title||s.defaultTitle}: ${a.currentValue} of ${a.goal} ${s.goal}, ${f?s.onTrack:s.exceedGoal}`,children:[(0,n.jsx)(`div`,{className:f?o.glowBlobSuccess:o.glowBlobError}),(0,n.jsxs)(W,{gap:`m`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsxs)(W,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(W,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.InfoLabel,{style:{zIndex:99999},infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:a.description||s.noDescription})}),children:(0,n.jsx)(i.Text,{weight:`bold`,size:300,children:a.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(i.Text,{size:200,style:{color:i.tokens.colorNeutralForeground3,fontStyle:`italic`},children:a.goalMetric===ga.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(i.Tooltip,{content:f?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`description`,children:(0,n.jsx)(i.Badge,{className:o.headerActionBadge,appearance:`ghost`,size:`small`,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{color:g,fontSize:`22px`}}):(0,n.jsx)(d.AlertFilled,{style:{color:g,fontSize:`22px`}})})})}),(0,n.jsxs)(W,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsxs)(i.Text,{weight:`bold`,size:900,children:[a.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(i.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,a.goal,` `,s.goal]})]}),(0,n.jsxs)(W,{gap:`s`,children:[(0,n.jsxs)(W,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(i.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(a.currentValue/a.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(i.ProgressBar,{value:a.currentValue/a.goal,color:p,style:{height:`8px`},shape:`rounded`})]}),(0,n.jsxs)(i.CardFooter,{children:[(0,n.jsx)(i.Tooltip,{content:s.maxAllowedThreshold,relationship:`description`,children:(0,n.jsxs)(W,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.TargetRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:`Goal`}),(0,n.jsx)(i.Text,{className:o.footerValue,children:m})]})}),(0,n.jsx)(i.Divider,{vertical:!0,className:o.footerDivider}),(0,n.jsx)(i.Tooltip,{content:s.totalItemsInScope,relationship:`description`,children:(0,n.jsxs)(W,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.DocumentRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:s.totalItems}),(0,n.jsx)(i.Text,{className:o.footerValue,children:a.totalItems.toLocaleString()})]})}),(0,n.jsx)(i.Divider,{vertical:!0,className:o.footerDivider}),(0,n.jsx)(i.Tooltip,{content:s.currentValueAsPercent,relationship:`description`,children:(0,n.jsxs)(W,{alignItems:`center`,gap:i.tokens.spacingVerticalXXS,children:[(0,n.jsx)(d.CalculatorRegular,{className:o.footerIcon}),(0,n.jsx)(i.Text,{className:o.footerLabel,children:s.percentOfTotal}),(0,n.jsxs)(i.Text,{className:o.footerValue,children:[h.toFixed(2),`%`]})]})})]}),(0,n.jsx)(W,{children:(0,n.jsx)(i.Badge,{appearance:`outline`,size:`small`,style:y,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{fontSize:`14px`}}):(0,n.jsx)(d.AlertFilled,{style:{fontSize:`14px`}}),children:f?s.onTrack:s.exceedGoal})})]})]})})},va=()=>{let e=ha(),t={headerTitle:(0,l.css)({width:`120px`,height:`16px`}),headerBadge:(0,l.css)({width:`32px`,height:`32px`,borderRadius:`50%`}),mainValue:(0,l.css)({width:`80px`,height:`42px`}),goalText:(0,l.css)({width:`70px`,height:`16px`}),progressLabel:(0,l.css)({width:`80px`,height:`12px`}),progressValue:(0,l.css)({width:`50px`,height:`12px`}),progressBar:(0,l.css)({width:`100%`,height:`8px`,borderRadius:`4px`}),footerIcon:(0,l.css)({width:`16px`,height:`16px`,borderRadius:`4px`}),footerLabel:(0,l.css)({width:`50px`,height:`10px`}),footerValue:(0,l.css)({width:`40px`,height:`14px`}),badge:(0,l.css)({width:`90px`,height:`32px`,borderRadius:`20px`})};return(0,n.jsx)(i.Card,{className:e.card,children:(0,n.jsx)(i.Skeleton,{animation:`pulse`,children:(0,n.jsxs)(W,{gap:`m`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsx)(W,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.SkeletonItem,{className:t.headerTitle})}),action:(0,n.jsx)(i.SkeletonItem,{className:t.headerBadge,shape:`circle`})}),(0,n.jsxs)(W,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,paddingTop:`s`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.mainValue}),(0,n.jsx)(i.SkeletonItem,{className:t.goalText})]}),(0,n.jsxs)(W,{gap:`s`,children:[(0,n.jsxs)(W,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.progressLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.progressValue})]}),(0,n.jsx)(i.SkeletonItem,{className:t.progressBar})]}),(0,n.jsxs)(i.CardFooter,{children:[(0,n.jsxs)(W,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(i.Divider,{vertical:!0,style:{height:`32px`,borderColor:i.tokens.colorNeutralStroke1}}),(0,n.jsxs)(W,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]}),(0,n.jsx)(i.Divider,{vertical:!0,style:{height:`32px`,borderColor:i.tokens.colorNeutralStroke1}}),(0,n.jsxs)(W,{direction:`vertical`,alignItems:`center`,gap:`xs`,children:[(0,n.jsx)(i.SkeletonItem,{className:t.footerIcon}),(0,n.jsx)(i.SkeletonItem,{className:t.footerLabel}),(0,n.jsx)(i.SkeletonItem,{className:t.footerValue})]})]}),(0,n.jsx)(W,{children:(0,n.jsx)(i.SkeletonItem,{className:t.badge})})]})})})},ya=`/sites/mock-site/Lists/Directory Status Config`,ba=()=>{let r=ha(),a=e.h(),o=ya,s=t.useCallback(()=>{let e=`${window.location.origin}${o}/AllItems.aspx`;window.open(e,`_blank`)},[o]);return(0,n.jsxs)(i.Card,{className:r.noKpiCardContainer,children:[(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb1}),(0,n.jsx)(`div`,{className:r.noKpiBackgroundOrb2}),(0,n.jsxs)(W,{alignItems:`center`,justifyContent:`center`,gap:`s`,children:[(0,n.jsxs)(`div`,{className:r.noKpiIconContainer,children:[(0,n.jsx)(d.DataBarVerticalStarRegular,{className:r.noKpiIcon}),(0,n.jsx)(d.SparkleRegular,{className:r.noKpiSparkle1}),(0,n.jsx)(d.SparkleRegular,{className:r.noKpiSparkle2})]}),(0,n.jsx)(i.Text,{className:r.noKpiTitle,children:a.title}),(0,n.jsx)(`div`,{className:r.noKpiDecorativeLine}),(0,n.jsxs)(i.Text,{className:r.noKpiSubtitle,children:[a.subtitle.split(`{highlight}`)[0],(0,n.jsx)(`span`,{className:r.noKpiHighlight,children:a.highlightText}),a.subtitle.split(`{highlight}`)[1]]}),(0,n.jsx)(`div`,{className:r.noKpiButtonContainer,children:(0,n.jsx)(i.Button,{appearance:`outline`,icon:(0,n.jsx)(d.SettingsRegular,{}),className:r.noKpiButton,onClick:s,children:a.configureButton})})]})]})},xa=r=>{let{dataCard:a}=r,o=ha(),s=e.u(),[c,l]=t.useState(!1),u=t.useCallback(()=>{l(!1)},[]),f=t.useMemo(()=>a.goalMetric===ga.LOWER_IS_BETTER?a.currentValue<=a.goal:a.currentValue>=a.goal,[a.currentValue,a.goal,a.goalMetric]),p=t.useMemo(()=>f?`success`:`error`,[f]),m=t.useMemo(()=>f?i.tokens.colorPaletteLightGreenForeground2:i.tokens.colorPaletteRedForeground2,[f]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(i.Card,{className:o.card,style:{height:`168px`},onMouseLeave:u,children:[(0,n.jsx)(`div`,{className:f?o.glowBlobSuccess:o.glowBlobError}),(0,n.jsxs)(W,{gap:`0px`,padding:`m`,children:[(0,n.jsx)(i.CardHeader,{header:(0,n.jsxs)(W,{direction:`vertical`,gap:`2px`,children:[(0,n.jsx)(W,{direction:`horizontal`,alignItems:`center`,gap:`8px`,children:(0,n.jsx)(i.InfoLabel,{infoButton:{popover:{open:c,onOpenChange:(e,t)=>l(t.open)}},info:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:a.description||s.noDescription})}),children:(0,n.jsx)(i.Text,{weight:`bold`,size:300,children:a.title?.toUpperCase()||s.defaultTitle})})}),(0,n.jsx)(i.Text,{size:200,style:{color:i.tokens.colorNeutralForeground3,fontStyle:`italic`},children:a.goalMetric===ga.LOWER_IS_BETTER?s.lowerIsBetter:s.higherIsBetter})]}),action:(0,n.jsx)(i.Tooltip,{content:f?`✓ ${s.withinGoalThreshold}`:`⚠ ${s.exceedsGoalThreshold}`,relationship:`inaccessible`,children:(0,n.jsx)(i.Badge,{className:o.headerActionBadge,appearance:`ghost`,size:`small`,icon:f?(0,n.jsx)(d.CheckmarkCircleRegular,{style:{color:m,fontSize:`22px`}}):(0,n.jsx)(d.AlertFilled,{style:{color:m,fontSize:`22px`}})})})}),(0,n.jsxs)(W,{gap:`s`,direction:`horizontal`,alignItems:`baseline`,children:[(0,n.jsxs)(i.Text,{weight:`bold`,size:900,children:[a.currentValue,` `,(0,n.jsx)(`br`,{})]}),(0,n.jsxs)(i.Text,{weight:`semibold`,size:300,color:`neutralSecondary`,children:[`/ `,a.goal,` `,s.goal]})]}),(0,n.jsxs)(W,{gap:`s`,children:[(0,n.jsxs)(W,{direction:`horizontal`,justifyContent:`space-between`,children:[(0,n.jsx)(i.Text,{size:300,color:`neutralSecondary`,children:s.progressGoal}),(0,n.jsxs)(i.Text,{size:300,color:`neutralSecondary`,weight:`bold`,children:[(a.currentValue/a.goal*100).toFixed(2),`%`]})]}),(0,n.jsx)(i.ProgressBar,{value:a.currentValue/a.goal,color:p,style:{height:`3px`},shape:`rounded`})]})]})]})})},Sa=[{identifier:`kpi-1`,title:`Sales Revenue`,currentValue:125,goal:150,totalItems:200,description:`This is a comprehensive description of the Total Sales Revenue KPI for Q1. This metric tracks all revenue generated from product sales, service contracts, and recurring subscriptions across all business units and geographic regions. The goal is set based on historical performance, market conditions, and strategic growth objectives. Performance is evaluated weekly with detailed breakdowns by product category, sales team, and customer segment. This KPI is critical for quarterly business reviews and investor reporting.`,goalMetric:2},{identifier:`kpi-2`,title:`Customer Satisfaction`,currentValue:87,goal:90,totalItems:100,description:`Customer satisfaction score`,goalMetric:1},{identifier:`kpi-3`,title:`Tasks Completed`,currentValue:42,goal:50,totalItems:60,description:`Number of tasks completed this month`,goalMetric:2},{identifier:`kpi-4`,title:`New Customers`,currentValue:156,goal:200,totalItems:250,description:`New customer acquisitions this quarter`,goalMetric:1},{identifier:`kpi-5`,title:`Response Time`,currentValue:2.5,goal:2,totalItems:5,description:`Average response time in hours`,goalMetric:2},{identifier:`kpi-6`,title:`Employee Engagement`,currentValue:78,goal:85,totalItems:100,description:`Employee engagement score percentage`,goalMetric:1}],Ca=e=>{let{skeletonCount:r=3,compact:i=!1}=e,a=ha(),o=Sa;return t.useCallback(()=>Array.from({length:r}).map((e,t)=>(0,n.jsx)(va,{},`kpi-skeleton-${t}`)),[r]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(W,{gap:`l`,direction:`horizontal`,padding:`l`,paddingTop:`s`,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(`div`,{className:a.kpiContainer,children:o.length>0?o.map(e=>i?(0,n.jsx)(xa,{dataCard:e},e.identifier):(0,n.jsx)(_a,{dataCard:e},e.identifier)):(0,n.jsx)(ba,{})})})})})},wa=()=>{let e=t.useRef(``);return e.current||=`fui-`+Math.random().toString(36).slice(2,9),e.current},Ta=e=>{let t=wa(),{theme:r=i.webLightTheme,applicationName:a=t,targetDocument:o=document,applyStylesToPortals:s=!0,className:c,styles:l,children:u}=e;return(0,n.jsx)(i.IdPrefixProvider,{value:a,children:(0,n.jsx)(i.FluentProvider,{theme:r,applyStylesToPortals:s,targetDocument:o,className:c,style:l,children:u})})};exports.AIAssistant=Oi,exports.AISearchControl=ci,exports.AISearchIcon=ii,exports.AISearchIconExample=ui,exports.AdaptiveCardHost=Zr,exports.AdaptiveCardHostThemeType=J,exports.AppDashboard=fa,exports.AspectRatio=nt,exports.Breadcrumb=Dt,exports.ButtonMenu=Ct,exports.CalendarControl=mn,exports.CalendarMonth=$t,exports.Card=Ge,exports.Carousel=ft,exports.Center=at,exports.ChatInput=fi,exports.ChatInputWithMensions=_i,exports.ChatInputWithMensionsV1=ki,exports.ChatList=Ti,exports.Container=st,exports.ContentRenderer=wi,exports.ContentType=V,exports.CustomControlBar=Qn,exports.DataGrid=In,exports.DataGridV2=zn,exports.DropdownField=gn,exports.EBreakPoints=P,exports.ECalendarViews=K,exports.EGoalMetric=ga,exports.EMessageType=F,exports.ErrorType=e.w,exports.FluentUIProvider=Ta,exports.GenericOverFlowMenu=nr,exports.Grid=qe,exports.IconButton=Ot,exports.InputField=vn,exports.ItemPicker=Nn,exports.KPICard=_a,exports.KPICardCompact=xa,exports.KPICardSkeleton=va,exports.Kpis=Ca,exports.Layout=Xe,exports.LayoutItem=Ze,exports.ListItemActivityMessage=na,exports.ListToolbar=Ui,exports.LivePersona=Fi,exports.LocalizationProvider=e.t,exports.LogLevel=e.T,exports.MaplibreWorldMap=xr,exports.MarkdownRenderer=Si,exports.Mensions=mi,exports.MensionsExample=hi,exports.MermaidDiagram=Pi,exports.Navigation=rr,exports.NoKpisCard=ba,exports.OptionTime=kn,exports.Popup=ht,exports.RenderAdaptiveCard=Qr,exports.RenderDialog=Hn,exports.RenderDrawer=Un,exports.RenderHeader=Wn,exports.RenderLabel=_t,exports.RenderSpinner=yt,exports.SearchControl=bn,exports.SelectDay=Xt,exports.SelectMonth=en,exports.SelectTime=jn,exports.SelectView=xn,exports.SelectWeek=an,exports.ShareDialog=Kn,exports.ShowError=Jn,exports.ShowMessage=Xn,exports.Space=$e,exports.SplitPane=mt,exports.Stack=H,exports.StackItem=tt,exports.StackV2=W,exports.StackedUsers=Qi,exports.TIME_RADIO_GROUP=wn,exports.TypographyControl=St,exports.UniversalProvider=L,exports.UserCard=Xi,exports.VideoPlayer=or,exports.cloneDeep=Ee,exports.debounce=we,exports.deepMerge=e.S,exports.defaultCalendarControlStrings=un,exports.defaultCalendarMonthStrings=Qt,exports.defaultSelectWeekStrings=tn,exports.detectContentType=He,exports.en=e.C,exports.every=Ie,exports.filter=Pe,exports.formatTime=En,exports.get=Oe,exports.getContentType=Ue,exports.groupBy=Me,exports.isEmpty=De,exports.map=Ne,exports.set=ke,exports.some=Fe,exports.throttle=Te,exports.timeKey=Dn,exports.uniq=Ae,exports.uniqBy=je,exports.useAIAssistantStrings=e.n,exports.useAISearchControlStrings=e.r,exports.useAppDashboardStrings=e.i,exports.useApplicationContext=R,exports.useAspectRatioStyles=rt,exports.useBrandCenterFonts=_e,exports.useCalendar=Ut,exports.useCalendarStrings=e.a,exports.useCalendarStyles=It,exports.useCenterStyles=it,exports.useCommonStrings=e.o,exports.useComponentStrings=e.s,exports.useComponentUtils=B,exports.useDataGridStyles=Fn,exports.useDateUtils=be,exports.useDayViewStyles=Wt,exports.useGraphAPI=te,exports.useGridStyles=Ke,exports.useImageUtils=Ce,exports.useIndexedDBCache=ne,exports.useInputFieldStrings=e.c,exports.useItemPickerStrings=e.l,exports.useKpiStrings=e.u,exports.useLayoutStyles=Je,exports.useListItemActivityStrings=e.d,exports.useLocalization=e.f,exports.useLogging=z,exports.useMensionsStrings=e.p,exports.useMensionsStyles=pi,exports.useMermaidDiagramStrings=e.m,exports.useMermaidDiagramStyles=ji,exports.useNavigationStyles=ir,exports.useNoKpiStrings=e.h,exports.useOptionTimeStyles=Cn,exports.usePolling=re,exports.useRenderHeaderStyles=Gn,exports.useSearchControlStrings=e.g,exports.useSelectTimeStyles=Sn,exports.useShareDialogStrings=e._,exports.useShowErrorStyles=qn,exports.useShowMessageStyles=Yn,exports.useSpaceStyles=Qe,exports.useSplitPaneStyles=pt,exports.useStackStyles=et,exports.useStrings=e.v,exports.useStyles=Ai,exports.useTimeZoneHelper=ie,exports.useUserCardStrings=e.y,exports.useUtils=At,exports.useVideoStyles=ar,exports.useWeekViewStyles=zt,exports.useWorldMapStrings=e.b;
|
|
428
428
|
//# sourceMappingURL=index.cjs.map
|