1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7014],{37014:(r,e,t)=>{t.d(e,{callFn:()=>s,callPublicFn:()=>i});var a=t(71931),n=t(76458),o=t(19548);async function s(r,e){if(!n.functions)throw Error("Firebase Functions æªåå§å");if(!n.auth)throw Error("Firebase Auth æªåå§å");if(!n.auth.currentUser)throw Error("ç¨æ¶æªç»å
¥ï¼è«å
ç»å
¥å¾åä½¿ç¨æ¤åè½");try{if(!await n.auth.currentUser.getIdToken(!0))throw Error("ç¡æ³åå¾èªè token")}catch(e){let r=e instanceof Error?e:Error(String(e));throw o.Cp(r,{level:"error",extra:{message:"å·æ° ID Token 失æ",operation:"callFn.getIdToken"},tags:{source:"firebase.callFn"}}),Error("èªè失æï¼è«éæ°ç»å
¥")}if(!n.app)throw Error("Firebase App æªåå§å");if(n.functions&&"app"in n.functions&&n.auth&&"app"in n.auth){let r=n.functions.app,e=n.auth.app;if(r!==e)throw o.Cp(Error("Firebase App mismatch"),{level:"error",extra:{message:"Firebase App 實ä¾ä¸ä¸è´",functionsAppName:r?.name,authAppName:e?.name,appName:n.app?.name},tags:{source:"firebase.callFn"}}),Error("Firebase App 實ä¾ä¸ä¸è´ï¼è«éæ°åå§å")}let t=(0,a.httpsCallable)(n.functions,r);try{return await t(e)}catch(i){let t=i?.code||"",s=String(i?.message||"");if("unauthenticated"===t||"permission-denied"===t||s.includes("unauth")||s.includes("401")||s.includes("Unauthorized"))try{if(!n.auth.currentUser)throw Error("ç¨æ¶å·²ç»åºï¼è«éæ°ç»å
¥");await n.auth.currentUser.getIdToken(!0),await new Promise(r=>setTimeout(r,100));let t=(0,a.httpsCallable)(n.functions,r);return await t(e)}catch(e){throw o.Cp(e instanceof Error?e:Error(String(e)),{level:"error",extra:{message:`é試失æ: ${r}`,operation:"callFn.retry",code:e?.code},tags:{source:"firebase.callFn"}}),Error(e?.message||"èªè失æï¼è«éæ°ç»å
¥å¾å試")}throw i}}async function i(r,e){if(!n.functions)throw Error("Firebase Functions æªåå§å");return(0,a.httpsCallable)(n.functions,r)(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.