tevrocsdk 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tevroc-sdk.esm.js +18 -0
- package/tevroc-sdk.min.js +1 -1
- package/tevroc-sdk.umd.js +18 -0
package/package.json
CHANGED
package/tevroc-sdk.esm.js
CHANGED
|
@@ -4796,10 +4796,28 @@ function createAuthApi(client) {
|
|
|
4796
4796
|
if (result.token) client.setToken(result.token);
|
|
4797
4797
|
return result;
|
|
4798
4798
|
},
|
|
4799
|
+
// base44
|
|
4800
|
+
loginWithProvider: (provider, redirectTo) => {
|
|
4801
|
+
if (provider === "google") {
|
|
4802
|
+
createGoogleLogin({ serviceUrl: client.serviceUrl, redirectTo });
|
|
4803
|
+
if (redirectTo) {
|
|
4804
|
+
subscribeGoogleLogin(async (user, err) => {
|
|
4805
|
+
const result = await client.request("/provider/google/auth/login", {
|
|
4806
|
+
method: "POST",
|
|
4807
|
+
body: { user },
|
|
4808
|
+
auth: false
|
|
4809
|
+
});
|
|
4810
|
+
window.location.href = redirectTo;
|
|
4811
|
+
});
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
},
|
|
4815
|
+
// extra
|
|
4799
4816
|
googleLogin: (params) => createGoogleLogin(params),
|
|
4800
4817
|
onGoogleLogin: (callback) => {
|
|
4801
4818
|
return subscribeGoogleLogin(callback);
|
|
4802
4819
|
},
|
|
4820
|
+
//
|
|
4803
4821
|
async login(input) {
|
|
4804
4822
|
const result = await client.request("/auth/login", { method: "POST", body: input, auth: false });
|
|
4805
4823
|
if (result.token) client.setToken(result.token);
|
package/tevroc-sdk.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Tevroc=(()=>{var jt=Object.create;var le=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty;var H=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Je=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},ue=(t,e)=>{for(var n in e)le(t,n,{get:e[n],enumerable:!0})},Ke=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ht(e))!Ft.call(t,i)&&i!==n&&le(t,i,{get:()=>e[i],enumerable:!(r=Mt(e,i))||r.enumerable});return t};var Ze=(t,e,n)=>(n=t!=null?jt(Bt(t)):{},Ke(e||!t||!t.__esModule?le(n,"default",{value:t,enumerable:!0}):n,t)),Gt=t=>Ke(le({},"__esModule",{value:!0}),t);var lt=Je(l=>{"use strict";var Ce=Symbol.for("react.transitional.element"),Yt=Symbol.for("react.portal"),Vt=Symbol.for("react.fragment"),Jt=Symbol.for("react.strict_mode"),Kt=Symbol.for("react.profiler"),Zt=Symbol.for("react.consumer"),Qt=Symbol.for("react.context"),Xt=Symbol.for("react.forward_ref"),en=Symbol.for("react.suspense"),tn=Symbol.for("react.memo"),nt=Symbol.for("react.lazy"),nn=Symbol.for("react.activity"),Qe=Symbol.iterator;function rn(t){return t===null||typeof t!="object"?null:(t=Qe&&t[Qe]||t["@@iterator"],typeof t=="function"?t:null)}var rt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},it=Object.assign,st={};function F(t,e,n){this.props=t,this.context=e,this.refs=st,this.updater=n||rt}F.prototype.isReactComponent={};F.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};F.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ot(){}ot.prototype=F.prototype;function Te(t,e,n){this.props=t,this.context=e,this.refs=st,this.updater=n||rt}var Pe=Te.prototype=new ot;Pe.constructor=Te;it(Pe,F.prototype);Pe.isPureReactComponent=!0;var Xe=Array.isArray;function Ee(){}var h={H:null,A:null,T:null,S:null},at=Object.prototype.hasOwnProperty;function Ae(t,e,n){var r=n.ref;return{$$typeof:Ce,type:t,key:e,ref:r!==void 0?r:null,props:n}}function sn(t,e){return Ae(t.type,e,t.props)}function Se(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ce}function on(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var et=/\/+/g;function ve(t,e){return typeof t=="object"&&t!==null&&t.key!=null?on(""+t.key):e.toString(36)}function an(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Ee,Ee):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function B(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"bigint":case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Ce:case Yt:a=!0;break;case nt:return a=t._init,B(a(t._payload),e,n,r,i)}}if(a)return i=i(t),a=r===""?"."+ve(t,0):r,Xe(i)?(n="",a!=null&&(n=a.replace(et,"$&/")+"/"),B(i,e,n,"",function(w){return w})):i!=null&&(Se(i)&&(i=sn(i,n+(i.key==null||t&&t.key===i.key?"":(""+i.key).replace(et,"$&/")+"/")+a)),e.push(i)),1;a=0;var u=r===""?".":r+":";if(Xe(t))for(var c=0;c<t.length;c++)r=t[c],o=u+ve(r,c),a+=B(r,e,n,o,i);else if(c=rn(t),typeof c=="function")for(t=c.call(t),c=0;!(r=t.next()).done;)r=r.value,o=u+ve(r,c++),a+=B(r,e,n,o,i);else if(o==="object"){if(typeof t.then=="function")return B(an(t),e,n,r,i);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return a}function ce(t,e,n){if(t==null)return t;var r=[],i=0;return B(t,r,"","",function(o){return e.call(n,o,i++)}),r}function ln(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var tt=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},un={map:ce,forEach:function(t,e,n){ce(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return ce(t,function(){e++}),e},toArray:function(t){return ce(t,function(e){return e})||[]},only:function(t){if(!Se(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};l.Activity=nn;l.Children=un;l.Component=F;l.Fragment=Vt;l.Profiler=Kt;l.PureComponent=Te;l.StrictMode=Jt;l.Suspense=en;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=h;l.__COMPILER_RUNTIME={__proto__:null,c:function(t){return h.H.useMemoCache(t)}};l.cache=function(t){return function(){return t.apply(null,arguments)}};l.cacheSignal=function(){return null};l.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=it({},t.props),i=t.key;if(e!=null)for(o in e.key!==void 0&&(i=""+e.key),e)!at.call(e,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&e.ref===void 0||(r[o]=e[o]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+2];r.children=a}return Ae(t.type,i,r)};l.createContext=function(t){return t={$$typeof:Qt,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Zt,_context:t},t};l.createElement=function(t,e,n){var r,i={},o=null;if(e!=null)for(r in e.key!==void 0&&(o=""+e.key),e)at.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return Ae(t,o,i)};l.createRef=function(){return{current:null}};l.forwardRef=function(t){return{$$typeof:Xt,render:t}};l.isValidElement=Se;l.lazy=function(t){return{$$typeof:nt,_payload:{_status:-1,_result:t},_init:ln}};l.memo=function(t,e){return{$$typeof:tn,type:t,compare:e===void 0?null:e}};l.startTransition=function(t){var e=h.T,n={};h.T=n;try{var r=t(),i=h.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Ee,tt)}catch(o){tt(o)}finally{e!==null&&n.types!==null&&(e.types=n.types),h.T=e}};l.unstable_useCacheRefresh=function(){return h.H.useCacheRefresh()};l.use=function(t){return h.H.use(t)};l.useActionState=function(t,e,n){return h.H.useActionState(t,e,n)};l.useCallback=function(t,e){return h.H.useCallback(t,e)};l.useContext=function(t){return h.H.useContext(t)};l.useDebugValue=function(){};l.useDeferredValue=function(t,e){return h.H.useDeferredValue(t,e)};l.useEffect=function(t,e){return h.H.useEffect(t,e)};l.useEffectEvent=function(t){return h.H.useEffectEvent(t)};l.useId=function(){return h.H.useId()};l.useImperativeHandle=function(t,e,n){return h.H.useImperativeHandle(t,e,n)};l.useInsertionEffect=function(t,e){return h.H.useInsertionEffect(t,e)};l.useLayoutEffect=function(t,e){return h.H.useLayoutEffect(t,e)};l.useMemo=function(t,e){return h.H.useMemo(t,e)};l.useOptimistic=function(t,e){return h.H.useOptimistic(t,e)};l.useReducer=function(t,e,n){return h.H.useReducer(t,e,n)};l.useRef=function(t){return h.H.useRef(t)};l.useState=function(t){return h.H.useState(t)};l.useSyncExternalStore=function(t,e,n){return h.H.useSyncExternalStore(t,e,n)};l.useTransition=function(){return h.H.useTransition()};l.version="19.2.7"});var ke=Je((Bn,ut)=>{"use strict";ut.exports=lt()});var G,J,cn,dn,hn,Re,D,R,ct,dt,Oe,Fn,pn,fn,wn,yn,Le,Gn,ht,pt,xe,Yn,K=H(()=>{(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(G||(G={}));J=class extends Error{constructor(e,n,r){super(e),this.message=e,this.code=n,this.data=r}},cn=t=>{var e,n;return t?.androidBridge?"android":!((n=(e=t?.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},dn=t=>{let e=t.CapacitorCustomPlatform||null,n=t.Capacitor||{},r=n.Plugins=n.Plugins||{},i=()=>e!==null?e.name:cn(t),o=()=>i()!=="web",a=d=>{let p=w.get(d);return!!(p?.platforms.has(i())||u(d))},u=d=>{var p;return(p=n.PluginHeaders)===null||p===void 0?void 0:p.find(se=>se.name===d)},c=d=>t.console.error(d),w=new Map,v=(d,p={})=>{let se=w.get(d);if(se)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),se.proxy;let U=i(),M=u(d),k,qt=async()=>(!k&&U in p?k=typeof p[U]=="function"?k=await p[U]():k=p[U]:e!==null&&!k&&"web"in p&&(k=typeof p.web=="function"?k=await p.web():k=p.web),k),Nt=(m,_)=>{var P,L;if(M){let x=M?.methods.find(T=>_===T.name);if(x)return x.rtype==="promise"?T=>n.nativePromise(d,_.toString(),T):(T,oe)=>n.nativeCallback(d,_.toString(),T,oe);if(m)return(P=m[_])===null||P===void 0?void 0:P.bind(m)}else{if(m)return(L=m[_])===null||L===void 0?void 0:L.bind(m);throw new J(`"${d}" plugin is not implemented on ${U}`,G.Unimplemented)}},be=m=>{let _,P=(...L)=>{let x=qt().then(T=>{let oe=Nt(T,m);if(oe){let ae=oe(...L);return _=ae?.remove,ae}else throw new J(`"${d}.${m}()" is not implemented on ${U}`,G.Unimplemented)});return m==="addListener"&&(x.remove=async()=>_()),x};return P.toString=()=>`${m.toString()}() { [capacitor code] }`,Object.defineProperty(P,"name",{value:m,writable:!1,configurable:!1}),P},Ye=be("addListener"),Ve=be("removeListener"),zt=(m,_)=>{let P=Ye({eventName:m},_),L=async()=>{let T=await P;Ve({eventName:m,callbackId:T},_)},x=new Promise(T=>P.then(()=>T({remove:L})));return x.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await L()},x},_e=new Proxy({},{get(m,_){switch(_){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return M?zt:Ye;case"removeListener":return Ve;default:return be(_)}}});return r[d]=_e,w.set(d,{name:d,proxy:_e,platforms:new Set([...Object.keys(p),...M?[U]:[]])}),_e};return n.convertFileSrc||(n.convertFileSrc=d=>d),n.getPlatform=i,n.handleError=c,n.isNativePlatform=o,n.isPluginAvailable=a,n.registerPlugin=v,n.Exception=J,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},hn=t=>t.Capacitor=dn(t),Re=hn(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),D=Re.registerPlugin,R=class{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,n){let r=!1;this.listeners[e]||(this.listeners[e]=[],r=!0),this.listeners[e].push(n);let o=this.windowListeners[e];o&&!o.registered&&this.addWindowListener(o),r&&this.sendRetainedArgumentsForEvent(e);let a=async()=>this.removeListener(e,n);return Promise.resolve({remove:a})}async removeAllListeners(){this.listeners={};for(let e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n,r){let i=this.listeners[e];if(!i){if(r){let o=this.retainedEventArguments[e];o||(o=[]),o.push(n),this.retainedEventArguments[e]=o}return}i.forEach(o=>o(n))}hasListeners(e){var n;return!!(!((n=this.listeners[e])===null||n===void 0)&&n.length)}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(e="not implemented"){return new Re.Exception(e,G.Unimplemented)}unavailable(e="not available"){return new Re.Exception(e,G.Unavailable)}async removeListener(e,n){let r=this.listeners[e];if(!r)return;let i=r.indexOf(n);this.listeners[e].splice(i,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let n=this.retainedEventArguments[e];n&&(delete this.retainedEventArguments[e],n.forEach(r=>{this.notifyListeners(e,r)}))}},ct=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),dt=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent),Oe=class extends R{async getCookies(){let e=document.cookie,n={};return e.split(";").forEach(r=>{if(r.length<=0)return;let[i,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");i=dt(i).trim(),o=dt(o).trim(),n[i]=o}),n}async setCookie(e){try{let n=ct(e.key),r=ct(e.value),i=e.expires?`; expires=${e.expires.replace("expires=","")}`:"",o=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${r||""}${i}; path=${o}; ${a};`}catch(n){return Promise.reject(n)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{let e=document.cookie.split(";")||[];for(let n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}},Fn=D("CapacitorCookies",{web:()=>new Oe}),pn=async t=>new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{let i=r.result;e(i.indexOf(",")>=0?i.split(",")[1]:i)},r.onerror=i=>n(i),r.readAsDataURL(t)}),fn=(t={})=>{let e=Object.keys(t);return Object.keys(t).map(i=>i.toLocaleLowerCase()).reduce((i,o,a)=>(i[o]=t[e[a]],i),{})},wn=(t,e=!0)=>t?Object.entries(t).reduce((r,i)=>{let[o,a]=i,u,c;return Array.isArray(a)?(c="",a.forEach(w=>{u=e?encodeURIComponent(w):w,c+=`${o}=${u}&`}),c.slice(0,-1)):(u=e?encodeURIComponent(a):a,c=`${o}=${u}`),`${r}&${c}`},"").substr(1):null,yn=(t,e={})=>{let n=Object.assign({method:t.method||"GET",headers:t.headers},e),i=fn(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(i.includes("application/x-www-form-urlencoded")){let o=new URLSearchParams;for(let[a,u]of Object.entries(t.data||{}))o.set(a,u);n.body=o.toString()}else if(i.includes("multipart/form-data")||t.data instanceof FormData){let o=new FormData;if(t.data instanceof FormData)t.data.forEach((u,c)=>{o.append(c,u)});else for(let u of Object.keys(t.data))o.append(u,t.data[u]);n.body=o;let a=new Headers(n.headers);a.delete("content-type"),n.headers=a}else(i.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n},Le=class extends R{async request(e){let n=yn(e,e.webFetchExtra),r=wn(e.params,e.shouldEncodeUrlParams),i=r?`${e.url}?${r}`:e.url,o=await fetch(i,n),a=o.headers.get("content-type")||"",{responseType:u="text"}=o.ok?e:{};a.includes("application/json")&&(u="json");let c,w;switch(u){case"arraybuffer":case"blob":w=await o.blob(),c=await pn(w);break;case"json":c=await o.json();break;default:c=await o.text()}let v={};return o.headers.forEach((d,p)=>{v[p]=d}),{data:c,headers:v,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}},Gn=D("CapacitorHttp",{web:()=>new Le});(function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"})(ht||(ht={}));(function(t){t.StatusBar="StatusBar",t.NavigationBar="NavigationBar"})(pt||(pt={}));xe=class extends R{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}},Yn=D("SystemBars",{web:()=>new xe})});var ft={};ue(ft,{AppWeb:()=>Ie});var Ie,wt=H(()=>{K();Ie=class extends R{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}async toggleBackButtonHandler(){throw this.unimplemented("Not implemented on web.")}async getAppLanguage(){return{value:navigator.language.split("-")[0].toLowerCase()}}}});var yt={};ue(yt,{Browser:()=>mn,BrowserWeb:()=>de});var de,mn,mt=H(()=>{K();de=class extends R{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||"_blank")}async close(){return new Promise((e,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,e()):n("No active window to close!")})}},mn=new de});function y(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function W(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}var gt=H(()=>{});function Ue(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function s(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var q,E,Y,pe,fe,b,bt,we,N=H(()=>{gt();b="__TAURI_TO_IPC_KEY__";bt=class{constructor(e){q.set(this,void 0),E.set(this,0),Y.set(this,[]),pe.set(this,void 0),W(this,q,e||(()=>{}),"f"),this.id=Ue(n=>{let r=n.index;if("end"in n){r==y(this,E,"f")?this.cleanupCallback():W(this,pe,r,"f");return}let i=n.message;if(r==y(this,E,"f")){for(y(this,q,"f").call(this,i),W(this,E,y(this,E,"f")+1,"f");y(this,E,"f")in y(this,Y,"f");){let o=y(this,Y,"f")[y(this,E,"f")];y(this,q,"f").call(this,o),delete y(this,Y,"f")[y(this,E,"f")],W(this,E,y(this,E,"f")+1,"f")}y(this,E,"f")===y(this,pe,"f")&&this.cleanupCallback()}else y(this,Y,"f")[r]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){W(this,q,e,"f")}get onmessage(){return y(this,q,"f")}[(q=new WeakMap,E=new WeakMap,Y=new WeakMap,pe=new WeakMap,b)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[b]()}};we=class{get rid(){return y(this,fe,"f")}constructor(e){fe.set(this,void 0),W(this,fe,e,"f")}async close(){return s("plugin:resources|close",{rid:this.rid})}};fe=new WeakMap});var vt={};ue(vt,{TauriEvent:()=>f,emit:()=>X,emitTo:()=>ee,listen:()=>I,once:()=>z});async function _t(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await s("plugin:event|unlisten",{event:t,eventId:e})}async function I(t,e,n){var r;let i=typeof n?.target=="string"?{kind:"AnyLabel",label:n.target}:(r=n?.target)!==null&&r!==void 0?r:{kind:"Any"};return s("plugin:event|listen",{event:t,target:i,handler:Ue(e)}).then(o=>async()=>_t(t,o))}async function z(t,e,n){return I(t,r=>{_t(t,r.id),e(r)},n)}async function X(t,e){await s("plugin:event|emit",{event:t,payload:e})}async function ee(t,e,n){await s("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:n})}var f,te=H(()=>{N();(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(f||(f={}))});var jn={};ue(jn,{TevrocClient:()=>ge,TevrocError:()=>j,createClient:()=>Cn});var Fe=Ze(ke(),1);K();var $e=D("App",{web:()=>Promise.resolve().then(()=>(wt(),ft)).then(t=>new t.AppWeb)});K();var he=D("Browser",{web:()=>Promise.resolve().then(()=>(mt(),yt)).then(t=>new t.BrowserWeb)});N();var Z=class{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new A(this.width*e,this.height*e)}[b](){return{width:this.width,height:this.height}}toJSON(){return this[b]()}},A=class{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new Z(this.width/e,this.height/e)}[b](){return{width:this.width,height:this.height}}toJSON(){return this[b]()}},C=class{constructor(e){this.size=e}toLogical(e){return this.size instanceof Z?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof A?this.size:this.size.toPhysical(e)}[b](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[b]()}},Q=class{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new g(this.x*e,this.y*e)}[b](){return{x:this.x,y:this.y}}toJSON(){return this[b]()}},g=class{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new Q(this.x/e,this.y/e)}[b](){return{x:this.x,y:this.y}}toJSON(){return this[b]()}},S=class{constructor(e){this.position=e}toLogical(e){return this.position instanceof Q?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof g?this.position:this.position.toPhysical(e)}[b](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[b]()}};te();N();te();N();N();var De=class t extends we{constructor(e){super(e)}static async new(e,n,r){return s("plugin:image|new",{rgba:ne(e),width:n,height:r}).then(i=>new t(i))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:ne(e)}).then(n=>new t(n))}static async fromPath(e){return s("plugin:image|from_path",{path:e}).then(n=>new t(n))}async rgba(){return s("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return s("plugin:image|size",{rid:this.rid})}};function ne(t){return t==null?null:typeof t=="string"?t:t instanceof De?t.rid:t}var Ne;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Ne||(Ne={}));var ze=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Et;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(Et||(Et={}));function je(){return new $(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function We(){return s("plugin:window|get_all_windows").then(t=>t.map(e=>new $(e,{skip:!0})))}var qe=["tauri://created","tauri://error"],$=class{constructor(e,n={}){var r;this.label=e,this.listeners=Object.create(null),n?.skip||s("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;return(n=(await We()).find(r=>r.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return je()}static async getAll(){return We()}static async getFocusedWindow(){for(let e of await We())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(qe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:n});return}return X(e,n)}async emitTo(e,n,r){if(qe.includes(n)){for(let i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return ee(e,n,r)}_handleTauriEvent(e,n){return qe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return s("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return s("plugin:window|inner_position",{label:this.label}).then(e=>new g(e))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then(e=>new g(e))}async innerSize(){return s("plugin:window|inner_size",{label:this.label}).then(e=>new A(e))}async outerSize(){return s("plugin:window|outer_size",{label:this.label}).then(e=>new A(e))}async isFullscreen(){return s("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return s("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return s("plugin:window|is_maximized",{label:this.label})}async isFocused(){return s("plugin:window|is_focused",{label:this.label})}async isDecorated(){return s("plugin:window|is_decorated",{label:this.label})}async isResizable(){return s("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return s("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return s("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return s("plugin:window|is_closable",{label:this.label})}async isVisible(){return s("plugin:window|is_visible",{label:this.label})}async title(){return s("plugin:window|title",{label:this.label})}async theme(){return s("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return s("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return s("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return s("plugin:window|scene_identifier",{label:this.label})}async center(){return s("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===Ne.Critical?n={type:"Critical"}:n={type:"Informational"}),s("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return s("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return s("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return s("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return s("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return s("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return s("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return s("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return s("plugin:window|maximize",{label:this.label})}async unmaximize(){return s("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return s("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return s("plugin:window|minimize",{label:this.label})}async unminimize(){return s("plugin:window|unminimize",{label:this.label})}async show(){return s("plugin:window|show",{label:this.label})}async hide(){return s("plugin:window|hide",{label:this.label})}async close(){return s("plugin:window|close",{label:this.label})}async destroy(){return s("plugin:window|destroy",{label:this.label})}async setDecorations(e){return s("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return s("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return s("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return s("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return s("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return s("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return s("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return s("plugin:window|set_size",{label:this.label,value:e instanceof C?e:new C(e)})}async setMinSize(e){return s("plugin:window|set_min_size",{label:this.label,value:e instanceof C?e:e?new C(e):null})}async setMaxSize(e){return s("plugin:window|set_max_size",{label:this.label,value:e instanceof C?e:e?new C(e):null})}async setSizeConstraints(e){function n(r){return r?{Logical:r}:null}return s("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(e?.minWidth),minHeight:n(e?.minHeight),maxWidth:n(e?.maxWidth),maxHeight:n(e?.maxHeight)}})}async setPosition(e){return s("plugin:window|set_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setFullscreen(e){return s("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return s("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return s("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return s("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return s("plugin:window|set_icon",{label:this.label,value:ne(e)})}async setSkipTaskbar(e){return s("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return s("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return s("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return s("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return s("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return s("plugin:window|set_cursor_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setIgnoreCursorEvents(e){return s("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return s("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return s("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return s("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return s("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return s("plugin:window|set_overlay_icon",{label:this.label,value:e?ne(e):void 0})}async setProgressBar(e){return s("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return s("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return s("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return s("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(f.WINDOW_RESIZED,n=>{n.payload=new A(n.payload),e(n)})}async onMoved(e){return this.listen(f.WINDOW_MOVED,n=>{n.payload=new g(n.payload),e(n)})}async onCloseRequested(e){return this.listen(f.WINDOW_CLOSE_REQUESTED,async n=>{let r=new ze(n);await e(r),r.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let n=await this.listen(f.DRAG_ENTER,a=>{e({...a,payload:{type:"enter",paths:a.payload.paths,position:new g(a.payload.position)}})}),r=await this.listen(f.DRAG_OVER,a=>{e({...a,payload:{type:"over",position:new g(a.payload.position)}})}),i=await this.listen(f.DRAG_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload.paths,position:new g(a.payload.position)}})}),o=await this.listen(f.DRAG_LEAVE,a=>{e({...a,payload:{type:"leave"}})});return()=>{n(),i(),r(),o()}}async onFocusChanged(e){let n=await this.listen(f.WINDOW_FOCUS,i=>{e({...i,payload:!0})}),r=await this.listen(f.WINDOW_BLUR,i=>{e({...i,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen(f.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(f.WINDOW_THEME_CHANGED,e)}},Ct;(function(t){t.Disabled="disabled",t.Throttle="throttle",t.Suspend="suspend"})(Ct||(Ct={}));var Tt;(function(t){t.Default="default",t.FluentOverlay="fluentOverlay"})(Tt||(Tt={}));var Pt;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Pt||(Pt={}));var At;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(At||(At={}));function He(){return new V(je(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function St(){return s("plugin:webview|get_all_webviews").then(t=>t.map(e=>new V(new $(e.windowLabel,{skip:!0}),e.label,{skip:!0})))}var Me=["tauri://created","tauri://error"],V=class{constructor(e,n,r){this.window=e,this.label=n,this.listeners=Object.create(null),r?.skip||s("plugin:webview|create_webview",{windowLabel:e.label,options:{...r,label:n}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;return(n=(await St()).find(r=>r.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return He()}static async getAll(){return St()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"Webview",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"Webview",label:this.label}})}async emit(e,n){if(Me.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:n});return}return X(e,n)}async emitTo(e,n,r){if(Me.includes(n)){for(let i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return ee(e,n,r)}_handleTauriEvent(e,n){return Me.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async position(){return s("plugin:webview|webview_position",{label:this.label}).then(e=>new g(e))}async size(){return s("plugin:webview|webview_size",{label:this.label}).then(e=>new A(e))}async close(){return s("plugin:webview|webview_close",{label:this.label})}async setSize(e){return s("plugin:webview|set_webview_size",{label:this.label,value:e instanceof C?e:new C(e)})}async setPosition(e){return s("plugin:webview|set_webview_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setFocus(){return s("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(e){return s("plugin:webview|set_webview_auto_resize",{label:this.label,value:e})}async hide(){return s("plugin:webview|webview_hide",{label:this.label})}async show(){return s("plugin:webview|webview_show",{label:this.label})}async setZoom(e){return s("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return s("plugin:webview|reparent",{label:this.label,window:typeof e=="string"?e:e.label})}async clearAllBrowsingData(){return s("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(e){return s("plugin:webview|set_webview_background_color",{color:e})}async onDragDropEvent(e){let n=await this.listen(f.DRAG_ENTER,a=>{e({...a,payload:{type:"enter",paths:a.payload.paths,position:new g(a.payload.position)}})}),r=await this.listen(f.DRAG_OVER,a=>{e({...a,payload:{type:"over",position:new g(a.payload.position)}})}),i=await this.listen(f.DRAG_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload.paths,position:new g(a.payload.position)}})}),o=await this.listen(f.DRAG_LEAVE,a=>{e({...a,payload:{type:"leave"}})});return()=>{n(),i(),r(),o()}}};te();N();function gn(){let t=He();return new O(t.label,{skip:!0})}async function kt(){return s("plugin:window|get_all_windows").then(t=>t.map(e=>new O(e,{skip:!0})))}var O=class t{constructor(e,n={}){var r;this.label=e,this.listeners=Object.create(null),n?.skip||s("plugin:webview|create_webview_window",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;let r=(n=(await kt()).find(i=>i.label===e))!==null&&n!==void 0?n:null;return r?new t(r.label,{skip:!0}):null}static getCurrent(){return gn()}static async getAll(){return kt()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async setBackgroundColor(e){return s("plugin:window|set_background_color",{color:e}).then(()=>s("plugin:webview|set_webview_background_color",{color:e}))}};bn(O,[$,V]);function bn(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{var i;typeof t.prototype=="object"&&t.prototype&&r in t.prototype||Object.defineProperty(t.prototype,r,(i=Object.getOwnPropertyDescriptor(n.prototype,r))!==null&&i!==void 0?i:Object.create(null))})})}var _n=()=>{if(typeof window<"u"&&(window.__TAURI__||window.__TAURI_INTERNALS__))return"tauri";if(typeof window<"u"){if(window.Capacitor?.isNativePlatform?.())return window.Capacitor.getPlatform();if(window.Capacitor?.getPlatform){let t=window.Capacitor.getPlatform();if(t==="ios"||t==="android")return t}}return"web"},Be=_n(),re=Be==="android"||Be==="ios",ie=Be==="tauri";var ye=[];function Rt(t,e=null){ye.forEach(n=>{try{n(t,e)}catch(r){console.error("Google listener error:",r)}})}function Ot(t){return ye.push(t),()=>{let e=ye.indexOf(t);e!==-1&&ye.splice(e,1)}}var me=null,Lt=async({appId:t="tevrocsoft",serviceUrl:e="https://tevrocsoftapi.netlify.app"}={})=>{let n=`${e}/login?mode=mobile&app=${t}`;if(re){await he.open({url:n});return}if(ie){let o=`${e}/login?mode=desktop&app=${t}`,a=new O("auth",{url:o,title:"Tevroc Login",width:550,height:500,resizable:!0,center:!0});me=a,a.once("tauri://created",()=>{console.log("Auth window opened")}),a.once("tauri://error",u=>{console.error("Auth window error:",u)});return}let i=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?"localhost":"netlify";n=`${e}/login?mode=${i}&app=${t}`,window.location.href=n},xt=async t=>{try{if(!t?.includes("token="))return;let n=new URLSearchParams(t.split("?")[1]).get("token"),i=await(await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${n}`}})).json(),o={id:i.sub,firstName:i.given_name,lastName:i.family_name,email:i.email,photo:i.picture,accessToken:n};localStorage.setItem("user",JSON.stringify(o)),localStorage.setItem("idToken",n),Rt(o,null)}catch(e){Rt(null,e)}};(0,Fe.useEffect)(()=>{if(!re)return;let t=$e.addListener("appUrlOpen",e=>{xt(e.url)});return()=>t.remove()},[]);(0,Fe.useEffect)(()=>{if(!ie)return;let t;return(async()=>{let{listen:n}=await Promise.resolve().then(()=>(te(),vt));t=await n("deep-link://open-url",async r=>{let i=r.payload;if(typeof i=="object"&&(i=i?.url||i?.payload||null),!!i){if(me)try{await me.close(),me=null}catch{}xt(i)}})})(),()=>{t?.()}},[]);var It=Ze(ke(),1);var Ge=[];function $t(t){return Ge.push(t),()=>{let e=Ge.indexOf(t);e!==-1&&Ge.splice(e,1)}}var vn=null,Ut=async(t,{appId:e="tevrocsoft",serviceUrl:n="https://tevrocsoftapi.netlify.app"}={})=>{let r=Math.round(Number(t)*100),i=`${n}/pay`,o=`${i}?mode=mobile&amount=${r}&app=${e}`;if(re){await he.open({url:o});return}if(ie){let c=`${i}?mode=desktop&amount=${r}&app=${e}`,w=new O("payment",{url:c,title:"Complete Payment",width:550,height:600,resizable:!0,center:!0});vn=w,w.once("tauri://created",()=>{console.log("Payment window opened")}),w.once("tauri://error",v=>{console.error("Payment window error:",v)});return}let u=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?"localhost":"netlify";window.location.href=`${i}?mode=${u}&amount=${r}&app=${e}`};var En=3e4,j=class extends Error{constructor(e,n={}){super(e),this.name="TevrocError",this.status=n.status,this.code=n.code,this.details=n.details,this.response=n.response}};function Cn(t={}){return new ge(t)}var ge=class{constructor(e={}){let n=e.baseUrl??e.url,r=e.serviceUrl??e.url;if(!n)throw new TypeError("createClient requires a baseUrl");if(this.baseUrl=Wt(n),this.serviceUrl=Wt(r),this.fetch=(e.fetch??globalThis.fetch).bind(globalThis),typeof this.fetch!="function")throw new TypeError("No fetch implementation available");this.timeoutMs=e.timeoutMs??En,this.defaultHeaders=Nn(e.headers),this.token=e.token??null,this.auth=Pn(this),this.entities=An(this),this.functions=kn(this),this.integrations=Rn(this),this.agents=On(this),this.logs=xn(this),this.connectors=In(this),this.customIntegrations=$n(this),this.sso=Un(this),this.files=Dn(this),this.payments=Tn(this)}setToken(e){return this.token=e||null,this.token?localStorage.setItem("tevroc_access_token",this.token):localStorage.removeItem("tevroc_access_token"),this}clearToken(){return this.token=null,localStorage.removeItem("tevroc_access_token"),this}async request(e,n={}){let r=(n.method??"GET").toUpperCase(),i=new Headers(this.defaultHeaders),o=n.query?qn(n.query):"",a=`${this.baseUrl}${e.startsWith("/")?e:`/${e}`}${o}`,u=new AbortController,c=setTimeout(()=>u.abort(),n.timeoutMs??this.timeoutMs),w=this.token||localStorage.getItem("tevroc_access_token");w&&n.auth!==!1&&i.set("authorization",`Bearer ${w}`),console.log(w);let v=n.body;if(v!=null&&zn(v)&&(i.set("content-type","application/json"),v=JSON.stringify(v)),n.headers)for(let[d,p]of Object.entries(n.headers))p!=null&&i.set(d,String(p));try{let d=await this.fetch(a,{method:r,headers:i,body:v,signal:n.signal??u.signal});return await Wn(d,n.parseAs)}catch(d){throw d?.name==="AbortError"?new j("Request timed out",{code:"timeout"}):d instanceof j?d:new j(d?.message??"Network request failed",{code:"network_error",details:d})}finally{clearTimeout(c)}}};function Tn(t){return{create:async({amountZAR:e,appId:n="tevrocsoft",mode:r="web"})=>await Ut(e,{appId:n,serviceUrl:t.serviceUrl,mode:r}),onstatus:e=>{if(typeof e!="function")throw new Error("onstatus requires a function");return $t(e)}}}function Pn(t){return{async register(e){let n=await t.request("/auth/register",{method:"POST",body:e,auth:!1});return n.token&&t.setToken(n.token),n},googleLogin:e=>Lt(e),onGoogleLogin:e=>Ot(e),async login(e){let n=await t.request("/auth/login",{method:"POST",body:e,auth:!1});return n.token&&t.setToken(n.token),n},async logout(){let e=await t.request("/auth/logout",{method:"POST"});return t.clearToken(),e},me:()=>t.request("/auth/me"),verifyOtp:e=>t.request("/auth/verify-otp",{method:"POST",body:e,auth:!1}),changePassword:e=>t.request("/auth/change-password",{method:"POST",body:e}),resetPassword:e=>t.request("/auth/reset-password",{method:"POST",body:e,auth:!1}),loginUrl:e=>t.request("/auth/login-url",{query:e?{redirectTo:e}:void 0,auth:!1})}}function An(t){return new Proxy({},{get(e,n){if(typeof n=="string")return Sn(t,n)}})}function Sn(t,e){let n=`/entities/${encodeURIComponent(e)}`;return{list:r=>t.request(n,{query:r}),get:r=>t.request(`${n}/${encodeURIComponent(r)}`),create:r=>t.request(n,{method:"POST",body:r}),update:(r,i)=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"PATCH",body:i}),delete:r=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"DELETE"}),query:(r={})=>t.request(`${n}/query`,{method:"POST",body:r}),bulkCreate:r=>t.request(`${n}/bulk`,{method:"POST",body:{records:r}}),bulkUpdate:r=>t.request(`${n}/bulk`,{method:"PATCH",body:{records:r}}),bulkDelete:r=>t.request(`${n}/bulk`,{method:"DELETE",body:{ids:r}}),import:r=>t.request(`${n}/import`,{method:"POST",body:{records:r}})}}function kn(t){return new Proxy({invoke:(e,n)=>t.request(`/functions/${encodeURIComponent(e)}`,{method:"POST",body:n})},{get(e,n){if(n in e)return e[n];if(typeof n=="string")return r=>e.invoke(n,r)}})}function Rn(t){return{Core:{InvokeLLM:e=>t.request("/integrations/core/invoke-llm",{method:"POST",body:e}),GenerateImage:e=>t.request("/integrations/core/generate-image",{method:"POST",body:e}),UploadFile:(e,n={})=>Dt(t,"/integrations/core/upload-file",e,n),UploadPrivateFile:(e,n={})=>Dt(t,"/integrations/core/upload-private-file",e,n),CreateFileSignedUrl:e=>t.request("/integrations/core/create-file-signed-url",{method:"POST",body:e}),SendEmail:e=>t.request("/integrations/core/send-email",{method:"POST",body:e}),ExtractDataFromUploadedFile:e=>t.request("/integrations/core/extract-data-from-uploaded-file",{method:"POST",body:e})}}}function On(t){return new Proxy({},{get(e,n){if(typeof n=="string")return Ln(t,n)}})}function Ln(t,e){let n=`/agents/${encodeURIComponent(e)}/conversations`;return{createConversation:(r={})=>t.request(n,{method:"POST",body:r}),listConversations:()=>t.request(n),getConversation:r=>t.request(`${n}/${encodeURIComponent(r)}`),deleteConversation:r=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"DELETE"}),addMessage:(r,i)=>t.request(`${n}/${encodeURIComponent(r)}/messages`,{method:"POST",body:i}),listMessages:r=>t.request(`${n}/${encodeURIComponent(r)}/messages`)}}function xn(t){return{list:e=>t.request("/app-logs",{query:e}),create:e=>t.request("/app-logs",{method:"POST",body:e}),get:e=>t.request(`/app-logs/${encodeURIComponent(e)}`)}}function In(t){return{list:()=>t.request("/connectors"),get:e=>t.request(`/connectors/${encodeURIComponent(e)}`),connect:(e,n={})=>t.request(`/connectors/${encodeURIComponent(e)}/connect`,{method:"POST",body:n}),disconnect:e=>t.request(`/connectors/${encodeURIComponent(e)}/disconnect`,{method:"POST"}),status:e=>t.request(`/connectors/${encodeURIComponent(e)}/status`),user:{list:()=>t.request("/user-connectors"),get:e=>t.request(`/user-connectors/${encodeURIComponent(e)}`),refresh:e=>t.request(`/user-connectors/${encodeURIComponent(e)}/refresh`,{method:"POST"}),delete:e=>t.request(`/user-connectors/${encodeURIComponent(e)}`,{method:"DELETE"})}}}function $n(t){return new Proxy({invoke:(e,n,r)=>t.request(`/custom-integrations/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{method:"POST",body:r})},{get(e,n){if(n in e)return e[n];if(typeof n=="string")return new Proxy({},{get(r,i){if(typeof i=="string")return o=>e.invoke(n,i,o)}})}})}function Un(t){return{accessToken:e=>t.request("/sso/access-token",{method:"POST",body:e,auth:!1}),callback:e=>t.request("/sso/callback",{query:e,auth:!1})}}function Dn(t){return{url:e=>`${t.baseUrl}/files/${encodeURIComponent(e)}`,privateUrl:e=>`${t.baseUrl}/private-files/${encodeURIComponent(e)}`,get:e=>t.request(`/files/${encodeURIComponent(e)}`,{parseAs:"response",auth:!1}),getPrivate:e=>t.request(`/private-files/${encodeURIComponent(e)}`,{parseAs:"response"})}}function Dt(t,e,n,r){let i={};return r.filename&&(i["x-filename"]=r.filename),r.contentType&&(i["content-type"]=r.contentType),t.request(e,{method:"POST",body:n,headers:i})}async function Wn(t,e){if(e==="response")return t;let r=(t.headers.get("content-type")??"").includes("application/json"),i=r?await t.json():await t.text();if(!t.ok){let o=r&&i?.error?i.error:{};throw new j(o.message??t.statusText,{status:t.status,code:o.code??"api_error",details:o.details??i,response:t})}return i}function qn(t){let e=new URLSearchParams;for(let[r,i]of Object.entries(t))if(i!=null)if(Array.isArray(i))for(let o of i)e.append(r,String(o));else e.set(r,String(i));let n=e.toString();return n?`?${n}`:""}function Wt(t){return String(t).replace(/\/+$/,"")}function Nn(t={}){return Object.fromEntries(new Headers(t).entries())}function zn(t){let e=typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer,n=typeof Blob<"u"&&t instanceof Blob,r=typeof FormData<"u"&&t instanceof FormData;return typeof t=="object"&&!e&&!n&&!r}return Gt(jn);})();
|
|
1
|
+
var Tevroc=(()=>{var jt=Object.create;var le=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty;var H=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Ze=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},ue=(t,e)=>{for(var n in e)le(t,n,{get:e[n],enumerable:!0})},Qe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ht(e))!Ft.call(t,i)&&i!==n&&le(t,i,{get:()=>e[i],enumerable:!(r=Mt(e,i))||r.enumerable});return t};var Xe=(t,e,n)=>(n=t!=null?jt(Bt(t)):{},Qe(e||!t||!t.__esModule?le(n,"default",{value:t,enumerable:!0}):n,t)),Gt=t=>Qe(le({},"__esModule",{value:!0}),t);var ct=Ze(l=>{"use strict";var Ce=Symbol.for("react.transitional.element"),Yt=Symbol.for("react.portal"),Vt=Symbol.for("react.fragment"),Jt=Symbol.for("react.strict_mode"),Kt=Symbol.for("react.profiler"),Zt=Symbol.for("react.consumer"),Qt=Symbol.for("react.context"),Xt=Symbol.for("react.forward_ref"),en=Symbol.for("react.suspense"),tn=Symbol.for("react.memo"),it=Symbol.for("react.lazy"),nn=Symbol.for("react.activity"),et=Symbol.iterator;function rn(t){return t===null||typeof t!="object"?null:(t=et&&t[et]||t["@@iterator"],typeof t=="function"?t:null)}var st={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ot=Object.assign,at={};function F(t,e,n){this.props=t,this.context=e,this.refs=at,this.updater=n||st}F.prototype.isReactComponent={};F.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};F.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function lt(){}lt.prototype=F.prototype;function Te(t,e,n){this.props=t,this.context=e,this.refs=at,this.updater=n||st}var Pe=Te.prototype=new lt;Pe.constructor=Te;ot(Pe,F.prototype);Pe.isPureReactComponent=!0;var tt=Array.isArray;function Ee(){}var h={H:null,A:null,T:null,S:null},ut=Object.prototype.hasOwnProperty;function Ae(t,e,n){var r=n.ref;return{$$typeof:Ce,type:t,key:e,ref:r!==void 0?r:null,props:n}}function sn(t,e){return Ae(t.type,e,t.props)}function Se(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ce}function on(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var nt=/\/+/g;function ve(t,e){return typeof t=="object"&&t!==null&&t.key!=null?on(""+t.key):e.toString(36)}function an(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Ee,Ee):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function B(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"bigint":case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Ce:case Yt:a=!0;break;case it:return a=t._init,B(a(t._payload),e,n,r,i)}}if(a)return i=i(t),a=r===""?"."+ve(t,0):r,tt(i)?(n="",a!=null&&(n=a.replace(nt,"$&/")+"/"),B(i,e,n,"",function(w){return w})):i!=null&&(Se(i)&&(i=sn(i,n+(i.key==null||t&&t.key===i.key?"":(""+i.key).replace(nt,"$&/")+"/")+a)),e.push(i)),1;a=0;var u=r===""?".":r+":";if(tt(t))for(var c=0;c<t.length;c++)r=t[c],o=u+ve(r,c),a+=B(r,e,n,o,i);else if(c=rn(t),typeof c=="function")for(t=c.call(t),c=0;!(r=t.next()).done;)r=r.value,o=u+ve(r,c++),a+=B(r,e,n,o,i);else if(o==="object"){if(typeof t.then=="function")return B(an(t),e,n,r,i);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return a}function ce(t,e,n){if(t==null)return t;var r=[],i=0;return B(t,r,"","",function(o){return e.call(n,o,i++)}),r}function ln(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var rt=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},un={map:ce,forEach:function(t,e,n){ce(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return ce(t,function(){e++}),e},toArray:function(t){return ce(t,function(e){return e})||[]},only:function(t){if(!Se(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};l.Activity=nn;l.Children=un;l.Component=F;l.Fragment=Vt;l.Profiler=Kt;l.PureComponent=Te;l.StrictMode=Jt;l.Suspense=en;l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=h;l.__COMPILER_RUNTIME={__proto__:null,c:function(t){return h.H.useMemoCache(t)}};l.cache=function(t){return function(){return t.apply(null,arguments)}};l.cacheSignal=function(){return null};l.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=ot({},t.props),i=t.key;if(e!=null)for(o in e.key!==void 0&&(i=""+e.key),e)!ut.call(e,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&e.ref===void 0||(r[o]=e[o]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+2];r.children=a}return Ae(t.type,i,r)};l.createContext=function(t){return t={$$typeof:Qt,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Zt,_context:t},t};l.createElement=function(t,e,n){var r,i={},o=null;if(e!=null)for(r in e.key!==void 0&&(o=""+e.key),e)ut.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return Ae(t,o,i)};l.createRef=function(){return{current:null}};l.forwardRef=function(t){return{$$typeof:Xt,render:t}};l.isValidElement=Se;l.lazy=function(t){return{$$typeof:it,_payload:{_status:-1,_result:t},_init:ln}};l.memo=function(t,e){return{$$typeof:tn,type:t,compare:e===void 0?null:e}};l.startTransition=function(t){var e=h.T,n={};h.T=n;try{var r=t(),i=h.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Ee,rt)}catch(o){rt(o)}finally{e!==null&&n.types!==null&&(e.types=n.types),h.T=e}};l.unstable_useCacheRefresh=function(){return h.H.useCacheRefresh()};l.use=function(t){return h.H.use(t)};l.useActionState=function(t,e,n){return h.H.useActionState(t,e,n)};l.useCallback=function(t,e){return h.H.useCallback(t,e)};l.useContext=function(t){return h.H.useContext(t)};l.useDebugValue=function(){};l.useDeferredValue=function(t,e){return h.H.useDeferredValue(t,e)};l.useEffect=function(t,e){return h.H.useEffect(t,e)};l.useEffectEvent=function(t){return h.H.useEffectEvent(t)};l.useId=function(){return h.H.useId()};l.useImperativeHandle=function(t,e,n){return h.H.useImperativeHandle(t,e,n)};l.useInsertionEffect=function(t,e){return h.H.useInsertionEffect(t,e)};l.useLayoutEffect=function(t,e){return h.H.useLayoutEffect(t,e)};l.useMemo=function(t,e){return h.H.useMemo(t,e)};l.useOptimistic=function(t,e){return h.H.useOptimistic(t,e)};l.useReducer=function(t,e,n){return h.H.useReducer(t,e,n)};l.useRef=function(t){return h.H.useRef(t)};l.useState=function(t){return h.H.useState(t)};l.useSyncExternalStore=function(t,e,n){return h.H.useSyncExternalStore(t,e,n)};l.useTransition=function(){return h.H.useTransition()};l.version="19.2.7"});var ke=Ze((Bn,dt)=>{"use strict";dt.exports=ct()});var G,J,cn,dn,hn,Re,D,R,ht,pt,Oe,Fn,pn,fn,wn,yn,Le,Gn,ft,wt,xe,Yn,K=H(()=>{(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(G||(G={}));J=class extends Error{constructor(e,n,r){super(e),this.message=e,this.code=n,this.data=r}},cn=t=>{var e,n;return t?.androidBridge?"android":!((n=(e=t?.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},dn=t=>{let e=t.CapacitorCustomPlatform||null,n=t.Capacitor||{},r=n.Plugins=n.Plugins||{},i=()=>e!==null?e.name:cn(t),o=()=>i()!=="web",a=d=>{let p=w.get(d);return!!(p?.platforms.has(i())||u(d))},u=d=>{var p;return(p=n.PluginHeaders)===null||p===void 0?void 0:p.find(se=>se.name===d)},c=d=>t.console.error(d),w=new Map,v=(d,p={})=>{let se=w.get(d);if(se)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),se.proxy;let $=i(),M=u(d),k,qt=async()=>(!k&&$ in p?k=typeof p[$]=="function"?k=await p[$]():k=p[$]:e!==null&&!k&&"web"in p&&(k=typeof p.web=="function"?k=await p.web():k=p.web),k),Nt=(m,_)=>{var P,L;if(M){let x=M?.methods.find(T=>_===T.name);if(x)return x.rtype==="promise"?T=>n.nativePromise(d,_.toString(),T):(T,oe)=>n.nativeCallback(d,_.toString(),T,oe);if(m)return(P=m[_])===null||P===void 0?void 0:P.bind(m)}else{if(m)return(L=m[_])===null||L===void 0?void 0:L.bind(m);throw new J(`"${d}" plugin is not implemented on ${$}`,G.Unimplemented)}},be=m=>{let _,P=(...L)=>{let x=qt().then(T=>{let oe=Nt(T,m);if(oe){let ae=oe(...L);return _=ae?.remove,ae}else throw new J(`"${d}.${m}()" is not implemented on ${$}`,G.Unimplemented)});return m==="addListener"&&(x.remove=async()=>_()),x};return P.toString=()=>`${m.toString()}() { [capacitor code] }`,Object.defineProperty(P,"name",{value:m,writable:!1,configurable:!1}),P},Je=be("addListener"),Ke=be("removeListener"),zt=(m,_)=>{let P=Je({eventName:m},_),L=async()=>{let T=await P;Ke({eventName:m,callbackId:T},_)},x=new Promise(T=>P.then(()=>T({remove:L})));return x.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await L()},x},_e=new Proxy({},{get(m,_){switch(_){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return M?zt:Je;case"removeListener":return Ke;default:return be(_)}}});return r[d]=_e,w.set(d,{name:d,proxy:_e,platforms:new Set([...Object.keys(p),...M?[$]:[]])}),_e};return n.convertFileSrc||(n.convertFileSrc=d=>d),n.getPlatform=i,n.handleError=c,n.isNativePlatform=o,n.isPluginAvailable=a,n.registerPlugin=v,n.Exception=J,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},hn=t=>t.Capacitor=dn(t),Re=hn(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),D=Re.registerPlugin,R=class{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,n){let r=!1;this.listeners[e]||(this.listeners[e]=[],r=!0),this.listeners[e].push(n);let o=this.windowListeners[e];o&&!o.registered&&this.addWindowListener(o),r&&this.sendRetainedArgumentsForEvent(e);let a=async()=>this.removeListener(e,n);return Promise.resolve({remove:a})}async removeAllListeners(){this.listeners={};for(let e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n,r){let i=this.listeners[e];if(!i){if(r){let o=this.retainedEventArguments[e];o||(o=[]),o.push(n),this.retainedEventArguments[e]=o}return}i.forEach(o=>o(n))}hasListeners(e){var n;return!!(!((n=this.listeners[e])===null||n===void 0)&&n.length)}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(e="not implemented"){return new Re.Exception(e,G.Unimplemented)}unavailable(e="not available"){return new Re.Exception(e,G.Unavailable)}async removeListener(e,n){let r=this.listeners[e];if(!r)return;let i=r.indexOf(n);this.listeners[e].splice(i,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let n=this.retainedEventArguments[e];n&&(delete this.retainedEventArguments[e],n.forEach(r=>{this.notifyListeners(e,r)}))}},ht=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),pt=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent),Oe=class extends R{async getCookies(){let e=document.cookie,n={};return e.split(";").forEach(r=>{if(r.length<=0)return;let[i,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");i=pt(i).trim(),o=pt(o).trim(),n[i]=o}),n}async setCookie(e){try{let n=ht(e.key),r=ht(e.value),i=e.expires?`; expires=${e.expires.replace("expires=","")}`:"",o=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${r||""}${i}; path=${o}; ${a};`}catch(n){return Promise.reject(n)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{let e=document.cookie.split(";")||[];for(let n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}},Fn=D("CapacitorCookies",{web:()=>new Oe}),pn=async t=>new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{let i=r.result;e(i.indexOf(",")>=0?i.split(",")[1]:i)},r.onerror=i=>n(i),r.readAsDataURL(t)}),fn=(t={})=>{let e=Object.keys(t);return Object.keys(t).map(i=>i.toLocaleLowerCase()).reduce((i,o,a)=>(i[o]=t[e[a]],i),{})},wn=(t,e=!0)=>t?Object.entries(t).reduce((r,i)=>{let[o,a]=i,u,c;return Array.isArray(a)?(c="",a.forEach(w=>{u=e?encodeURIComponent(w):w,c+=`${o}=${u}&`}),c.slice(0,-1)):(u=e?encodeURIComponent(a):a,c=`${o}=${u}`),`${r}&${c}`},"").substr(1):null,yn=(t,e={})=>{let n=Object.assign({method:t.method||"GET",headers:t.headers},e),i=fn(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(i.includes("application/x-www-form-urlencoded")){let o=new URLSearchParams;for(let[a,u]of Object.entries(t.data||{}))o.set(a,u);n.body=o.toString()}else if(i.includes("multipart/form-data")||t.data instanceof FormData){let o=new FormData;if(t.data instanceof FormData)t.data.forEach((u,c)=>{o.append(c,u)});else for(let u of Object.keys(t.data))o.append(u,t.data[u]);n.body=o;let a=new Headers(n.headers);a.delete("content-type"),n.headers=a}else(i.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n},Le=class extends R{async request(e){let n=yn(e,e.webFetchExtra),r=wn(e.params,e.shouldEncodeUrlParams),i=r?`${e.url}?${r}`:e.url,o=await fetch(i,n),a=o.headers.get("content-type")||"",{responseType:u="text"}=o.ok?e:{};a.includes("application/json")&&(u="json");let c,w;switch(u){case"arraybuffer":case"blob":w=await o.blob(),c=await pn(w);break;case"json":c=await o.json();break;default:c=await o.text()}let v={};return o.headers.forEach((d,p)=>{v[p]=d}),{data:c,headers:v,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}},Gn=D("CapacitorHttp",{web:()=>new Le});(function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"})(ft||(ft={}));(function(t){t.StatusBar="StatusBar",t.NavigationBar="NavigationBar"})(wt||(wt={}));xe=class extends R{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}},Yn=D("SystemBars",{web:()=>new xe})});var yt={};ue(yt,{AppWeb:()=>Ie});var Ie,mt=H(()=>{K();Ie=class extends R{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}async toggleBackButtonHandler(){throw this.unimplemented("Not implemented on web.")}async getAppLanguage(){return{value:navigator.language.split("-")[0].toLowerCase()}}}});var gt={};ue(gt,{Browser:()=>mn,BrowserWeb:()=>de});var de,mn,bt=H(()=>{K();de=class extends R{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||"_blank")}async close(){return new Promise((e,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,e()):n("No active window to close!")})}},mn=new de});function y(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function W(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}var _t=H(()=>{});function $e(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function s(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var q,E,Y,pe,fe,b,vt,we,N=H(()=>{_t();b="__TAURI_TO_IPC_KEY__";vt=class{constructor(e){q.set(this,void 0),E.set(this,0),Y.set(this,[]),pe.set(this,void 0),W(this,q,e||(()=>{}),"f"),this.id=$e(n=>{let r=n.index;if("end"in n){r==y(this,E,"f")?this.cleanupCallback():W(this,pe,r,"f");return}let i=n.message;if(r==y(this,E,"f")){for(y(this,q,"f").call(this,i),W(this,E,y(this,E,"f")+1,"f");y(this,E,"f")in y(this,Y,"f");){let o=y(this,Y,"f")[y(this,E,"f")];y(this,q,"f").call(this,o),delete y(this,Y,"f")[y(this,E,"f")],W(this,E,y(this,E,"f")+1,"f")}y(this,E,"f")===y(this,pe,"f")&&this.cleanupCallback()}else y(this,Y,"f")[r]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){W(this,q,e,"f")}get onmessage(){return y(this,q,"f")}[(q=new WeakMap,E=new WeakMap,Y=new WeakMap,pe=new WeakMap,b)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[b]()}};we=class{get rid(){return y(this,fe,"f")}constructor(e){fe.set(this,void 0),W(this,fe,e,"f")}async close(){return s("plugin:resources|close",{rid:this.rid})}};fe=new WeakMap});var Ct={};ue(Ct,{TauriEvent:()=>f,emit:()=>X,emitTo:()=>ee,listen:()=>I,once:()=>z});async function Et(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await s("plugin:event|unlisten",{event:t,eventId:e})}async function I(t,e,n){var r;let i=typeof n?.target=="string"?{kind:"AnyLabel",label:n.target}:(r=n?.target)!==null&&r!==void 0?r:{kind:"Any"};return s("plugin:event|listen",{event:t,target:i,handler:$e(e)}).then(o=>async()=>Et(t,o))}async function z(t,e,n){return I(t,r=>{Et(t,r.id),e(r)},n)}async function X(t,e){await s("plugin:event|emit",{event:t,payload:e})}async function ee(t,e,n){await s("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:n})}var f,te=H(()=>{N();(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(f||(f={}))});var jn={};ue(jn,{TevrocClient:()=>ge,TevrocError:()=>j,createClient:()=>Cn});var Fe=Xe(ke(),1);K();var Ue=D("App",{web:()=>Promise.resolve().then(()=>(mt(),yt)).then(t=>new t.AppWeb)});K();var he=D("Browser",{web:()=>Promise.resolve().then(()=>(bt(),gt)).then(t=>new t.BrowserWeb)});N();var Z=class{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new A(this.width*e,this.height*e)}[b](){return{width:this.width,height:this.height}}toJSON(){return this[b]()}},A=class{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new Z(this.width/e,this.height/e)}[b](){return{width:this.width,height:this.height}}toJSON(){return this[b]()}},C=class{constructor(e){this.size=e}toLogical(e){return this.size instanceof Z?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof A?this.size:this.size.toPhysical(e)}[b](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[b]()}},Q=class{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new g(this.x*e,this.y*e)}[b](){return{x:this.x,y:this.y}}toJSON(){return this[b]()}},g=class{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new Q(this.x/e,this.y/e)}[b](){return{x:this.x,y:this.y}}toJSON(){return this[b]()}},S=class{constructor(e){this.position=e}toLogical(e){return this.position instanceof Q?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof g?this.position:this.position.toPhysical(e)}[b](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[b]()}};te();N();te();N();N();var De=class t extends we{constructor(e){super(e)}static async new(e,n,r){return s("plugin:image|new",{rgba:ne(e),width:n,height:r}).then(i=>new t(i))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:ne(e)}).then(n=>new t(n))}static async fromPath(e){return s("plugin:image|from_path",{path:e}).then(n=>new t(n))}async rgba(){return s("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return s("plugin:image|size",{rid:this.rid})}};function ne(t){return t==null?null:typeof t=="string"?t:t instanceof De?t.rid:t}var Ne;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Ne||(Ne={}));var ze=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Tt;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(Tt||(Tt={}));function je(){return new U(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function We(){return s("plugin:window|get_all_windows").then(t=>t.map(e=>new U(e,{skip:!0})))}var qe=["tauri://created","tauri://error"],U=class{constructor(e,n={}){var r;this.label=e,this.listeners=Object.create(null),n?.skip||s("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;return(n=(await We()).find(r=>r.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return je()}static async getAll(){return We()}static async getFocusedWindow(){for(let e of await We())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(qe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:n});return}return X(e,n)}async emitTo(e,n,r){if(qe.includes(n)){for(let i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return ee(e,n,r)}_handleTauriEvent(e,n){return qe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return s("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return s("plugin:window|inner_position",{label:this.label}).then(e=>new g(e))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then(e=>new g(e))}async innerSize(){return s("plugin:window|inner_size",{label:this.label}).then(e=>new A(e))}async outerSize(){return s("plugin:window|outer_size",{label:this.label}).then(e=>new A(e))}async isFullscreen(){return s("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return s("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return s("plugin:window|is_maximized",{label:this.label})}async isFocused(){return s("plugin:window|is_focused",{label:this.label})}async isDecorated(){return s("plugin:window|is_decorated",{label:this.label})}async isResizable(){return s("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return s("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return s("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return s("plugin:window|is_closable",{label:this.label})}async isVisible(){return s("plugin:window|is_visible",{label:this.label})}async title(){return s("plugin:window|title",{label:this.label})}async theme(){return s("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return s("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return s("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return s("plugin:window|scene_identifier",{label:this.label})}async center(){return s("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===Ne.Critical?n={type:"Critical"}:n={type:"Informational"}),s("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return s("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return s("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return s("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return s("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return s("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return s("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return s("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return s("plugin:window|maximize",{label:this.label})}async unmaximize(){return s("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return s("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return s("plugin:window|minimize",{label:this.label})}async unminimize(){return s("plugin:window|unminimize",{label:this.label})}async show(){return s("plugin:window|show",{label:this.label})}async hide(){return s("plugin:window|hide",{label:this.label})}async close(){return s("plugin:window|close",{label:this.label})}async destroy(){return s("plugin:window|destroy",{label:this.label})}async setDecorations(e){return s("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return s("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return s("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return s("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return s("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return s("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return s("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return s("plugin:window|set_size",{label:this.label,value:e instanceof C?e:new C(e)})}async setMinSize(e){return s("plugin:window|set_min_size",{label:this.label,value:e instanceof C?e:e?new C(e):null})}async setMaxSize(e){return s("plugin:window|set_max_size",{label:this.label,value:e instanceof C?e:e?new C(e):null})}async setSizeConstraints(e){function n(r){return r?{Logical:r}:null}return s("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(e?.minWidth),minHeight:n(e?.minHeight),maxWidth:n(e?.maxWidth),maxHeight:n(e?.maxHeight)}})}async setPosition(e){return s("plugin:window|set_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setFullscreen(e){return s("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return s("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return s("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return s("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return s("plugin:window|set_icon",{label:this.label,value:ne(e)})}async setSkipTaskbar(e){return s("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return s("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return s("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return s("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return s("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return s("plugin:window|set_cursor_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setIgnoreCursorEvents(e){return s("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return s("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return s("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return s("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return s("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return s("plugin:window|set_overlay_icon",{label:this.label,value:e?ne(e):void 0})}async setProgressBar(e){return s("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return s("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return s("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return s("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(f.WINDOW_RESIZED,n=>{n.payload=new A(n.payload),e(n)})}async onMoved(e){return this.listen(f.WINDOW_MOVED,n=>{n.payload=new g(n.payload),e(n)})}async onCloseRequested(e){return this.listen(f.WINDOW_CLOSE_REQUESTED,async n=>{let r=new ze(n);await e(r),r.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let n=await this.listen(f.DRAG_ENTER,a=>{e({...a,payload:{type:"enter",paths:a.payload.paths,position:new g(a.payload.position)}})}),r=await this.listen(f.DRAG_OVER,a=>{e({...a,payload:{type:"over",position:new g(a.payload.position)}})}),i=await this.listen(f.DRAG_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload.paths,position:new g(a.payload.position)}})}),o=await this.listen(f.DRAG_LEAVE,a=>{e({...a,payload:{type:"leave"}})});return()=>{n(),i(),r(),o()}}async onFocusChanged(e){let n=await this.listen(f.WINDOW_FOCUS,i=>{e({...i,payload:!0})}),r=await this.listen(f.WINDOW_BLUR,i=>{e({...i,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen(f.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(f.WINDOW_THEME_CHANGED,e)}},Pt;(function(t){t.Disabled="disabled",t.Throttle="throttle",t.Suspend="suspend"})(Pt||(Pt={}));var At;(function(t){t.Default="default",t.FluentOverlay="fluentOverlay"})(At||(At={}));var St;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(St||(St={}));var kt;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(kt||(kt={}));function He(){return new V(je(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function Rt(){return s("plugin:webview|get_all_webviews").then(t=>t.map(e=>new V(new U(e.windowLabel,{skip:!0}),e.label,{skip:!0})))}var Me=["tauri://created","tauri://error"],V=class{constructor(e,n,r){this.window=e,this.label=n,this.listeners=Object.create(null),r?.skip||s("plugin:webview|create_webview",{windowLabel:e.label,options:{...r,label:n}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;return(n=(await Rt()).find(r=>r.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return He()}static async getAll(){return Rt()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"Webview",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"Webview",label:this.label}})}async emit(e,n){if(Me.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:n});return}return X(e,n)}async emitTo(e,n,r){if(Me.includes(n)){for(let i of this.listeners[n]||[])i({event:n,id:-1,payload:r});return}return ee(e,n,r)}_handleTauriEvent(e,n){return Me.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async position(){return s("plugin:webview|webview_position",{label:this.label}).then(e=>new g(e))}async size(){return s("plugin:webview|webview_size",{label:this.label}).then(e=>new A(e))}async close(){return s("plugin:webview|webview_close",{label:this.label})}async setSize(e){return s("plugin:webview|set_webview_size",{label:this.label,value:e instanceof C?e:new C(e)})}async setPosition(e){return s("plugin:webview|set_webview_position",{label:this.label,value:e instanceof S?e:new S(e)})}async setFocus(){return s("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(e){return s("plugin:webview|set_webview_auto_resize",{label:this.label,value:e})}async hide(){return s("plugin:webview|webview_hide",{label:this.label})}async show(){return s("plugin:webview|webview_show",{label:this.label})}async setZoom(e){return s("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return s("plugin:webview|reparent",{label:this.label,window:typeof e=="string"?e:e.label})}async clearAllBrowsingData(){return s("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(e){return s("plugin:webview|set_webview_background_color",{color:e})}async onDragDropEvent(e){let n=await this.listen(f.DRAG_ENTER,a=>{e({...a,payload:{type:"enter",paths:a.payload.paths,position:new g(a.payload.position)}})}),r=await this.listen(f.DRAG_OVER,a=>{e({...a,payload:{type:"over",position:new g(a.payload.position)}})}),i=await this.listen(f.DRAG_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload.paths,position:new g(a.payload.position)}})}),o=await this.listen(f.DRAG_LEAVE,a=>{e({...a,payload:{type:"leave"}})});return()=>{n(),i(),r(),o()}}};te();N();function gn(){let t=He();return new O(t.label,{skip:!0})}async function Ot(){return s("plugin:window|get_all_windows").then(t=>t.map(e=>new O(e,{skip:!0})))}var O=class t{constructor(e,n={}){var r;this.label=e,this.listeners=Object.create(null),n?.skip||s("plugin:webview|create_webview_window",{options:{...n,parent:typeof n.parent=="string"?n.parent:(r=n.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static async getByLabel(e){var n;let r=(n=(await Ot()).find(i=>i.label===e))!==null&&n!==void 0?n:null;return r?new t(r.label,{skip:!0}):null}static getCurrent(){return gn()}static async getAll(){return Ot()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:I(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}:z(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async setBackgroundColor(e){return s("plugin:window|set_background_color",{color:e}).then(()=>s("plugin:webview|set_webview_background_color",{color:e}))}};bn(O,[U,V]);function bn(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{var i;typeof t.prototype=="object"&&t.prototype&&r in t.prototype||Object.defineProperty(t.prototype,r,(i=Object.getOwnPropertyDescriptor(n.prototype,r))!==null&&i!==void 0?i:Object.create(null))})})}var _n=()=>{if(typeof window<"u"&&(window.__TAURI__||window.__TAURI_INTERNALS__))return"tauri";if(typeof window<"u"){if(window.Capacitor?.isNativePlatform?.())return window.Capacitor.getPlatform();if(window.Capacitor?.getPlatform){let t=window.Capacitor.getPlatform();if(t==="ios"||t==="android")return t}}return"web"},Be=_n(),re=Be==="android"||Be==="ios",ie=Be==="tauri";var ye=[];function Lt(t,e=null){ye.forEach(n=>{try{n(t,e)}catch(r){console.error("Google listener error:",r)}})}function Ge(t){return ye.push(t),()=>{let e=ye.indexOf(t);e!==-1&&ye.splice(e,1)}}var me=null,Ye=async({appId:t="tevrocsoft",serviceUrl:e="https://tevrocsoftapi.netlify.app"}={})=>{let n=`${e}/login?mode=mobile&app=${t}`;if(re){await he.open({url:n});return}if(ie){let o=`${e}/login?mode=desktop&app=${t}`,a=new O("auth",{url:o,title:"Tevroc Login",width:550,height:500,resizable:!0,center:!0});me=a,a.once("tauri://created",()=>{console.log("Auth window opened")}),a.once("tauri://error",u=>{console.error("Auth window error:",u)});return}let i=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?"localhost":"netlify";n=`${e}/login?mode=${i}&app=${t}`,window.location.href=n},xt=async t=>{try{if(!t?.includes("token="))return;let n=new URLSearchParams(t.split("?")[1]).get("token"),i=await(await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${n}`}})).json(),o={id:i.sub,firstName:i.given_name,lastName:i.family_name,email:i.email,photo:i.picture,accessToken:n};localStorage.setItem("user",JSON.stringify(o)),localStorage.setItem("idToken",n),Lt(o,null)}catch(e){Lt(null,e)}};(0,Fe.useEffect)(()=>{if(!re)return;let t=Ue.addListener("appUrlOpen",e=>{xt(e.url)});return()=>t.remove()},[]);(0,Fe.useEffect)(()=>{if(!ie)return;let t;return(async()=>{let{listen:n}=await Promise.resolve().then(()=>(te(),Ct));t=await n("deep-link://open-url",async r=>{let i=r.payload;if(typeof i=="object"&&(i=i?.url||i?.payload||null),!!i){if(me)try{await me.close(),me=null}catch{}xt(i)}})})(),()=>{t?.()}},[]);var It=Xe(ke(),1);var Ve=[];function Ut(t){return Ve.push(t),()=>{let e=Ve.indexOf(t);e!==-1&&Ve.splice(e,1)}}var vn=null,$t=async(t,{appId:e="tevrocsoft",serviceUrl:n="https://tevrocsoftapi.netlify.app"}={})=>{let r=Math.round(Number(t)*100),i=`${n}/pay`,o=`${i}?mode=mobile&amount=${r}&app=${e}`;if(re){await he.open({url:o});return}if(ie){let c=`${i}?mode=desktop&amount=${r}&app=${e}`,w=new O("payment",{url:c,title:"Complete Payment",width:550,height:600,resizable:!0,center:!0});vn=w,w.once("tauri://created",()=>{console.log("Payment window opened")}),w.once("tauri://error",v=>{console.error("Payment window error:",v)});return}let u=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?"localhost":"netlify";window.location.href=`${i}?mode=${u}&amount=${r}&app=${e}`};var En=3e4,j=class extends Error{constructor(e,n={}){super(e),this.name="TevrocError",this.status=n.status,this.code=n.code,this.details=n.details,this.response=n.response}};function Cn(t={}){return new ge(t)}var ge=class{constructor(e={}){let n=e.baseUrl??e.url,r=e.serviceUrl??e.url;if(!n)throw new TypeError("createClient requires a baseUrl");if(this.baseUrl=Wt(n),this.serviceUrl=Wt(r),this.fetch=(e.fetch??globalThis.fetch).bind(globalThis),typeof this.fetch!="function")throw new TypeError("No fetch implementation available");this.timeoutMs=e.timeoutMs??En,this.defaultHeaders=Nn(e.headers),this.token=e.token??null,this.auth=Pn(this),this.entities=An(this),this.functions=kn(this),this.integrations=Rn(this),this.agents=On(this),this.logs=xn(this),this.connectors=In(this),this.customIntegrations=Un(this),this.sso=$n(this),this.files=Dn(this),this.payments=Tn(this)}setToken(e){return this.token=e||null,this.token?localStorage.setItem("tevroc_access_token",this.token):localStorage.removeItem("tevroc_access_token"),this}clearToken(){return this.token=null,localStorage.removeItem("tevroc_access_token"),this}async request(e,n={}){let r=(n.method??"GET").toUpperCase(),i=new Headers(this.defaultHeaders),o=n.query?qn(n.query):"",a=`${this.baseUrl}${e.startsWith("/")?e:`/${e}`}${o}`,u=new AbortController,c=setTimeout(()=>u.abort(),n.timeoutMs??this.timeoutMs),w=this.token||localStorage.getItem("tevroc_access_token");w&&n.auth!==!1&&i.set("authorization",`Bearer ${w}`),console.log(w);let v=n.body;if(v!=null&&zn(v)&&(i.set("content-type","application/json"),v=JSON.stringify(v)),n.headers)for(let[d,p]of Object.entries(n.headers))p!=null&&i.set(d,String(p));try{let d=await this.fetch(a,{method:r,headers:i,body:v,signal:n.signal??u.signal});return await Wn(d,n.parseAs)}catch(d){throw d?.name==="AbortError"?new j("Request timed out",{code:"timeout"}):d instanceof j?d:new j(d?.message??"Network request failed",{code:"network_error",details:d})}finally{clearTimeout(c)}}};function Tn(t){return{create:async({amountZAR:e,appId:n="tevrocsoft",mode:r="web"})=>await $t(e,{appId:n,serviceUrl:t.serviceUrl,mode:r}),onstatus:e=>{if(typeof e!="function")throw new Error("onstatus requires a function");return Ut(e)}}}function Pn(t){return{async register(e){let n=await t.request("/auth/register",{method:"POST",body:e,auth:!1});return n.token&&t.setToken(n.token),n},loginWithProvider:(e,n)=>{e==="google"&&(Ye({serviceUrl:t.serviceUrl,redirectTo:n}),n&&Ge(async(r,i)=>{let o=await t.request("/provider/google/auth/login",{method:"POST",body:{user:r},auth:!1});window.location.href=n}))},googleLogin:e=>Ye(e),onGoogleLogin:e=>Ge(e),async login(e){let n=await t.request("/auth/login",{method:"POST",body:e,auth:!1});return n.token&&t.setToken(n.token),n},async logout(){let e=await t.request("/auth/logout",{method:"POST"});return t.clearToken(),e},me:()=>t.request("/auth/me"),verifyOtp:e=>t.request("/auth/verify-otp",{method:"POST",body:e,auth:!1}),changePassword:e=>t.request("/auth/change-password",{method:"POST",body:e}),resetPassword:e=>t.request("/auth/reset-password",{method:"POST",body:e,auth:!1}),loginUrl:e=>t.request("/auth/login-url",{query:e?{redirectTo:e}:void 0,auth:!1})}}function An(t){return new Proxy({},{get(e,n){if(typeof n=="string")return Sn(t,n)}})}function Sn(t,e){let n=`/entities/${encodeURIComponent(e)}`;return{list:r=>t.request(n,{query:r}),get:r=>t.request(`${n}/${encodeURIComponent(r)}`),create:r=>t.request(n,{method:"POST",body:r}),update:(r,i)=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"PATCH",body:i}),delete:r=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"DELETE"}),query:(r={})=>t.request(`${n}/query`,{method:"POST",body:r}),bulkCreate:r=>t.request(`${n}/bulk`,{method:"POST",body:{records:r}}),bulkUpdate:r=>t.request(`${n}/bulk`,{method:"PATCH",body:{records:r}}),bulkDelete:r=>t.request(`${n}/bulk`,{method:"DELETE",body:{ids:r}}),import:r=>t.request(`${n}/import`,{method:"POST",body:{records:r}})}}function kn(t){return new Proxy({invoke:(e,n)=>t.request(`/functions/${encodeURIComponent(e)}`,{method:"POST",body:n})},{get(e,n){if(n in e)return e[n];if(typeof n=="string")return r=>e.invoke(n,r)}})}function Rn(t){return{Core:{InvokeLLM:e=>t.request("/integrations/core/invoke-llm",{method:"POST",body:e}),GenerateImage:e=>t.request("/integrations/core/generate-image",{method:"POST",body:e}),UploadFile:(e,n={})=>Dt(t,"/integrations/core/upload-file",e,n),UploadPrivateFile:(e,n={})=>Dt(t,"/integrations/core/upload-private-file",e,n),CreateFileSignedUrl:e=>t.request("/integrations/core/create-file-signed-url",{method:"POST",body:e}),SendEmail:e=>t.request("/integrations/core/send-email",{method:"POST",body:e}),ExtractDataFromUploadedFile:e=>t.request("/integrations/core/extract-data-from-uploaded-file",{method:"POST",body:e})}}}function On(t){return new Proxy({},{get(e,n){if(typeof n=="string")return Ln(t,n)}})}function Ln(t,e){let n=`/agents/${encodeURIComponent(e)}/conversations`;return{createConversation:(r={})=>t.request(n,{method:"POST",body:r}),listConversations:()=>t.request(n),getConversation:r=>t.request(`${n}/${encodeURIComponent(r)}`),deleteConversation:r=>t.request(`${n}/${encodeURIComponent(r)}`,{method:"DELETE"}),addMessage:(r,i)=>t.request(`${n}/${encodeURIComponent(r)}/messages`,{method:"POST",body:i}),listMessages:r=>t.request(`${n}/${encodeURIComponent(r)}/messages`)}}function xn(t){return{list:e=>t.request("/app-logs",{query:e}),create:e=>t.request("/app-logs",{method:"POST",body:e}),get:e=>t.request(`/app-logs/${encodeURIComponent(e)}`)}}function In(t){return{list:()=>t.request("/connectors"),get:e=>t.request(`/connectors/${encodeURIComponent(e)}`),connect:(e,n={})=>t.request(`/connectors/${encodeURIComponent(e)}/connect`,{method:"POST",body:n}),disconnect:e=>t.request(`/connectors/${encodeURIComponent(e)}/disconnect`,{method:"POST"}),status:e=>t.request(`/connectors/${encodeURIComponent(e)}/status`),user:{list:()=>t.request("/user-connectors"),get:e=>t.request(`/user-connectors/${encodeURIComponent(e)}`),refresh:e=>t.request(`/user-connectors/${encodeURIComponent(e)}/refresh`,{method:"POST"}),delete:e=>t.request(`/user-connectors/${encodeURIComponent(e)}`,{method:"DELETE"})}}}function Un(t){return new Proxy({invoke:(e,n,r)=>t.request(`/custom-integrations/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{method:"POST",body:r})},{get(e,n){if(n in e)return e[n];if(typeof n=="string")return new Proxy({},{get(r,i){if(typeof i=="string")return o=>e.invoke(n,i,o)}})}})}function $n(t){return{accessToken:e=>t.request("/sso/access-token",{method:"POST",body:e,auth:!1}),callback:e=>t.request("/sso/callback",{query:e,auth:!1})}}function Dn(t){return{url:e=>`${t.baseUrl}/files/${encodeURIComponent(e)}`,privateUrl:e=>`${t.baseUrl}/private-files/${encodeURIComponent(e)}`,get:e=>t.request(`/files/${encodeURIComponent(e)}`,{parseAs:"response",auth:!1}),getPrivate:e=>t.request(`/private-files/${encodeURIComponent(e)}`,{parseAs:"response"})}}function Dt(t,e,n,r){let i={};return r.filename&&(i["x-filename"]=r.filename),r.contentType&&(i["content-type"]=r.contentType),t.request(e,{method:"POST",body:n,headers:i})}async function Wn(t,e){if(e==="response")return t;let r=(t.headers.get("content-type")??"").includes("application/json"),i=r?await t.json():await t.text();if(!t.ok){let o=r&&i?.error?i.error:{};throw new j(o.message??t.statusText,{status:t.status,code:o.code??"api_error",details:o.details??i,response:t})}return i}function qn(t){let e=new URLSearchParams;for(let[r,i]of Object.entries(t))if(i!=null)if(Array.isArray(i))for(let o of i)e.append(r,String(o));else e.set(r,String(i));let n=e.toString();return n?`?${n}`:""}function Wt(t){return String(t).replace(/\/+$/,"")}function Nn(t={}){return Object.fromEntries(new Headers(t).entries())}function zn(t){let e=typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer,n=typeof Blob<"u"&&t instanceof Blob,r=typeof FormData<"u"&&t instanceof FormData;return typeof t=="object"&&!e&&!n&&!r}return Gt(jn);})();
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
react/cjs/react.production.js:
|
package/tevroc-sdk.umd.js
CHANGED
|
@@ -4806,10 +4806,28 @@ var Tevroc = (() => {
|
|
|
4806
4806
|
if (result.token) client.setToken(result.token);
|
|
4807
4807
|
return result;
|
|
4808
4808
|
},
|
|
4809
|
+
// base44
|
|
4810
|
+
loginWithProvider: (provider, redirectTo) => {
|
|
4811
|
+
if (provider === "google") {
|
|
4812
|
+
createGoogleLogin({ serviceUrl: client.serviceUrl, redirectTo });
|
|
4813
|
+
if (redirectTo) {
|
|
4814
|
+
subscribeGoogleLogin(async (user, err) => {
|
|
4815
|
+
const result = await client.request("/provider/google/auth/login", {
|
|
4816
|
+
method: "POST",
|
|
4817
|
+
body: { user },
|
|
4818
|
+
auth: false
|
|
4819
|
+
});
|
|
4820
|
+
window.location.href = redirectTo;
|
|
4821
|
+
});
|
|
4822
|
+
}
|
|
4823
|
+
}
|
|
4824
|
+
},
|
|
4825
|
+
// extra
|
|
4809
4826
|
googleLogin: (params) => createGoogleLogin(params),
|
|
4810
4827
|
onGoogleLogin: (callback) => {
|
|
4811
4828
|
return subscribeGoogleLogin(callback);
|
|
4812
4829
|
},
|
|
4830
|
+
//
|
|
4813
4831
|
async login(input) {
|
|
4814
4832
|
const result = await client.request("/auth/login", { method: "POST", body: input, auth: false });
|
|
4815
4833
|
if (result.token) client.setToken(result.token);
|