"use strict";(self.webpackChunk_1js_files_in_taskbar=self.webpackChunk_1js_files_in_taskbar||[]).push([[3803],{37308:(e,r,n)=>{n.d(r,{Ay:()=>a,Pl:()=>t,lV:()=>o});n(31033);const t="mssxsb",i=new RegExp(`^${t}`),s=new RegExp(`^${t}-(.+)-plugin$`);function a(e,r,n){if(!window.customElements)return e;if(!i.test(e))throw new Error("Missing prefix.");if(!customElements.get(e)){customElements.define(e,r,n),Object.defineProperty(r,"tagName",{value:e,writable:!1}),(null==n?void 0:n.extends)&&Object.defineProperty(r,"extends",{value:n.extends,writable:!1});const t=s.exec(e);t&&Object.defineProperty(r,"pluginId",{value:t[1],writable:!1})}return e}function o(e){return`${t}-${e}`}},83205:(e,r,n)=>{n.d(r,{uJ:()=>t,wt:()=>i});n(87847),n(39583),n(31033),n(4589);function t(e){return!e}function i(e){let r=0;if(0===e.length)return r;for(let n=0;n<e.length;n++){r=(r<<5)-r+e.charCodeAt(n),r&=r}return r}},57842:(e,r,n)=>{n.d(r,{V:()=>k,y:()=>j});var t=n(78323),i=n(5358),s=(n(39552),n(67114)),a=n(45801),o=n(72904),u=n(83205);const c=n.p+"assets/images/calendarbadge.ico",l=n.p+"assets/images/lightbulbbadge.ico",g=n.p+"assets/images/numeric-1.ico",d=n.p+"assets/images/numeric-2.ico",f=n.p+"assets/images/numeric-3.ico",m=n.p+"assets/images/numeric-3plus.ico",p=["None","UpdateAvailable","UpdateComplete"],b=["Calendar","WNT","Iris","TaskbarPinning","Numeric1","Numeric2","Numeric3","Numeric3Plus"],w=["Glyph","Numeric"],N={Calendar:c,WNT:l,TaskbarPinning:l,Iris:"",Numeric1:g,Numeric2:d,Numeric3:f,Numeric3Plus:m},E={LightBulbBadge:l,None:""},h=async(e,r)=>{if((0,o.RN)(i.bo)&&(0,o.RN)(i.b0)){if((e=>p.includes(e))(e))return await(0,i.b0)(e);if((e=>b.includes(e))(e)){if(!(0,u.uJ)(N[e])){const r=N[e];return await(0,i.bo)(r)}if(void 0!==r&&"Iris"===e&&"string"==typeof r){const e=E[r]??"";return await(0,i.bo)(e)}}if((e=>w.includes(e))(e)&&void 0!==r){if("Glyph"===e&&(0,o.RN)(i.q1)){const e=r;return await(0,i.q1)(e)}if("Numeric"===e&&"number"==typeof r&&(0,o.RN)(i.H9))return await(0,i.H9)(r)}await(async()=>(0,o.RN)(i.XV)?await(0,i.XV)():(0,o.RN)(i.b0)?await(0,i.b0)("None"):void 0)(),s.vF.log(a.zQJ)}else s.vF.log(a.xV$)};var y=n(40204),v=n(41315),x=n(71124),C=n(50089),P=n(20568),R=n(38357);const A=e=>{const r={};if(!e)return null;if(!e.innerErrors&&!e.innerError)return e.message;if(!e.innerErrors&&e.innerError)return e.innerError.message;const n=e=>{if(e)for(const t of e)"innerErrors"in t?n(t.innerErrors):"innerError"in t&&t.innerError?r[t.innerError.message]=!0:r[t.message]=!0};return n(e.innerErrors),Object.keys(r).map((e=>e)).join(", ")},F=(()=>{const e=new Map;let r,n=0,i=0;const s=e=>{n!==i&&e("Numeric",n).then((()=>{i=n}),(()=>{console.error("### WinAppBadgeAPI: Badge update failed!")}))},a=()=>{n=[...e.values()||[]].reduce(((e,r)=>e+r),0),r||(r=setInterval(s,1500,h))};return{adjustCounter:(r,n)=>(e.set(r,Math.max((e.get(r)||0)+n,0)),a(),e.get(r)),getCounter:r=>e.get(r)||0,getBadgeValue:()=>i,getTotalCount:()=>n,registerCounter:()=>{const r=(0,t.A)();return e.set(r,0),r},resetCounter:r=>{e.set(r,0),a()},setCounter:(r,n)=>{e.set(r,Math.max(n,0)),a()},setBadge:(e,r)=>h(e,r)}})(),_=(0,v.A)((e=>{(0,P.zw)(e)}),1e3);function k(){return{onSuggestionRendered:()=>R.M_.dispatch((0,y.Dx)("Success")),onErrorPageShown:e=>{R.M_.dispatch((0,y.Dx)("Error")),_(new Error(`Suggestions failed to load/render, details:${A(e)||"None"}`))},localFiles:{localFileFetchers:{getDownloadedLocalFiles:i.yM,getRecentLocalFiles:i.yF},localFileActions:{triggerLocalFileAction:i.GB}},badgeApi:F}}function j(){x.useEffect((()=>{C.b.instrumenterReady.then((e=>{e.setProps(k())}))}),[])}}}]);