"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@aplus-frontend/oss");let a,c,n;function i(e,t,s){a=e,c=t,s&&(n=s)}const l={"zh-cn":"zh_CN",en:"en_US"};function g(){return l[c.value]??"zh_CN"}async function p({bucket:e}={}){if(!n)throw new Error(`${a("ap.apUpload.pleasePass")}getOssAccess`);const t=await(e?n(e):n()),s=r.createOssInstance();return await s.initOssClient({getOssAccess:async()=>t,locale:g(),onFailure:o=>{throw new Error(typeof o?.message=="string"?o.message:a("ap.apUpload.FailedToObtainOssTemporaryPermissions"))}}),{oss:s,bucket:t?.bucket}}exports.getOssInstance=p;exports.injectHookOss=i;
