try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`eaf9e027-ddd6-4b79-a1d1-c6440c1c2c75`,e._sentryDebugIdIdentifier=`sentry-dbid-eaf9e027-ddd6-4b79-a1d1-c6440c1c2c75`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Vc as e,jh as t}from"./entry.client-mpghtlrl.js";function n(e,t){let n=e.find(e=>e.key===t)?.value;if(typeof n==`string`)return n;if(Array.isArray(n)&&typeof n[0]==`string`)return n[0]}var r=`getOssNotices-response`,i=`getOssNotices`,a=3e4,o=0,s=class e extends Error{constructor(t,n){super(t,n),this.name=`GetOSSNoticesError`,Object.setPrototypeOf(this,e.prototype)}};async function c(c=a){if(!t())throw new e;let l=`${tizen.application.getCurrentApplication().appInfo.packageId}.Service`,u=tizen.messageport.requestLocalMessagePort(r),d=(++o).toString();return new Promise((e,t)=>{let{ApplicationControl:a,ApplicationControlData:o}=tizen,f=!1,p,m,h=()=>{if(m!==void 0&&(clearTimeout(m),m=void 0),p!==void 0){try{u.removeMessagePortListener(p)}catch{}p=void 0}},g=t=>{f||(f=!0,h(),e(t))},_=e=>{f||(f=!0,h(),t(e))};p=u.addMessagePortListener(e=>{if(n(e,`responseId`)!==d)return;let t=n(e,r);if(t===void 0){_(new s(`Malformed getOssNotices response: missing or non-string payload`));return}g(t)}),m=setTimeout(()=>{_(new s(`getOssNotices timed out after ${c.toString()} ms`))},c);let v=new a(i,null,null,null,[new o(`requestId`,[d])]);try{tizen.application.launchAppControl(v,l,()=>{},e=>{_(new s(`Failed to launch bgservice for getOssNotices: ${e.toString()}`,{cause:e}))})}catch(e){_(new s(`Failed to launch bgservice for getOssNotices: ${String(e)}`,{cause:e}))}})}var l=class{async getOSSNotices(){return await c()}};export{l as TizenOSSNoticesAdaptor};