import{t as e}from"./defineProperty-BbfpZ9Tg.js";import{U as t,q as n}from"./test.id-DxQrYxPk.js";var r=function(e){return e.successToast=`successToast`,e.loadingToast=`loadingToast`,e.topTips=`topTips`,e.dialog=`dialog`,e.textInputDialog=`textInputDialog`,e.dateTimePicker=`dateTimePicker`,e.actionSheet=`actionSheet`,e.notebookPicker=`notebookPicker`,e.identityPicker=`identityPicker`,e.imagePreview=`imagePreview`,e.videoPreview=`videoPreview`,e.videoPlayer=`videoPlayer`,e.longPressMenu=`longPressMenu`,e.voiceRecording=`voiceRecording`,e}({}),i=(function(){if(typeof crypto==`object`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID.bind(crypto);let e;e=typeof crypto==`object`&&typeof crypto.getRandomValues==`function`?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e};let t=new Uint8Array(16),n=[];for(let e=0;e<256;e++)n.push(e.toString(16).padStart(2,`0`));return function(){e(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=0,i=``;return i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i+=`-`,i+=n[t[r++]],i+=n[t[r++]],i+=`-`,i+=n[t[r++]],i+=n[t[r++]],i+=`-`,i+=n[t[r++]],i+=n[t[r++]],i+=`-`,i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i+=n[t[r++]],i}})(),a=class{constructor(){e(this,`_serviceBrand`,void 0),e(this,`overlays`,new Map),e(this,`_onOverlayChange`,new t),e(this,`onOverlayChange`,this._onOverlayChange.event)}getOverlay(e){return this.overlays.get(e)??null}createOverlay(e,t,n,r){let a=i();this.overlays.get(t)?.dispose();let o=r({type:e,instanceId:a,zIndex:n});return this.overlays.set(t,Object.assign(o,{instanceId:a})),this._onOverlayChange.fire(),o}removeOverlayById(e){let t=this.overlays.get(e);t&&(this.overlays.delete(e),this._onOverlayChange.fire(),t.dispose())}removeOverlay(e){let t=Array.from(this.overlays.keys()).find(t=>this.overlays.get(t)?.instanceId===e);t&&(this.overlays.delete(t),this._onOverlayChange.fire())}},o=n(`IWorkbenchOverlayService`);export{a as n,r,o as t};
//# sourceMappingURL=WorkbenchOverlayService-D9CSrozm.js.map