1 |
- (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.outsystemsSynapse={}))})(this,function(t){"use strict";function n(e){e.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return new Proxy({},{get(y,i){return(f,d,r)=>{const a=e.Capacitor.Plugins[o];if(a===void 0){r(new Error(`Capacitor plugin ${o} not found`));return}if(typeof a[i]!="function"){r(new Error(`Method ${i} not found in Capacitor plugin ${o}`));return}(async()=>{try{const s=await a[i](f);d(s)}catch(s){r(s)}})()}}})}})}function c(e){e.CapacitorUtils.Synapse=new Proxy({},{get(u,o){return e.cordova.plugins[o]}})}function p(e=!1){window.CapacitorUtils=window.CapacitorUtils||{},window.Capacitor!==void 0&&!e?n(window):window.cordova!==void 0&&c(window)}t.exposeSynapse=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|