🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@qonto/embed-sdk

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qonto/embed-sdk - npm Package Compare versions

Comparing version
0.64.0
to
0.64.1
+1
dist/server/node_m...-browser/lib/esm/attribution/helpers.js
import{__rest as e,__assign as r,__read as i}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BASE_CAMPAIGN as n}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";import{Identify as t}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";import{createIdentifyEvent as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js";var a=function(e){var r=e.split(".");return r.length<=2?e:r.slice(r.length-2,r.length).join(".")},o=function(r,i,n,t,s){void 0===s&&(s=!0),r.referrer;var o=r.referring_domain,c=e(r,["referrer","referring_domain"]),l=i||{};l.referrer;var d=l.referring_domain,m=e(l,["referrer","referring_domain"]);if(u(n.excludeReferrers,r.referring_domain))return t.debug("This is not a new campaign because ".concat(r.referring_domain," is in the exclude referrer list.")),!1;if(!s&&function(e){return Object.values(e).every((function(e){return!e}))}(r)&&i)return t.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var f=JSON.stringify(c)!==JSON.stringify(m),p=a(o||"")!==a(d||""),g=!i||f||p;return g?t.debug("This is a new campaign. An $identify event will be sent."):t.debug("This is not a new campaign because it's the same as the previous one."),g},u=function(e,r){return void 0===e&&(e=[]),void 0===r&&(r=""),e.some((function(e){return e instanceof RegExp?e.test(r):e===r}))},c=function(e,a){var o=r(r({},n),e),u=Object.entries(o).reduce((function(e,r){var n,t=i(r,2),s=t[0],o=t[1];return e.setOnce("initial_".concat(s),null!==(n=null!=o?o:a.initialEmptyValue)&&void 0!==n?n:"EMPTY"),o?e.set(s,o):e.unset(s)}),new t);return s(u)},l=function(e){var r=e;return r?(r.startsWith(".")&&(r=r.substring(1)),[new RegExp("".concat(r.replace(".","\\."),"$"))]):[]};export{c as createCampaignEvent,l as getDefaultExcludedReferrers,u as isExcludedReferrer,o as isNewCampaign};
import{__assign as e,__awaiter as t,__generator as i,__read as s}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getDefaultExcludedReferrers as a,isNewCampaign as r,createCampaignEvent as o}from"./helpers.js";import{getStorageKey as n}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/helpers.js";import{BASE_CAMPAIGN as p}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";import{isNewSession as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/session.js";import{CampaignParser as m}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js";var u=function(){function u(t,i){var s;this.shouldTrackNewCampaign=!1,this.options=e({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:a(null===(s=i.cookieOptions)||void 0===s?void 0:s.domain)},t),this.storage=i.cookieStorage,this.storageKey=n(i.apiKey,"MKTG"),this.webExpStorageKey=n(i.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=p,this.sessionTimeout=i.sessionTimeout,this.lastEventTime=i.lastEventTime,this.logger=i.loggerProvider,i.loggerProvider.log("Installing web attribution tracking.")}return u.prototype.init=function(){return t(this,void 0,void 0,(function(){var e,t;return i(this,(function(i){switch(i.label){case 0:return[4,this.fetchCampaign()];case 1:return t=s.apply(void 0,[i.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||l(this.sessionTimeout,this.lastEventTime),r(this.currentCampaign,this.previousCampaign,this.options,this.logger,e)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))},u.prototype.fetchCampaign=function(){return t(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new m).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}}))}))},u.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t=o(this.currentCampaign,this.options);return e&&(t.event_id=e),t},u.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},u}();export{u as WebAttribution};
import{AmplitudeBrowser as e}from"./browser-client.js";import{debugWrapper as i,getClientStates as n,getClientLogConfig as t}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js";var d=function(){var d=new e;return{init:i(d.init.bind(d),"init",t(d),n(d,["config"])),add:i(d.add.bind(d),"add",t(d),n(d,["config.apiKey","timeline.plugins"])),remove:i(d.remove.bind(d),"remove",t(d),n(d,["config.apiKey","timeline.plugins"])),track:i(d.track.bind(d),"track",t(d),n(d,["config.apiKey","timeline.queue.length"])),logEvent:i(d.logEvent.bind(d),"logEvent",t(d),n(d,["config.apiKey","timeline.queue.length"])),identify:i(d.identify.bind(d),"identify",t(d),n(d,["config.apiKey","timeline.queue.length"])),groupIdentify:i(d.groupIdentify.bind(d),"groupIdentify",t(d),n(d,["config.apiKey","timeline.queue.length"])),setGroup:i(d.setGroup.bind(d),"setGroup",t(d),n(d,["config.apiKey","timeline.queue.length"])),revenue:i(d.revenue.bind(d),"revenue",t(d),n(d,["config.apiKey","timeline.queue.length"])),flush:i(d.flush.bind(d),"flush",t(d),n(d,["config.apiKey","timeline.queue.length"])),getUserId:i(d.getUserId.bind(d),"getUserId",t(d),n(d,["config","config.userId"])),setUserId:i(d.setUserId.bind(d),"setUserId",t(d),n(d,["config","config.userId"])),getDeviceId:i(d.getDeviceId.bind(d),"getDeviceId",t(d),n(d,["config","config.deviceId"])),setDeviceId:i(d.setDeviceId.bind(d),"setDeviceId",t(d),n(d,["config","config.deviceId"])),reset:i(d.reset.bind(d),"reset",t(d),n(d,["config","config.userId","config.deviceId"])),getSessionId:i(d.getSessionId.bind(d),"getSessionId",t(d),n(d,["config"])),setSessionId:i(d.setSessionId.bind(d),"setSessionId",t(d),n(d,["config"])),extendSession:i(d.extendSession.bind(d),"extendSession",t(d),n(d,["config"])),setOptOut:i(d.setOptOut.bind(d),"setOptOut",t(d),n(d,["config"])),setTransport:i(d.setTransport.bind(d),"setTransport",t(d),n(d,["config"])),getIdentity:i(d.getIdentity.bind(d),"getIdentity",t(d),n(d,["config"])),getOptOut:i(d.getOptOut.bind(d),"getOptOut",t(d),n(d,["config"])),_setDiagnosticsSampleRate:i(d._setDiagnosticsSampleRate.bind(d),"_setDiagnosticsSampleRate",t(d),n(d,["config"]))}},s=d();export{d as createInstance,s as default};
import{__extends as i,__assign as e,__awaiter as t,__generator as s,__rest as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isSessionTrackingEnabled as n,isPageUrlEnrichmentEnabled as r,isWebVitalsEnabled as a,isNetworkTrackingEnabled as d,getNetworkTrackingConfig as c,isFrustrationInteractionsEnabled as l,getFrustrationInteractionsConfig as u,isElementInteractionsEnabled as p,getElementInteractionsConfig as g,isPageViewTrackingEnabled as m,getPageViewTrackingConfig as f,isFormInteractionTrackingEnabled as h,isFileDownloadTrackingEnabled as v,isAttributionTrackingEnabled as b,getAttributionTrackingConfig as y}from"./default-tracking.js";import{isInstanceProxy as _,convertProxyObjectToRealObject as I}from"./utils/snippet-helper.js";import{Context as w}from"./plugins/context.js";import{createTransport as j,useBrowserConfig as k}from"./config.js";import{formInteractionTracking as S}from"./plugins/form-interaction-tracking.js";import{fileDownloadTracking as P}from"./plugins/file-download-tracking.js";import{DEFAULT_SESSION_END_EVENT as C,DEFAULT_SESSION_START_EVENT as T}from"./constants.js";import{detNotify as D}from"./det-notification.js";import{networkConnectivityCheckerPlugin as N}from"./plugins/network-connectivity-checker.js";import{updateBrowserConfigWithRemoteConfig as A}from"./config/joined-config.js";import{WebAttribution as E}from"./attribution/web-attribution.js";import{LIBPREFIX as q}from"./lib-prefix.js";import{VERSION as R}from"./version.js";import{returnWrapper as O}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js";import{setConnectorUserId as U,setConnectorDeviceId as K,getAnalyticsConnector as x}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/analytics-connector.js";import{UUID as z}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";import{createIdentifyEvent as B}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js";import{AmplitudeCore as F}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/core-client.js";import{pageUrlEnrichmentPlugin as J}from"../../../../../../@amplitude_plugin-page-url-enrichment-browser@0.5.8/node_modules/@amplitude/plugin-page-url-enrichment-browser/lib/esm/page-url-enrichment.js";import{webVitalsPlugin as Q}from"../../../../../../@amplitude_plugin-web-vitals-browser@1.1.2/node_modules/@amplitude/plugin-web-vitals-browser/lib/esm/web-vitals-plugin.js";import{networkCapturePlugin as Z}from"../../../../../../@amplitude_plugin-network-capture-browser@1.7.2/node_modules/@amplitude/plugin-network-capture-browser/lib/esm/network-capture-plugin.js";import{frustrationPlugin as Y}from"../../../../../../@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/frustration-plugin.js";import{autocapturePlugin as G}from"../../../../../../@amplitude_plugin-autocapture-browser@1.18.2/node_modules/@amplitude/plugin-autocapture-browser/lib/esm/autocapture-plugin.js";import{pageViewTrackingPlugin as H}from"../../../../../../@amplitude_plugin-page-view-tracking-browser@2.6.5/node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/page-view-tracking.js";import{IdentityEventSender as L}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/identity.js";import{Destination as M}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js";import{getQueryParams as V}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/query-params.js";import{OfflineDisabled as W}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js";import{DiagnosticsClient as X}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-client.js";import{RemoteConfigClient as $}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config.js";import{Identify as ii}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";import{Revenue as ei}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";import{isNewSession as ti}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/session.js";import{SpecialEventType as si}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";var oi=function(F){function oi(){var i=null!==F&&F.apply(this,arguments)||this;return i._diagnosticsSampleRate=0,i}return i(oi,F),oi.prototype.init=function(i,t,s){var o,n;return void 0===i&&(i=""),arguments.length>2?(o=t,n=s):"string"==typeof t?(o=t,n=void 0):(o=null==t?void 0:t.userId,n=t),O(this._init(e(e({},n),{userId:o,apiKey:i})))},oi.prototype._init=function(i){var e,n,_,I;return t(this,void 0,void 0,(function(){var t,j,C,T,O,U,K,z,B,ii=this;return s(this,(function(s){switch(s.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,k(i.apiKey,i,this)]);case 1:return t=s.sent(),t.remoteConfig&&t.remoteConfig.fetchRemoteConfig?(j=new $(t.apiKey,t.loggerProvider,t.serverZone,null===(e=t.remoteConfig)||void 0===e?void 0:e.serverUrl),[4,new Promise((function(i){null==j||j.subscribe("configs.analyticsSDK.browserSDK","all",(function(e,s,o){t.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:e,source:s,lastFetch:o},null,2)),e&&A(e,t),i()}))}))]):[3,4];case 2:return s.sent(),[4,new Promise((function(i){null==j||j.subscribe("configs.diagnostics.browserSDK","all",(function(e,s,o){if(t.loggerProvider.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:e,source:s,lastFetch:o},null,2)),e){var n=e.sampleRate;"number"!=typeof n||isNaN(n)||(t.diagnosticsSampleRate=n);var r=e.enabled;"boolean"==typeof r&&(t.enableDiagnostics=r)}i()}))}))];case 3:s.sent(),s.label=4;case 4:return(C=new X(t.apiKey,t.loggerProvider,t.serverZone,{enabled:t.enableDiagnostics,sampleRate:t.diagnosticsSampleRate})).setTag("library","".concat(q,"/").concat(R)),C.setTag("user_agent",navigator.userAgent),[4,F.prototype._init.call(this,t)];case 5:return s.sent(),this.logBrowserOptions(t),this.config.diagnosticsClient=C,this.config.remoteConfigClient=j,b(this.config.defaultTracking)?(T=y(this.config),this.webAttribution=new E(T,this.config),[4,this.webAttribution.init()]):[3,7];case 6:s.sent(),s.label=7;case 7:return O=V(),U=O.ampTimestamp?Number(O.ampTimestamp):void 0,K=!U||Date.now()<U,z=K&&!Number.isNaN(Number(O.ampSessionId))?Number(O.ampSessionId):void 0,this.setSessionId(null!==(I=null!==(_=null!==(n=i.sessionId)&&void 0!==n?n:z)&&void 0!==_?_:this.config.sessionId)&&void 0!==I?I:Date.now()),(B=x(i.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===W?[3,9]:[4,this.add(N()).promise];case 8:s.sent(),s.label=9;case 9:return[4,this.add(new M({diagnosticsClient:C})).promise];case 10:return s.sent(),[4,this.add(new w).promise];case 11:return s.sent(),[4,this.add(new L).promise];case 12:return s.sent(),D(this.config),v(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(P()).promise]):[3,14];case 13:s.sent(),s.label=14;case 14:return h(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(S()).promise]):[3,16];case 15:s.sent(),s.label=16;case 16:return m(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(H(f(this.config))).promise]):[3,18];case 17:s.sent(),s.label=18;case 18:return p(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(G(g(this.config),{diagnosticsClient:C})).promise]):[3,20];case 19:s.sent(),s.label=20;case 20:return l(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(Y(u(this.config))).promise]):[3,22];case 21:s.sent(),s.label=22;case 22:return d(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(Z(c(this.config))).promise]):[3,24];case 23:s.sent(),s.label=24;case 24:return a(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Q()).promise]):[3,26];case 25:s.sent(),s.label=26;case 26:return r(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(J()).promise]):[3,28];case 27:s.sent(),s.label=28;case 28:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 29:return s.sent(),B.eventBridge.setEventReceiver((function(i){var e=i.eventProperties||{},t=e.time,s=o(e,["time"]),n="number"==typeof t?{time:t}:void 0;ii.track(i.eventType,s,n)})),[2]}}))}))},oi.prototype.getUserId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.userId},oi.prototype.setUserId=function(i){this.config?(this.config.loggerProvider.debug("function setUserId: ",i),i===this.config.userId&&void 0!==i||(this.config.userId=i,this.timeline.onIdentityChanged({userId:i}),U(i,this.config.instanceName))):this.q.push(this.setUserId.bind(this,i))},oi.prototype.getDeviceId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.deviceId},oi.prototype.setDeviceId=function(i){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",i),i!==this.config.deviceId&&(this.config.deviceId=i,this.timeline.onIdentityChanged({deviceId:i}),K(i,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,i))},oi.prototype.reset=function(){this.setDeviceId(z()),this.setUserId(void 0),this.timeline.onReset()},oi.prototype.getIdentity=function(){var i,e;return{deviceId:null===(i=this.config)||void 0===i?void 0:i.deviceId,userId:null===(e=this.config)||void 0===e?void 0:e.userId,userProperties:this.userProperties}},oi.prototype.getOptOut=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.optOut},oi.prototype.getSessionId=function(){var i;return null===(i=this.config)||void 0===i?void 0:i.sessionId},oi.prototype.setSessionId=function(i){var e,t=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,i)),O(Promise.resolve());if(i===this.config.sessionId)return O(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",i);var s=this.getSessionId();s!==i&&this.timeline.onSessionIdChanged(i);var o=this.config.lastEventTime,r=null!==(e=this.config.lastEventId)&&void 0!==e?e:-1;this.config.sessionId=i,this.config.lastEventTime=void 0,this.config.pageCounter=0,n(this.config.defaultTracking)&&(s&&o&&t.push(this.track(C,void 0,{device_id:this.previousSessionDeviceId,event_id:++r,session_id:s,time:o+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++r,t);return this.config.identify&&t.push(this.track(B(this.config.identify)).promise),n(this.config.defaultTracking)&&t.push(this.track(T,void 0,{event_id:a?++r:r,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,O(Promise.all(t))},oi.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},oi.prototype.setTransport=function(i){this.config?this.config.transportProvider=j(i):this.q.push(this.setTransport.bind(this,i))},oi.prototype.identify=function(i,e){if(_(i)){var t=i._q;i._q=[],i=I(new ii,t)}return(null==e?void 0:e.user_id)&&this.setUserId(e.user_id),(null==e?void 0:e.device_id)&&this.setDeviceId(e.device_id),F.prototype.identify.call(this,i,e)},oi.prototype.groupIdentify=function(i,e,t,s){if(_(t)){var o=t._q;t._q=[],t=I(new ii,o)}return F.prototype.groupIdentify.call(this,i,e,t,s)},oi.prototype.revenue=function(i,e){if(_(i)){var t=i._q;i._q=[],i=I(new ei,t)}return F.prototype.revenue.call(this,i,e)},oi.prototype.trackCampaignEventIfNeeded=function(i,e){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var t=this.webAttribution.generateCampaignEvent(i);return e?e.push(this.track(t).promise):this.track(t),this.config.loggerProvider.log("Tracking attribution."),!0},oi.prototype.process=function(i){return t(this,void 0,void 0,(function(){var e,t,o;return s(this,(function(s){return e=Date.now(),t=ti(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),i.event_type===T||i.event_type===C||i.session_id&&i.session_id!==this.getSessionId()||(t||o?(this.setSessionId(e),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):t||this.trackCampaignEventIfNeeded()),i.event_type===si.IDENTIFY&&i.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(i.user_properties)),[2,F.prototype.process.call(this,i)]}))}))},oi.prototype.logBrowserOptions=function(i){try{var t=e(e({},i),{apiKey:i.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},oi.prototype._setDiagnosticsSampleRate=function(i){i>1||i<0||this.config||(this._diagnosticsSampleRate=i)},oi}(F);export{oi as AmplitudeBrowser};
import{__extends as e,__awaiter as t,__generator as o,__assign as i}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{LocalStorage as n}from"./storage/local-storage.js";import{SessionStorage as r}from"./storage/session-storage.js";import{XHRTransport as s}from"./transports/xhr.js";import{SendBeaconTransport as a}from"./transports/send-beacon.js";import{parseLegacyCookies as d}from"./cookie-migration/index.js";import{DEFAULT_IDENTITY_STORAGE as l,DEFAULT_SERVER_ZONE as u}from"./constants.js";import{VERSION as c}from"./version.js";import{FetchTransport as p}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/fetch.js";import{Logger as g}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/logger.js";import{LogLevel as v}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js";import{getCookieName as m}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js";import{Config as f}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/config.js";import{MemoryStorage as h}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js";import{getQueryParams as b}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/query-params.js";import{UUID as _}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";import{CookieStorage as y}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/cookie.js";var I=function(t){function o(e,o,i,r,s,a,d,p,m,f,b,_,y,I,S,O,j,k,w,P,T,C,L,x,R,D,M,A,K,N,U,z,B,Q,V,Z,q,F,W,G){void 0===i&&(i=new h),void 0===r&&(r={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===p&&(p=1e3),void 0===m&&(m=5),void 0===f&&(f=30),void 0===b&&(b=l),void 0===O&&(O=new g),void 0===j&&(j=v.Warn),void 0===w&&(w=!1),void 0===P&&(P=!1),void 0===L&&(L=""),void 0===x&&(x=u),void 0===D&&(D=18e5),void 0===M&&(M=new n({loggerProvider:O})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===K&&(K="fetch"),void 0===N&&(N=!1),void 0===U&&(U=!0),void 0===q&&(q=!0),void 0===F&&(F=0);var H,J=t.call(this,{apiKey:e,storageProvider:M,transportProvider:E(K)})||this;return J.apiKey=e,J.appVersion=o,J.cookieOptions=r,J.defaultTracking=s,J.autocapture=a,J.flushIntervalMillis=p,J.flushMaxRetries=m,J.flushQueueSize=f,J.identityStorage=b,J.ingestionMetadata=_,J.instanceName=y,J.loggerProvider=O,J.logLevel=j,J.minIdLength=k,J.offline=w,J.partnerId=T,J.plan=C,J.serverUrl=L,J.serverZone=x,J.sessionTimeout=D,J.storageProvider=M,J.trackingOptions=A,J.transport=K,J.useBatch=N,J.fetchRemoteConfig=U,J.networkTrackingOptions=V,J.identify=Z,J.enableDiagnostics=q,J.diagnosticsSampleRate=F,J.diagnosticsClient=W,J.remoteConfig=G,J.version=c,J._optOut=!1,J._cookieStorage=i,J.deviceId=d,J.lastEventId=I,J.lastEventTime=S,J.optOut=P,J.sessionId=R,J.pageCounter=B,J.userId=z,J.debugLogsEnabled=Q,J.loggerProvider.enable(Q?v.Debug:J.logLevel),J.networkTrackingOptions=V,J.identify=Z,J.enableDiagnostics=q,J.diagnosticsSampleRate=F,J.diagnosticsClient=W,H=!0===(null==G?void 0:G.fetchRemoteConfig)||!1!==(null==G?void 0:G.fetchRemoteConfig)&&!1!==U,J.remoteConfig=J.remoteConfig||{},J.remoteConfig.fetchRemoteConfig=H,J.fetchRemoteConfig=H,J}return e(o,t),Object.defineProperty(o.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),o.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(m(this.apiKey),e)},o}(f),S=function(e,n,r){return void 0===n&&(n={}),t(void 0,void 0,void 0,(function(){var t,s,a,u,c,p,g,v,f,y,S,E,k,w,P,T,C,L,x,R,D,M,A,K,N,U,z,B,Q,V,Z,q,F,W,G,H,J,X,Y,$,ee,te,oe,ie,ne;return o(this,(function(o){switch(o.label){case 0:return t=n.identityStorage||l,D={},t===l?[3,1]:(a="",[3,5]);case 1:return null===(A=null===(M=n.cookieOptions)||void 0===M?void 0:M.domain)||void 0===A?[3,2]:(u=A,[3,4]);case 2:return[4,j()];case 3:u=o.sent(),o.label=4;case 4:a=u,o.label=5;case 5:return s=i.apply(void 0,[(D.domain=a,D.expiration=365,D.sameSite="Lax",D.secure=!1,D.upgrade=!0,D),n.cookieOptions]),c=O(n.identityStorage,s),[4,d(e,c,null===(N=null===(K=n.cookieOptions)||void 0===K?void 0:K.upgrade)||void 0===N||N)];case 6:return p=o.sent(),[4,c.get(m(e))];case 7:return g=o.sent(),v=b(),f=v.ampTimestamp?Number(v.ampTimestamp):void 0,y=!f||Date.now()<f,S=null!==(V=null!==(Q=null!==(B=null!==(U=n.deviceId)&&void 0!==U?U:y?null!==(z=v.ampDeviceId)&&void 0!==z?z:v.deviceId:void 0)&&void 0!==B?B:null==g?void 0:g.deviceId)&&void 0!==Q?Q:p.deviceId)&&void 0!==V?V:_(),E=null!==(Z=null==g?void 0:g.lastEventId)&&void 0!==Z?Z:p.lastEventId,k=null!==(q=null==g?void 0:g.lastEventTime)&&void 0!==q?q:p.lastEventTime,w=null!==(W=null!==(F=n.optOut)&&void 0!==F?F:null==g?void 0:g.optOut)&&void 0!==W?W:p.optOut,P=null!==(G=null==g?void 0:g.sessionId)&&void 0!==G?G:p.sessionId,T=null!==(J=null!==(H=n.userId)&&void 0!==H?H:null==g?void 0:g.userId)&&void 0!==J?J:p.userId,r.previousSessionDeviceId=null!==(X=null==g?void 0:g.deviceId)&&void 0!==X?X:p.deviceId,r.previousSessionUserId=null!==(Y=null==g?void 0:g.userId)&&void 0!==Y?Y:p.userId,C={ipAddress:null===(ee=null===($=n.trackingOptions)||void 0===$?void 0:$.ipAddress)||void 0===ee||ee,language:null===(oe=null===(te=n.trackingOptions)||void 0===te?void 0:te.language)||void 0===oe||oe,platform:null===(ne=null===(ie=n.trackingOptions)||void 0===ie?void 0:ie.platform)||void 0===ne||ne},L=null==g?void 0:g.pageCounter,x=null==g?void 0:g.debugLogsEnabled,void 0!==n.autocapture&&(n.defaultTracking=n.autocapture),[4,(R=new I(e,n.appVersion,c,s,n.defaultTracking,n.autocapture,S,n.flushIntervalMillis,n.flushMaxRetries,n.flushQueueSize,t,n.ingestionMetadata,n.instanceName,E,k,n.loggerProvider,n.logLevel,n.minIdLength,n.offline,w,n.partnerId,n.plan,n.serverUrl,n.serverZone,P,n.sessionTimeout,n.storageProvider,C,n.transport,n.useBatch,n.fetchRemoteConfig,T,L,x,n.networkTrackingOptions,n.identify,n.enableDiagnostics,r._diagnosticsSampleRate,void 0,n.remoteConfig)).storageProvider.isEnabled()];case 8:return o.sent()||(R.loggerProvider.warn("Storage provider ".concat(R.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),R.storageProvider=new h),[2,R]}}))}))},O=function(e,t){switch(void 0===e&&(e=l),void 0===t&&(t={}),e){case"localStorage":return new n;case"sessionStorage":return new r;case"none":return new h;default:return new y(i(i({},t),{expirationDays:t.expiration}))}},E=function(e){return"xhr"===e?new s:"beacon"===e?new a:new p},j=function(e){return t(void 0,void 0,void 0,(function(){var e,t,i,n,r,s,a;return o(this,(function(o){switch(o.label){case 0:return[4,(new y).isEnabled()];case 1:if(!o.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=location.hostname,t=e.split("."),i=[],n="AMP_TLDTEST",r=t.length-2;r>=0;--r)i.push(t.slice(r).join("."));r=0,o.label=2;case 2:return r<i.length?(s=i[r],[4,(a=new y({domain:"."+s})).set(n,1)]):[3,7];case 3:return o.sent(),[4,a.get(n)];case 4:return o.sent()?[4,a.remove(n)]:[3,6];case 5:return o.sent(),[2,"."+s];case 6:return r++,[3,2];case 7:return[2,""]}}))}))};export{I as BrowserConfig,O as createCookieStorage,E as createTransport,j as getTopLevelDomain,S as useBrowserConfig};
import{__assign as e,__values as t,__spreadArray as r,__read as a}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{SAFE_HEADERS as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";function l(e){var n,u,i,c,p,d,s,f,v,g,y;if("object"==typeof e&&null!==e&&!Array.isArray(e)){var k=Object.keys(e);try{for(var w=t(k),b=w.next();!b.done;b=w.next()){var m=b.value;try{var h=e[m];"boolean"==typeof(null==h?void 0:h.enabled)&&(h.enabled?(delete h.enabled,0===Object.keys(h).length&&(e[m]=!0)):e[m]=!1),l(h)}catch(e){}}}catch(e){n={error:e}}finally{try{b&&!b.done&&(u=w.return)&&u.call(w)}finally{if(n)throw n.error}}try{if(null===(v=null===(f=null===(s=e.autocapture)||void 0===s?void 0:s.networkTracking)||void 0===f?void 0:f.captureRules)||void 0===v?void 0:v.length)try{for(var x=t(e.autocapture.networkTracking.captureRules),I=x.next();!I.done;I=x.next()){var R=I.value;try{for(var j=(p=void 0,t(["responseHeaders","requestHeaders"])),A=j.next();!A.done;A=j.next()){var T=A.value,C=null!==(g=R[T])&&void 0!==g?g:{},_=C.captureSafeHeaders,U=C.allowlist;(_||U)&&(void 0===U||Array.isArray(U)?R[T]=r(r([],a(_?o:[]),!1),a(null!=U?U:[]),!1):delete R[T])}}catch(e){p={error:e}}finally{try{A&&!A.done&&(d=j.return)&&d.call(j)}finally{if(p)throw p.error}}}}catch(e){i={error:e}}finally{try{I&&!I.done&&(c=x.return)&&c.call(x)}finally{if(i)throw i.error}}}catch(e){}var O=null===(y=e.autocapture)||void 0===y?void 0:y.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick))}}function n(e,r,a){var o,l,n=[];try{for(var u=t(null!=r?r:[]),i=u.next();!i.done;i=u.next()){var c=i.value;try{n.push(new RegExp(c))}catch(e){a.loggerProvider.warn("Invalid regex pattern: ".concat(c),e)}}}catch(e){o={error:e}}finally{try{i&&!i.done&&(l=u.return)&&l.call(u)}finally{if(o)throw o.error}}return e.concat(n)}function u(r,a){var o,u,i,c,p,d,s;if(r){l(r);try{a.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(r));var f=r;if(f&&"autocapture"in f){if("boolean"==typeof f.autocapture&&(a.autocapture=f.autocapture),"object"==typeof f.autocapture&&null!==f.autocapture){var v=e({},f.autocapture);if(void 0===a.autocapture&&(a.autocapture=f.autocapture),"object"==typeof f.autocapture.elementInteractions&&null!==f.autocapture.elementInteractions&&(null===(i=f.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){v.elementInteractions=e({},f.autocapture.elementInteractions);var g=v.elementInteractions,y=null!==(c=g.pageUrlAllowlist)&&void 0!==c?c:[],k=f.autocapture.elementInteractions.pageUrlAllowlistRegex;g.pageUrlAllowlist=n(y,k,a),delete g.pageUrlAllowlistRegex}if("object"==typeof f.autocapture.networkTracking&&null!==f.autocapture.networkTracking&&(null===(p=f.autocapture.networkTracking.captureRules)||void 0===p?void 0:p.length)){v.networkTracking=e({},f.autocapture.networkTracking);var w=null!==(d=v.networkTracking.captureRules)&&void 0!==d?d:[];try{for(var b=t(w),m=b.next();!m.done;m=b.next()){var h=m.value;h.urls=n(null!==(s=h.urls)&&void 0!==s?s:[],h.urlsRegex,a),delete h.urlsRegex}}catch(e){o={error:e}}finally{try{m&&!m.done&&(u=b.return)&&u.call(b)}finally{if(o)throw o.error}}}"boolean"==typeof a.autocapture&&(a.autocapture=e({attribution:a.autocapture,fileDownloads:a.autocapture,formInteractions:a.autocapture,pageViews:a.autocapture,sessions:a.autocapture,elementInteractions:a.autocapture,webVitals:a.autocapture,frustrationInteractions:a.autocapture},v)),"object"==typeof a.autocapture&&(a.autocapture=e(e({},a.autocapture),v))}a.defaultTracking=a.autocapture}a.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(a))}catch(e){a.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}export{l as translateRemoteConfigToLocal,u as updateBrowserConfigWithRemoteConfig};
var o="[Amplitude]",c="".concat(o," Form Started"),t="".concat(o," Form Submitted"),n="".concat(o," File Downloaded"),a="session_start",e="session_end",i="".concat(o," File Extension"),m="".concat(o," File Name"),r="".concat(o," Link ID"),s="".concat(o," Link Text"),F="".concat(o," Link URL"),d="".concat(o," Form ID"),l="".concat(o," Form Name"),k="".concat(o," Form Destination"),D="cookie",L="US";export{o as DEFAULT_EVENT_PREFIX,n as DEFAULT_FILE_DOWNLOAD_EVENT,c as DEFAULT_FORM_START_EVENT,t as DEFAULT_FORM_SUBMIT_EVENT,D as DEFAULT_IDENTITY_STORAGE,L as DEFAULT_SERVER_ZONE,e as DEFAULT_SESSION_END_EVENT,a as DEFAULT_SESSION_START_EVENT,i as FILE_EXTENSION,m as FILE_NAME,k as FORM_DESTINATION,d as FORM_ID,l as FORM_NAME,r as LINK_ID,s as LINK_TEXT,F as LINK_URL};
import{__awaiter as e,__generator as t,__read as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getOldCookieName as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js";var n=function(n,a,c){return void 0===c&&(c=!0),e(void 0,void 0,void 0,(function(){var e,l,u,p,d,m,v,f,b;return t(this,(function(t){switch(t.label){case 0:return e=r(n),[4,a.getRaw(e)];case 1:return(l=t.sent())?c?[4,a.remove(e)]:[3,3]:[2,{optOut:!1}];case 2:t.sent(),t.label=3;case 3:return u=o(l.split("."),6),p=u[0],d=u[1],m=u[2],v=u[3],f=u[4],b=u[5],[2,{deviceId:p,userId:s(d),sessionId:i(v),lastEventId:i(b),lastEventTime:i(f),optOut:Boolean(m)}]}}))}))},i=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},s=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}};export{s as decode,n as parseLegacyCookies,i as parseTime};
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e=function(t,e){return"boolean"==typeof t?t:!1!==(null==t?void 0:t[e])},n=function(t){return e(t,"attribution")},o=function(t){return e(t,"fileDownloads")},r=function(t){return e(t,"formInteractions")},a=function(t){return e(t,"pageViews")},i=function(t){return e(t,"sessions")},u=function(t){return e(t,"pageUrlEnrichment")},c=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.networkTracking||"object"==typeof t.networkTracking)},f=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.elementInteractions||"object"==typeof t.elementInteractions)},s=function(t){return"boolean"==typeof t?t:"object"==typeof t&&!0===t.webVitals},p=function(t){return"boolean"==typeof t?t:"object"==typeof t&&(!0===t.frustrationInteractions||"object"==typeof t.frustrationInteractions)},l=function(t){if(f(t.autocapture)&&"object"==typeof t.autocapture&&"object"==typeof t.autocapture.elementInteractions)return t.autocapture.elementInteractions},g=function(t){if(p(t.autocapture)&&"object"==typeof t.autocapture&&"object"==typeof t.autocapture.frustrationInteractions)return t.autocapture.frustrationInteractions},d=function(e){var n;if(c(e.autocapture)){var o=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?o=e.autocapture.networkTracking:e.networkTrackingOptions&&(o=e.networkTrackingOptions),t(t({},o),{captureRules:null===(n=null==o?void 0:o.captureRules)||void 0===n?void 0:n.map((function(n){var o,r,a;if((null===(o=n.urls)||void 0===o?void 0:o.length)&&(null===(r=n.hosts)||void 0===r?void 0:r.length)){var i=JSON.stringify(n.hosts),u=JSON.stringify(n.urls);return null===(a=e.loggerProvider)||void 0===a||a.warn("Found network capture rule with both urls='".concat(u,"' and hosts='").concat(i,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),t(t({},n),{hosts:void 0})}return n}))})}},k=function(t){var e,n=function(){return!1},o=void 0,r=t.pageCounter;return a(t.defaultTracking)&&(n=void 0,e=void 0,t.defaultTracking&&"object"==typeof t.defaultTracking&&t.defaultTracking.pageViews&&"object"==typeof t.defaultTracking.pageViews&&("trackOn"in t.defaultTracking.pageViews&&(n=t.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in t.defaultTracking.pageViews&&(o=t.defaultTracking.pageViews.trackHistoryChanges),"eventType"in t.defaultTracking.pageViews&&t.defaultTracking.pageViews.eventType&&(e=t.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:o,eventType:e,pageCounter:r}},y=function(e){return n(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.attribution&&"object"==typeof e.defaultTracking.attribution?t({},e.defaultTracking.attribution):{}};export{y as getAttributionTrackingConfig,l as getElementInteractionsConfig,g as getFrustrationInteractionsConfig,d as getNetworkTrackingConfig,k as getPageViewTrackingConfig,n as isAttributionTrackingEnabled,f as isElementInteractionsEnabled,o as isFileDownloadTrackingEnabled,r as isFormInteractionTrackingEnabled,p as isFrustrationInteractionsEnabled,c as isNetworkTrackingEnabled,u as isPageUrlEnrichmentEnabled,a as isPageViewTrackingEnabled,i as isSessionTrackingEnabled,s as isWebVitalsEnabled};
var e=!1,t=function(t){if(!e&&void 0===t.defaultTracking){t.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),e=!0}};export{t as detNotify};
import e from"./browser-client-factory.js";export{createInstance}from"./browser-client-factory.js";export{AmplitudeBrowser}from"./browser-client.js";export{runQueuedFunctions}from"./utils/snippet-helper.js";import*as t from"./types.js";export{t as Types};export{Revenue}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";export{Identify}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/identify.js";var s=e.add,r=e.extendSession,o=e.flush,i=e.getDeviceId,n=e.getIdentity,a=e.getOptOut,p=e.getSessionId,d=e.getUserId,l=e.groupIdentify,c=e.identify,m=e.init,u=e.logEvent,f=e.remove,y=e.reset,I=e.revenue,g=e.setDeviceId,v=e.setGroup,x=e.setOptOut,j=e.setSessionId,b=e.setTransport,_=e.setUserId,w=e.track,O=e._setDiagnosticsSampleRate;export{O as _setDiagnosticsSampleRate,s as add,r as extendSession,o as flush,i as getDeviceId,n as getIdentity,a as getOptOut,p as getSessionId,d as getUserId,l as groupIdentify,c as identify,m as init,u as logEvent,f as remove,y as reset,I as revenue,g as setDeviceId,v as setGroup,x as setOptOut,j as setSessionId,b as setTransport,_ as setUserId,w as track};
var t="amplitude-ts";export{t as LIBPREFIX};
import{__awaiter as i,__generator as t,__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{VERSION as n}from"../version.js";import{LIBPREFIX as o}from"../lib-prefix.js";import{getLanguage as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/language.js";import{UUID as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js";var a=function(){function a(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(o,"/").concat(n),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return a.prototype.setup=function(i){return this.config=i,Promise.resolve(void 0)},a.prototype.execute=function(n){var o,a;return i(this,void 0,void 0,(function(){var i,c,p;return t(this,(function(t){return i=(new Date).getTime(),c=null!==(o=this.config.lastEventId)&&void 0!==o?o:-1,p=null!==(a=n.event_id)&&void 0!==a?a:c+1,this.config.lastEventId=p,n.time||(this.config.lastEventTime=i),[2,e(e(e(e(e(e(e(e({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:s()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:r(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),n),{event_id:p,library:this.library,user_agent:this.userAgent})]}))}))},a}();export{a as Context};
import{__awaiter as e,__generator as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DEFAULT_FILE_DOWNLOAD_EVENT as n,FILE_EXTENSION as r,FILE_NAME as o,LINK_ID as i,LINK_TEXT as a,LINK_URL as d}from"../constants.js";import{getGlobalScope as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var u=function(){var u,c=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(s,f){return e(void 0,void 0,void 0,(function(){var e,m;return t(this,(function(t){return e=function(){if(f){if("undefined"!=typeof document){var e=function(e){var l;try{l=new URL(e.href,window.location.href)}catch(e){return}var u=t.exec(l.href),s=null==u?void 0:u[1];s&&function(e,t,n){e.addEventListener(t,n),c.push({element:e,type:t,handler:n})}(e,"click",(function(){var t;s&&f.track(n,((t={})[r]=s,t[o]=l.pathname,t[i]=e.id,t[a]=e.text,t[d]=e.href,t))}))},t=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;Array.from(document.getElementsByTagName("a")).forEach(e),"undefined"!=typeof MutationObserver&&(u=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){"A"===t.nodeName&&e(t),"querySelectorAll"in t&&"function"==typeof t.querySelectorAll&&Array.from(t.querySelectorAll("a")).map(e)}))}))}))).observe(document.body,{subtree:!0,childList:!0})}}else s.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?e():(m=l())?m.addEventListener("load",e):s.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]}))}))},execute:function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,n]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return null==u||u.disconnect(),c.forEach((function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)})),c=[],[2]}))}))}}};export{u as fileDownloadTracking};
import{__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DEFAULT_FORM_START_EVENT as t,FORM_ID as r,FORM_NAME as o,FORM_DESTINATION as i,DEFAULT_FORM_SUBMIT_EVENT as a}from"../constants.js";import{getGlobalScope as u}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var c=function(){var c,f=[],s=function(e,n,t){e.addEventListener(n,t),f.push({element:e,type:n,handler:t})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(f,m){return e(void 0,void 0,void 0,(function(){var e,v;return n(this,(function(n){return e=function(){if(m){if("undefined"!=typeof document){var e=function(e){var n=!1;s(e,"change",(function(){var a,u=l(e);n||m.track(t,((a={})[r]=d(e.id),a[o]=d(e.name),a[i]=u,a)),n=!0})),s(e,"submit",(function(){var u,c,f=l(e);n||m.track(t,((u={})[r]=d(e.id),u[o]=d(e.name),u[i]=f,u)),m.track(a,((c={})[r]=d(e.id),c[o]=d(e.name),c[i]=f,c)),n=!1}))};Array.from(document.getElementsByTagName("form")).forEach(e),"undefined"!=typeof MutationObserver&&(c=new MutationObserver((function(n){n.forEach((function(n){n.addedNodes.forEach((function(n){"FORM"===n.nodeName&&e(n),"querySelectorAll"in n&&"function"==typeof n.querySelectorAll&&Array.from(n.querySelectorAll("form")).map(e)}))}))}))).observe(document.body,{subtree:!0,childList:!0})}}else f.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?e():(v=u())?v.addEventListener("load",e):f.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]}))}))},execute:function(t){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,t]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return null==c||c.disconnect(),f.forEach((function(e){var n=e.element,t=e.type,r=e.handler;null==n||n.removeEventListener(t,r)})),f=[],[2]}))}))}}},d=function(e){if("string"==typeof e)return e},l=function(e){var n=e.getAttribute("action");try{n=new URL(encodeURI(null!=n?n:""),window.location.href).href}catch(e){}return n};export{l as extractFormAction,c as formInteractionTracking,d as stringOrUndefined};
import{__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as i}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var o=function(){var o=i(),t=[],r=function(e,n){(null==o?void 0:o.addEventListener)&&(null==o||o.addEventListener(e,n),t.push({type:e,handler:n}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(i,o){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return"undefined"==typeof navigator?(i.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),i.offline=!1,[2]):(i.offline=!navigator.onLine,r("online",(function(){i.loggerProvider.debug("Network connectivity changed to online."),i.offline=!1,setTimeout((function(){o.flush()}),i.flushIntervalMillis)})),r("offline",(function(){i.loggerProvider.debug("Network connectivity changed to offline."),i.offline=!0})),[2])}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return t.forEach((function(e){var n=e.type,i=e.handler;null==o||o.removeEventListener(n,i)})),t=[],[2]}))}))}}};export{o as networkConnectivityCheckerPlugin};
import{__extends as e,__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{BrowserStorage as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js";var i=1e3,s=function(l){function s(e){var t,r,i,s=this;try{i=null===(t=o())||void 0===t?void 0:t.localStorage}catch(t){null===(r=null==e?void 0:e.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(t))),i=void 0}return(s=l.call(this,i)||this).loggerProvider=null==e?void 0:e.loggerProvider,s}return e(s,l),s.prototype.set=function(e,o){var s;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return Array.isArray(o)&&o.length>i?(t=o.length-i,[4,l.prototype.set.call(this,e,o.slice(0,i))]):[3,2];case 1:return r.sent(),null===(s=this.loggerProvider)||void 0===s||s.error("Failed to save ".concat(t," events because the queue length exceeded ").concat(i,".")),[3,4];case 2:return[4,l.prototype.set.call(this,e,o)];case 3:r.sent(),r.label=4;case 4:return[2]}}))}))},s}(l);export{s as LocalStorage};
import{__extends as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as e}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{BrowserStorage as t}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js";var l=function(t){function l(){var o;return t.call(this,null===(o=e())||void 0===o?void 0:o.sessionStorage)||this}return o(l,t),l}(t);export{l as SessionStorage};
import{__extends as e,__awaiter as t,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as o}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js";import{getGlobalScope as r}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var i=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return e(i,o),i.prototype.send=function(e,o){return t(this,void 0,void 0,(function(){var t=this;return n(this,(function(n){return[2,new Promise((function(n,i){var s=r();if(!(null==s?void 0:s.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var l=JSON.stringify(o);return n(s.navigator.sendBeacon(e,JSON.stringify(o))?t.buildResponse({code:200,events_ingested:o.events.length,payload_size_bytes:l.length,server_upload_time:Date.now()}):t.buildResponse({code:500}))}catch(e){i(e)}}))]}))}))},i}(o);export{i as SendBeaconTransport};
import{__extends as t,__awaiter as e,__generator as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as s}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/transports/base.js";var r=function(s){function r(){var t=null!==s&&s.apply(this,arguments)||this;return t.state={done:4},t}return t(r,s),r.prototype.send=function(t,s){return e(this,void 0,void 0,(function(){var e=this;return n(this,(function(n){return[2,new Promise((function(n,r){"undefined"==typeof XMLHttpRequest&&r(new Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",t,!0),o.onreadystatechange=function(){if(o.readyState===e.state.done){var t=o.responseText;try{n(e.buildResponse(JSON.parse(t)))}catch(t){n(e.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(s))}))]}))}))},r}(s);export{r as XHRTransport};
export{IdentifyOperation,SpecialEventType}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";export{RevenueProperty}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/revenue.js";export{LogLevel}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js";export{ServerZone}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js";export{OfflineDisabled}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/offline.js";export{DEFAULT_ACTION_CLICK_ALLOWLIST,DEFAULT_CSS_SELECTOR_ALLOWLIST,DEFAULT_DATA_ATTRIBUTE_PREFIX}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js";
var n=function(n,r){o(n,r)},o=function(n,o){for(var r=0;r<o.length;r++){var t=o[r],e=t.name,f=t.args,i=t.resolve,u=n&&n[e];if("function"==typeof u){var a=u.apply(n,f);"function"==typeof i&&i(null==a?void 0:a.promise)}}return n},r=function(n){return n&&void 0!==n._q};export{o as convertProxyObjectToRealObject,r as isInstanceProxy,n as runQueuedFunctions};
var e=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:t(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),t=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},r=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var s=function(e,t){var r,n,o=typeof e;if(o!==typeof t)return!1;try{for(var u=i(["string","number","boolean","undefined"]),a=u.next();!a.done;a=u.next()){if(a.value===o)return e===t}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var c=Array.isArray(e),l=Array.isArray(t);if(c!==l)return!1;if(!c||!l){var f=Object.keys(e).sort(),y=Object.keys(t).sort();if(!s(f,y))return!1;var h=!0;return Object.keys(e).forEach((function(r){s(e[r],t[r])||(h=!1)})),h}for(var d=0;d<e.length;d++)if(!s(e[d],t[d]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var u=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=n({},this.identity.userProperties),r=n(n({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,s,u,a,c,l=r.userProperties||{};try{for(var f=i(Object.entries(e)),y=f.next();!y.done;y=f.next()){var h=o(y.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var v=(s=void 0,i(Object.entries(p))),g=v.next();!g.done;g=v.next()){var b=o(g.value,2),I=b[0],O=b[1];l[I]=O}}catch(e){s={error:e}}finally{try{g&&!g.done&&(u=v.return)&&u.call(v)}finally{if(s)throw s.error}}break;case"$unset":try{for(var w=(a=void 0,i(Object.keys(p))),m=w.next();!m.done;m=w.next()){delete l[I=m.value]}}catch(e){a={error:e}}finally{try{m&&!m.done&&(c=w.return)&&c.call(w)}finally{if(a)throw a.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return n({},this.identity)},e.prototype.setIdentity=function(e){var t=n({},this.identity);this.identity=n({},e),s(t,this.identity)||this.listeners.forEach((function(t){t(e)}))},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,c=function(){function t(){this.identityStore=new u,this.eventBridge=new r,this.applicationContextProvider=new e}return t.getInstance=function(e){return a.analyticsConnectorInstances||(a.analyticsConnectorInstances={}),a.analyticsConnectorInstances[e]||(a.analyticsConnectorInstances[e]=new t),a.analyticsConnectorInstances[e]},t}();export{c as AnalyticsConnector};
import{AnalyticsConnector as t}from"../../../../../../@amplitude_analytics-connector@1.6.4/node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js";import{DEFAULT_INSTANCE_NAME as e}from"./types/constants.js";var n=function(n){return void 0===n&&(n=e),t.getInstance(n)},i=function(t,e){n(e).identityStore.editIdentity().setUserId(t).commit()},o=function(t,e){n(e).identityStore.editIdentity().setDeviceId(t).commit()};export{n as getAnalyticsConnector,o as setConnectorDeviceId,i as setConnectorUserId};
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getQueryParams as o}from"../query-params.js";import{BASE_CAMPAIGN as i,UTM_CAMPAIGN as n,UTM_CONTENT as u,UTM_ID as m,UTM_MEDIUM as p,UTM_SOURCE as s,UTM_TERM as c,DCLID as f,FBCLID as d,GBRAID as a,GCLID as l,KO_CLICK_ID as v,LI_FAT_ID as _,MSCLKID as g,RDT_CID as y,TTCLID as h,TWCLID as b,WBRAID as j}from"../types/constants.js";var k=function(){function k(){}return k.prototype.parse=function(){return r(this,void 0,void 0,(function(){return t(this,(function(r){return[2,e(e(e(e({},i),this.getUtmParam()),this.getReferrer()),this.getClickIds())]}))}))},k.prototype.getUtmParam=function(){var r=o();return{utm_campaign:r[n],utm_content:r[u],utm_id:r[m],utm_medium:r[p],utm_source:r[s],utm_term:r[c]}},k.prototype.getReferrer=function(){var r,t,e={referrer:void 0,referring_domain:void 0};try{e.referrer=document.referrer||void 0,e.referring_domain=null!==(t=null===(r=e.referrer)||void 0===r?void 0:r.split("/")[2])&&void 0!==t?t:void 0}catch(r){}return e},k.prototype.getClickIds=function(){var r,t=o();return(r={})[f]=t[f],r[d]=t[d],r[a]=t[a],r[l]=t[l],r[v]=t[v],r[_]=t[_],r[g]=t[g],r[y]=t[y],r[h]=t[h],r[b]=t[b],r[j]=t[j],r},k}();export{k as CampaignParser};
import{AMPLITUDE_SERVER_URL as e,DEFAULT_INSTANCE_NAME as r,EU_AMPLITUDE_BATCH_SERVER_URL as t,EU_AMPLITUDE_SERVER_URL as i,AMPLITUDE_BATCH_SERVER_URL as s}from"./types/constants.js";import{Logger as o}from"./logger.js";import{LogLevel as n}from"./types/loglevel.js";var l=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:r,logLevel:n.Warn,loggerProvider:new o,offline:!1,optOut:!1,serverUrl:e,serverZone:"US",useBatch:!1}},u=function(){function e(e){var r,t,i,s;this._optOut=!1;var o=l();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(r=e.flushIntervalMillis)&&void 0!==r?r:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(t=e.logLevel)&&void 0!==t?t:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(i=e.optOut)&&void 0!==i?i:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(s=e.useBatch)&&void 0!==s?s:o.useBatch,this.loggerProvider.enable(this.logLevel);var n=a(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=n.serverZone,this.serverUrl=n.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),v=function(r,o){return"EU"===r?o?t:i:o?s:e},a=function(e,r,t){if(void 0===e&&(e=""),void 0===r&&(r=l().serverZone),void 0===t&&(t=l().useBatch),e)return{serverUrl:e,serverZone:void 0};var i=["US","EU"].includes(r)?r:l().serverZone;return{serverZone:i,serverUrl:v(i,t)}},h=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,r){this.sdk.metrics.histogram[e]=r},e}();export{u as Config,h as RequestMetadata,a as createServerConfig,l as getDefaultConfig,v as getServerUrl};
import{AMPLITUDE_PREFIX as o}from"./types/constants.js";var t=function(t,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[o,n,t.substring(0,r)].filter(Boolean).join("_")},n=function(t){return"".concat(o.toLowerCase(),"_").concat(t.substring(0,6))};export{t as getCookieName,n as getOldCookieName};
import{__awaiter as t,__generator as e,__values as i}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{IdentifyOperation as r,SpecialEventType as n}from"./types/event/event.js";import{OrderedIdentifyOperations as s}from"./identify.js";import{CLIENT_NOT_INITIALIZED as o,OPT_OUT_MESSAGE as u}from"./types/messages.js";import{Timeline as c}from"./timeline.js";import{createTrackEvent as p,createIdentifyEvent as h,createGroupIdentifyEvent as a,createGroupEvent as l,createRevenueEvent as f}from"./utils/event-builder.js";import{buildResult as d}from"./utils/result-builder.js";import{returnWrapper as g}from"./utils/return-wrapper.js";var y=function(){function y(t){void 0===t&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new c(this),this.name=t}return y.prototype._init=function(i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.config=i,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}}))}))},y.prototype.runQueuedFunctions=function(r){return t(this,void 0,void 0,(function(){var t,n,s,o,u,c,p,h;return e(this,(function(e){switch(e.label){case 0:t=this[r],this[r]=[],e.label=1;case 1:e.trys.push([1,8,9,10]),n=i(t),s=n.next(),e.label=2;case 2:return s.done?[3,7]:(o=s.value,(u=o())&&"promise"in u?[4,u.promise]:[3,4]);case 3:return e.sent(),[3,6];case 4:return[4,u];case 5:e.sent(),e.label=6;case 6:return s=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),p={error:c},[3,10];case 9:try{s&&!s.done&&(h=n.return)&&h.call(n)}finally{if(p)throw p.error}return[7];case 10:return this[r].length?[4,this.runQueuedFunctions(r)]:[3,12];case 11:e.sent(),e.label=12;case 12:return[2]}}))}))},y.prototype.track=function(t,e,i){var r=p(t,e,i);return g(this.dispatch(r))},y.prototype.identify=function(t,e){var i=h(t,e);return g(this.dispatch(i))},y.prototype.groupIdentify=function(t,e,i,r){var n=a(t,e,i,r);return g(this.dispatch(n))},y.prototype.setGroup=function(t,e,i){var r=l(t,e,i);return g(this.dispatch(r))},y.prototype.revenue=function(t,e){var i=f(t,e);return g(this.dispatch(i))},y.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),g())},y.prototype._addPlugin=function(t){return g(this.timeline.register(t,this.config))},y.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),g())},y.prototype._removePlugin=function(t){return g(this.timeline.deregister(t,this.config))},y.prototype.dispatchWithCallback=function(t,e){if(!this.isReady)return e(d(t,0,o));this.process(t).then(e)},y.prototype.dispatch=function(i){return t(this,void 0,void 0,(function(){var t=this;return e(this,(function(e){return this.isReady?[2,this.process(i)]:[2,new Promise((function(e){t.dispatchQ.push(t.dispatchWithCallback.bind(t,i,e))}))]}))}))},y.prototype.getOperationAppliedUserProperties=function(t){var e={};if(void 0===t)return e;var i={};return Object.keys(t).forEach((function(e){Object.values(r).includes(e)||(i[e]=t[e])})),s.forEach((function(i){if(Object.keys(t).includes(i)){var n=t[i];switch(i){case r.CLEAR_ALL:Object.keys(e).forEach((function(t){delete e[t]}));break;case r.UNSET:Object.keys(n).forEach((function(t){delete e[t]}));break;case r.SET:Object.assign(e,n)}}})),Object.assign(e,i),e},y.prototype.process=function(i){return t(this,void 0,void 0,(function(){var t,r,s,o;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),this.config.optOut?[2,d(i,0,u)]:(i.event_type===n.IDENTIFY&&(t=this.getOperationAppliedUserProperties(i.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(i)]);case 1:return 200===(o=e.sent()).code?this.config.loggerProvider.log(o.message):100===o.code?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=e.sent(),s=String(r),this.config.loggerProvider.error(s),[2,o=d(i,0,s)];case 3:return[2]}}))}))},y.prototype.setOptOut=function(t){this.isReady?this._setOptOut(t):this.q.push(this._setOptOut.bind(this,Boolean(t)))},y.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.timeline.onOptOutChanged(t),this.config.optOut=Boolean(t))},y.prototype.flush=function(){return g(this.timeline.flush())},y.prototype.plugin=function(t){var e=this.timeline.plugins.find((function(e){return e.name===t}));if(void 0!==e)return e;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t))},y.prototype.plugins=function(t){return this.timeline.plugins.filter((function(e){return e instanceof t}))},y}();export{y as AmplitudeCore};
import{__assign as t,__awaiter as e,__generator as s,__spreadArray as i,__read as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DiagnosticsStorage as r}from"./diagnostics-storage.js";import{getGlobalScope as o}from"../global-scope.js";import{isTimestampInSampleTemp as a}from"../utils/sampling.js";import{enableSdkErrorListeners as l}from"./uncaught-sdk-errors.js";var h=1e3,u=3e5,c="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",g="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",m=1e4,d=10,p=function(){function h(e,s,i,n){void 0===i&&(i="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=s,this.serverUrl="US"===i?c:g,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(n,null,2)),this.config=t({enabled:!0,sampleRate:0},n),this.startTimestamp=Date.now(),this.shouldTrack=a(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,r.isSupported()?this.storage=new r(e,s):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),l(this))}return h.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},h.prototype.setTag=function(t,e){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=m?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[t]=e,this.startTimersIfNeeded()))},h.prototype.increment=function(t,e){void 0===e&&(e=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=m?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+e,this.startTimersIfNeeded()))},h.prototype.recordHistogram=function(t,e){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=m)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var s=this.inMemoryHistograms[t];s?(s.count+=1,s.min=Math.min(s.min,e),s.max=Math.max(s.max,e),s.sum+=e):this.inMemoryHistograms[t]={count:1,min:e,max:e,sum:e},this.startTimersIfNeeded()}},h.prototype.recordEvent=function(t,e){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:e}),this.startTimersIfNeeded()))},h.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout((function(){t.saveAllDataToStorage().catch((function(e){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",e)})).finally((function(){t.saveTimer=null}))}),1e3)),this.flushTimer||(this.flushTimer=setTimeout((function(){t._flush().catch((function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)})).finally((function(){t.flushTimer=null}))}),u))},h.prototype.saveAllDataToStorage=function(){return e(this,void 0,void 0,(function(){var e,r,o,a;return s(this,(function(s){switch(s.label){case 0:return this.storage?(e=t({},this.inMemoryTags),r=t({},this.inMemoryCounters),o=t({},this.inMemoryHistograms),a=i([],n(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(r),this.storage.setHistogramStats(o),this.storage.addEventRecords(a)])]):[2];case 1:return s.sent(),[2]}}))}))},h.prototype._flush=function(){return e(this,void 0,void 0,(function(){var t,e,i,n,r,o,a,l,h,u;return s(this,(function(s){switch(s.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return s.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=s.sent(),e=t.tags,i=t.counters,n=t.histogramStats,r=t.events,this.storage.setLastFlushTimestamp(Date.now()),o={},e.forEach((function(t){o[t.key]=t.value})),a={},i.forEach((function(t){a[t.key]=t.value})),l={},n.forEach((function(t){l[t.key]={count:t.count,min:t.min,max:t.max,avg:Math.round(t.sum/t.count*100)/100}})),h=r.map((function(t){return{event_name:t.event_name,time:t.time,event_properties:t.event_properties}})),0===Object.keys(a).length&&0===Object.keys(l).length&&0===h.length?[2]:(u={tags:o,histogram:l,counters:a,events:h},this.fetch(u),[2])}}))}))},h.prototype.fetch=function(t){return e(this,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:if(s.trys.push([0,2,,3]),!o())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return s.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return e=s.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",e),[3,3];case 3:return[2]}}))}))},h.prototype.initializeFlushInterval=function(){return e(this,void 0,void 0,(function(){var t,e,i;return s(this,(function(s){switch(s.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(e=s.sent()||-1)?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(u),[2]):(i=t-e)>=u?(this._flush(),[2]):(this._setFlushTimer(u-i),[2])}}))}))},h.prototype._setFlushTimer=function(t){var e=this;this.flushTimer=setTimeout((function(){e._flush().catch((function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)})).finally((function(){e.flushTimer=null}))}),t)},h.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=a(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},h}();export{g as DIAGNOSTICS_EU_SERVER_URL,c as DIAGNOSTICS_US_SERVER_URL,p as DiagnosticsClient,u as FLUSH_INTERVAL_MS,m as MAX_MEMORY_STORAGE_COUNT,d as MAX_MEMORY_STORAGE_EVENTS_COUNT,h as SAVE_INTERVAL_MS};
import{__awaiter as t,__generator as e,__read as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var o={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},s={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},i=function(){function i(t,e){this.dbPromise=null,this.logger=e,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return i.isSupported=function(){var t;return void 0!==(null===(t=n())||void 0===t?void 0:t.indexedDB)},i.prototype.getDB=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]}))}))},i.prototype.openDB=function(){var t=this;return new Promise((function(e,r){var n=indexedDB.open(t.dbName,1);n.onerror=function(){t.dbPromise=null,r(new Error("Failed to open IndexedDB"))},n.onsuccess=function(){var r=n.result;r.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},r.onerror=function(e){t.logger.debug("DiagnosticsStorage: A global database error occurred.",e),r.close()},e(r)},n.onupgradeneeded=function(e){var r=e.target.result;t.createTables(r)}}))},i.prototype.createTables=function(t){(t.objectStoreNames.contains(o.TAGS)||t.createObjectStore(o.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(o.COUNTERS)||t.createObjectStore(o.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(o.HISTOGRAMS)||t.createObjectStore(o.HISTOGRAMS,{keyPath:"key"}),t.objectStoreNames.contains(o.EVENTS))||t.createObjectStore(o.EVENTS,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});t.objectStoreNames.contains(o.INTERNAL)||t.createObjectStore(o.INTERNAL,{keyPath:"key"})},i.prototype.setTags=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.TAGS],"readwrite"),i=s.objectStore(o.TAGS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1];i.put({key:n,value:o}).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to set tag",n,o,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",a),[3,3];case 3:return[2]}}))}))},i.prototype.incrementCounters=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.COUNTERS],"readwrite"),i=s.objectStore(o.COUNTERS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1],s=i.get(n);s.onsuccess=function(){var t=s.result,e=t?t.value:0;i.put({key:n,value:e+o}).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to update counter",n,t)}},s.onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",a),[3,3];case 3:return[2]}}))}))},i.prototype.setHistogramStats=function(n){return t(this,void 0,void 0,(function(){var t,s,i,a,c=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===Object.entries(n).length?[2]:[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.HISTOGRAMS],"readwrite"),i=s.objectStore(o.HISTOGRAMS),[2,new Promise((function(t){var e=Object.entries(n);s.oncomplete=function(){t()},s.onabort=function(e){c.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},e.forEach((function(t){var e=r(t,2),n=e[0],o=e[1],s=i.get(n);s.onsuccess=function(){var t,e=s.result;t=e?{key:n,count:e.count+o.count,min:Math.min(e.min,o.min),max:Math.max(e.max,o.max),sum:e.sum+o.sum}:{key:n,count:o.count,min:o.min,max:o.max,sum:o.sum},i.put(t).onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,t)}},s.onerror=function(t){c.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,t)}}))}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",a),[3,3];case 3:return[2]}}))}))},i.prototype.addEventRecords=function(r){return t(this,void 0,void 0,(function(){var t,n,s,i,a=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),0===r.length?[2]:[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.EVENTS],"readwrite"),s=n.objectStore(o.EVENTS),[2,new Promise((function(t){n.oncomplete=function(){t()},n.onabort=function(e){a.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var e=s.count();e.onsuccess=function(){var t=e.result,n=Math.max(0,10-t);n<r.length&&a.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(r.length," events due to storage limit")),r.slice(0,n).forEach((function(t){s.add(t).onerror=function(t){a.logger.debug("DiagnosticsStorage: Failed to add event record",t)}}))},e.onerror=function(t){a.logger.debug("DiagnosticsStorage: Failed to count existing events",t)}}))];case 2:return i=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}}))}))},i.prototype.setInternal=function(r,n){return t(this,void 0,void 0,(function(){var t,s,i,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=e.sent(),s=t.transaction([o.INTERNAL],"readwrite"),i=s.objectStore(o.INTERNAL),[2,new Promise((function(t,e){s.onabort=function(){return e(new Error("Failed to set internal value"))};var o=i.put({key:r,value:n});o.onsuccess=function(){return t()},o.onerror=function(){return e(new Error("Failed to set internal value"))}}))];case 2:return a=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",a),[3,3];case 3:return[2]}}))}))},i.prototype.getInternal=function(r){return t(this,void 0,void 0,(function(){var t,n,s,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.INTERNAL],"readonly"),s=n.objectStore(o.INTERNAL),[2,new Promise((function(t,e){n.onabort=function(){return e(new Error("Failed to get internal value"))};var o=s.get(r);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return e(new Error("Failed to get internal value"))}}))];case 2:return i=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}}))}))},i.prototype.getLastFlushTimestamp=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getInternal(s.LAST_FLUSH_TIMESTAMP)];case 1:return[2,(t=e.sent())?parseInt(t.value,10):void 0];case 2:return r=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",r),[2,void 0];case 3:return[2]}}))}))},i.prototype.setLastFlushTimestamp=function(r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.setInternal(s.LAST_FLUSH_TIMESTAMP,r.toString())];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}}))}))},i.prototype.clearTable=function(t,e){return new Promise((function(r,n){var o=t.objectStore(e).clear();o.onsuccess=function(){return r()},o.onerror=function(){return n(new Error("Failed to clear table ".concat(e)))}}))},i.prototype.getAllAndClear=function(){return t(this,void 0,void 0,(function(){var t,n,s,i,a,c,u,l;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=e.sent(),n=t.transaction([o.TAGS,o.COUNTERS,o.HISTOGRAMS,o.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(n,o.TAGS),this.getAllFromStore(n,o.COUNTERS),this.getAllFromStore(n,o.HISTOGRAMS),this.getAllFromStore(n,o.EVENTS)])];case 2:return s=r.apply(void 0,[e.sent(),4]),i=s[0],a=s[1],c=s[2],u=s[3],[4,Promise.all([this.clearTable(n,o.COUNTERS),this.clearTable(n,o.HISTOGRAMS),this.clearTable(n,o.EVENTS)])];case 3:return e.sent(),[2,{tags:i,counters:a,histogramStats:c,events:u}];case 4:return l=e.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",l),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}}))}))},i.prototype.getAllFromStore=function(t,e){return new Promise((function(r,n){var o=t.objectStore(e).getAll();o.onsuccess=function(){return r(o.result)},o.onerror=function(){return n(new Error("Failed to get all from ".concat(e)))}}))},i}();export{i as DiagnosticsStorage,s as INTERNAL_KEYS,o as TABLE_NAMES};
import{__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var r="__AMPLITUDE_SCRIPT_URL__",t="sdk.error.uncaught",a=function(r){var a=n();if(a&&"function"==typeof a.addEventListener){var l=function(n){r.recordEvent(t,e({type:n.type,message:n.message,filename:n.filename,error_name:n.errorName,stack:n.stack},n.metadata))};a.addEventListener("error",(function(e){var n=e.error instanceof Error?e.error:void 0,r=null==n?void 0:n.stack,t=i({filename:e.filename,stack:r});t&&l({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==n?void 0:n.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:t}})}),!0),a.addEventListener("unhandledrejection",(function(e){var n,r=e.reason instanceof Error?e.reason:void 0,t=null==r?void 0:r.stack,a=o(t),c=i({filename:a,stack:t});c&&l({type:"unhandledrejection",message:null!==(n=null==r?void 0:r.message)&&void 0!==n?n:s(e.reason),stack:t,filename:a,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:c}})}),!0)}},i=function(e){var t,a=null==(t=n())?void 0:t[r];if(a)return e.filename&&e.filename.includes(a)?"filename":e.stack&&e.stack.includes(a)?"stack":void 0},o=function(e){if(e){var n=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return n?n[1]:void 0}},s=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}};export{t as EVENT_NAME_ERROR_UNCAUGHT,r as GLOBAL_KEY,a as enableSdkErrorListeners};
var e=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0};export{e as getGlobalScope};
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{UNSET_VALUE as e}from"./types/constants.js";import{isValidProperties as r}from"./utils/valid-properties.js";var s,p=function(){function p(){this._propertySet=new Set,this._properties={}}return p.prototype.getUserProperties=function(){return t({},this._properties)},p.prototype.set=function(t,e){return this._safeSet(s.SET,t,e),this},p.prototype.setOnce=function(t,e){return this._safeSet(s.SET_ONCE,t,e),this},p.prototype.append=function(t,e){return this._safeSet(s.APPEND,t,e),this},p.prototype.prepend=function(t,e){return this._safeSet(s.PREPEND,t,e),this},p.prototype.postInsert=function(t,e){return this._safeSet(s.POSTINSERT,t,e),this},p.prototype.preInsert=function(t,e){return this._safeSet(s.PREINSERT,t,e),this},p.prototype.remove=function(t,e){return this._safeSet(s.REMOVE,t,e),this},p.prototype.add=function(t,e){return this._safeSet(s.ADD,t,e),this},p.prototype.unset=function(t){return this._safeSet(s.UNSET,t,e),this},p.prototype.clearAll=function(){return this._properties={},this._properties[s.CLEAR_ALL]=e,this},p.prototype._safeSet=function(t,e,r){if(this._validate(t,e,r)){var s=this._properties[t];return void 0===s&&(s={},this._properties[t]=s),s[e]=r,this._propertySet.add(e),!0}return!1},p.prototype._validate=function(t,e,p){return void 0===this._properties[s.CLEAR_ALL]&&(!this._propertySet.has(e)&&(t===s.ADD?"number"==typeof p:t===s.UNSET||t===s.REMOVE||r(e,p)))},p}();!function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"}(s||(s={}));var o=[s.CLEAR_ALL,s.UNSET,s.SET,s.SET_ONCE,s.ADD,s.APPEND,s.PREPEND,s.PREINSERT,s.POSTINSERT,s.REMOVE];export{p as Identify,s as IdentifyOperation,o as OrderedIdentifyOperations};
var a=function(){var a,n,r,i;if("undefined"==typeof navigator)return"";var o=navigator.userLanguage;return null!==(i=null!==(r=null!==(n=null===(a=navigator.languages)||void 0===a?void 0:a[0])&&void 0!==n?n:navigator.language)&&void 0!==r?r:o)&&void 0!==i?i:""};export{a as getLanguage};
import{LogLevel as o}from"./types/loglevel.js";var e="Amplitude Logger ",n=function(){function n(){this.logLevel=o.None}return n.prototype.disable=function(){this.logLevel=o.None},n.prototype.enable=function(e){void 0===e&&(e=o.Warn),this.logLevel=e},n.prototype.log=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Verbose||console.log("".concat(e,"[Log]: ").concat(n.join(" ")))},n.prototype.warn=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Warn||console.warn("".concat(e,"[Warn]: ").concat(n.join(" ")))},n.prototype.error=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Error||console.error("".concat(e,"[Error]: ").concat(n.join(" ")))},n.prototype.debug=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.logLevel<o.Debug||console.log("".concat(e,"[Debug]: ").concat(n.join(" ")))},n}();export{n as Logger};
import{__awaiter as e,__generator as t,__read as r,__assign as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{UUID as n}from"./utils/uuid.js";import{NetworkRequestEvent as i,RequestWrapperFetch as l,ResponseWrapperFetch as s,ResponseWrapperXhr as a,RequestWrapperXhr as c}from"./network-request-event.js";import{getGlobalScope as u}from"./global-scope.js";var d=function(e,t){void 0===t&&(t=n()),this.callback=e,this.id=t},p=function(){function n(e){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var t=u();n.isSupported()&&(this.globalScope=t)}return n.isSupported=function(){var e=u();return!!e&&!!e.fetch},n.prototype.subscribe=function(e,t){var r,o,n,i,l,s,a,c,u,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var p=null===(n=null===(o=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===o?void 0:o.prototype)||void 0===n?void 0:n.open,v=null===(s=null===(l=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===s?void 0:s.send,h=null===(u=null===(c=null===(a=this.globalScope)||void 0===a?void 0:a.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===u?void 0:u.setRequestHeader;p&&v&&h&&this.observeXhr(p,v,h);var g=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;g&&this.observeFetch(g),this.isObserving=!0}},n.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},n.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach((function(r){var o;try{r.callback(e)}catch(e){null===(o=t.logger)||void 0===o||o.debug("an unexpected error occurred while triggering event callbacks",e)}}))},n.prototype.handleNetworkRequestEvent=function(e,t,r,o,n,l,s){var a;if(void 0!==l&&void 0!==s){var c,u,d,p="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?c=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.call(t):(c=t.url,p=t.method),c)try{var v=new URL(c);c="".concat(v.protocol,"//").concat(v.host).concat(v.pathname).concat(v.search).concat(v.hash)}catch(e){}p=(null==r?void 0:r.method)||p,o&&(u=o.status),n&&(d={name:n.name||"UnknownError",message:n.message||"An unknown error occurred"},u=0);var h=Math.floor(performance.now()-s),g=Math.floor(l+h),f=new i(e,p,l,l,c,r,u,h,o,d,g);this.triggerEventCallbacks(f)}},n.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},n.prototype.observeFetch=function(r){var o=this;this.globalScope&&r&&(this.globalScope.fetch=function(n,i){return e(o,void 0,void 0,(function(){var e,o,a,c,u,d;return t(this,(function(t){switch(t.label){case 0:try{e=this.getTimestamps()}catch(e){null===(u=this.logger)||void 0===u||u.debug("an unexpected error occurred while retrieving timestamps",e)}t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r(n,i)];case 2:return o=t.sent(),[3,4];case 3:return c=t.sent(),a=c,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,i?new l(i):void 0,o?new s(o):void 0,a,null==e?void 0:e.startTime,null==e?void 0:e.durationStart)}catch(e){null===(d=this.logger)||void 0===d||d.debug("an unexpected error occurred while handling fetch",e)}if(o)return[2,o];throw a}}))}))})},n.createXhrJsonParser=function(e,t){return function(){var r,o;try{if("json"===e.responseType){if(null===(r=t.globalScope)||void 0===r?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&"InvalidStateError"===r.name&&(null===(o=t.logger)||void 0===o||o.error("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))),null}return null}},n.prototype.observeXhr=function(e,t,i){if(this.globalScope&&e&&t){var l=this.globalScope.XMLHttpRequest.prototype,s=this;l.open=function(){for(var t,n,i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];var a=r(i,2),c=a[0],u=a[1];try{this.$$AmplitudeAnalyticsEvent=o({method:c,url:null===(t=null==u?void 0:u.toString)||void 0===t?void 0:t.call(u),headers:{}},s.getTimestamps())}catch(e){null===(n=s.logger)||void 0===n||n.error("an unexpected error occurred while calling xhr open",e)}return e.apply(this,i)},l.send=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=this,i=n.createXhrJsonParser(this,s),l=e[0],u=o.$$AmplitudeAnalyticsEvent;return o.addEventListener("loadend",(function(){var e;try{var t=o.getAllResponseHeaders(),r=o.getResponseHeader("content-length"),n=new a(o.status,t,r?parseInt(r,10):void 0,i),d=o.$$AmplitudeAnalyticsEvent.headers,p=new c(l,d);u.status=o.status,s.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},p,n,void 0,u.startTime,u.durationStart)}catch(t){null===(e=s.logger)||void 0===e||e.error("an unexpected error occurred while handling xhr send",t)}})),t.apply(o,e)},l.setRequestHeader=function(e,t){var r;try{this.$$AmplitudeAnalyticsEvent.headers[e]=t}catch(e){null===(r=s.logger)||void 0===r||r.error("an unexpected error occurred while calling xhr setRequestHeader",e)}i.apply(this,[e,t])}}},n}(),v=new p;export{d as NetworkEventCallback,p as NetworkObserver,v as networkObserver};
import{__awaiter as e,__generator as t,__values as r,__read as n,__spreadArray as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as i}from"./global-scope.js";import{pruneJson as s}from"./utils/json-query.js";import{FORBIDDEN_HEADERS as u,SAFE_HEADERS as a}from"./types/constants.js";var l=100,f=function(){function o(e){this.request=e}return o.prototype.headers=function(e){var t,o;void 0===e&&(e=[]);var i=this.request.headers,s={};if(Array.isArray(i))i.forEach((function(e){var t=n(e,2),r=t[0],o=t[1];s[r]=o}));else if(i instanceof Headers)i.forEach((function(e,t){s[t]=e}));else if("object"==typeof i&&null!==i)try{for(var u=r(Object.entries(i)),a=u.next();!a.done;a=u.next()){var l=n(a.value,2),f=l[0],d=l[1];s[f]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return m(s,{allow:e})},Object.defineProperty(o.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=i();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=c(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),o.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){return 0===r.length?[2,null]:[2,v(this.body,r,n)]}))}))},o}(),d=function(){function r(e,t){this.bodyRaw=e,this.requestHeaders=t}return r.prototype.headers=function(e){return void 0===e&&(e=[]),m(this.requestHeaders,{allow:e})},Object.defineProperty(r.prototype,"bodySize",{get:function(){return c(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),r.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){return 0===r.length?[2,null]:[2,v(this.body,r,n)]}))}))},r}();function c(e,t){var o,s,u,a=i(),l=null==a?void 0:a.TextEncoder;if(l){var f;if("string"==typeof e)f=e,u=(new l).encode(f).length;else if(e instanceof Blob)u=(f=e).size;else if(e instanceof URLSearchParams)f=e,u=(new l).encode(f.toString()).length;else if(ArrayBuffer.isView(e))u=(f=e).byteLength;else if(e instanceof ArrayBuffer)u=(f=e).byteLength;else if(e instanceof FormData){var d=e,c=0,h=0;try{for(var p=r(d.entries()),y=p.next();!y.done;y=p.next()){var v=n(y.value,2),b=v[0],m=v[1];if(c+=b.length,"string"==typeof m)c+=(new l).encode(m).length;else{if(!(m instanceof Blob))return;c+=m.size}if(++h>=t)return}}catch(e){o={error:e}}finally{try{y&&!y.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}u=c}else if(e instanceof ReadableStream)return void(f=e);return u}}var h,p=function(){function r(e){this.response=e}return r.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null===(t=null==r?void 0:r.forEach)||void 0===t||t.call(r,(function(e,t){n[t]=e})),m(n,{allow:e})}},Object.defineProperty(r.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var r=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),r.prototype.text=function(){return e(this,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),t.label=1;case 1:return t.trys.push([1,3,,4]),e=this.clonedResponse.text(),r=new Promise((function(e){return setTimeout((function(){return e(null)}),500)})),[4,Promise.race([e,r])];case 2:return[2,t.sent()];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},r.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return 0===r.length?[2,null]:[4,this.text()];case 1:return[2,v(e.sent(),r,n)]}}))}))},r}(),y=function(){function o(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(o.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),o.prototype.headers=function(e){var t,o;if(void 0===e&&(e=[]),!this.headersString)return{};var i={},s=this.headersString.split("\r\n");try{for(var u=r(s),a=u.next();!a.done;a=u.next()){var l=a.value,f=n(l.split(": "),2),d=f[0],c=f[1];d&&c&&(i[d]=c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return m(i,{allow:e})},o.prototype.json=function(r,n){return void 0===r&&(r=[]),void 0===n&&(n=[]),e(this,void 0,void 0,(function(){var e;return t(this,(function(t){return 0===r.length?[2,null]:(e=this.getJson())?(s(e,r,n),[2,e]):[2,null]}))}))},o}();function v(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return s(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(h||(h={}));var b="[REDACTED]",m=function(e,t){var i,s,a=t.allow,l=void 0===a?[]:a,f=t.strategy,d=void 0===f?h.REMOVE:f,c=o([],n(u),!1),p={},y=function(t){var r=t.toLowerCase();c.find((function(e){return e.toLowerCase()===r}))?d===h.REDACT&&(p[t]=b):l.find((function(e){return e.toLowerCase()===r}))?p[t]=e[t]:d===h.REDACT&&(p[t]=b)};try{for(var v=r(Object.keys(e)),m=v.next();!m.done;m=v.next()){y(m.value)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return p},g=function(){function e(e,t,r,n,o,i,s,u,a,l,f){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=o,this.requestWrapper=i,this.status=s,this.duration=u,this.responseWrapper=a,this.error=l,this.endTime=f}return e.prototype.toSerializable=function(){var e,t,r,i,s={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(o([],n(a),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers(o([],n(a),!1)),responseBodySize:null===(i=this.responseWrapper)||void 0===i?void 0:i.bodySize};return Object.fromEntries(Object.entries(s).filter((function(e){var t=n(e,2);return t[0],void 0!==t[1]})))},e}();export{l as MAXIMUM_ENTRIES,g as NetworkRequestEvent,h as PRUNE_STRATEGY,f as RequestWrapperFetch,d as RequestWrapperXhr,p as ResponseWrapperFetch,y as ResponseWrapperXhr,m as pruneHeaders};
import{__awaiter as e,__generator as t,__rest as s,__spreadArray as i,__read as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{Status as o}from"../types/status.js";import{MAX_RETRIES_EXCEEDED_MESSAGE as r,UNEXPECTED_ERROR_MESSAGE as u,MISSING_API_KEY_MESSAGE as l,SUCCESS_MESSAGE as a,INVALID_API_KEY as c}from"../types/messages.js";import{STORAGE_PREFIX as h}from"../types/constants.js";import{chunk as d}from"../utils/chunk.js";import{buildResult as f}from"../utils/result-builder.js";import{createServerConfig as v,RequestMetadata as p}from"../config.js";import{UUID as g}from"../utils/uuid.js";import{isSuccessStatusCode as m}from"../utils/status-code.js";import{getStacktrace as y}from"../utils/debug.js";function b(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var R=function(){function R(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return R.prototype.setup=function(s){var i;return e(this,void 0,void 0,(function(){var e,n=this;return t(this,(function(t){switch(t.label){case 0:return this.config=s,this.storageKey="".concat(h,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(i=this.config.storageProvider)||void 0===i?void 0:i.get(this.storageKey)];case 1:return(e=t.sent())&&e.length>0&&Promise.all(e.map((function(e){return n.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},R.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=g()),new Promise((function(s){var i={event:e,attempts:0,callback:function(e){return s(e)},timeout:0};t.queue.push(i),t.schedule(t.config.flushIntervalMillis),t.saveEvents()}))},R.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter((function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,r),!1)}))},R.prototype.scheduleEvents=function(e){var t=this;e.forEach((function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)}))},R.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout((function(){t.queue=t.queue.map((function(e){return e.timeout=0,e})),t.flush(!0)}),e))):void 0},R.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},R.prototype.flush=function(s){return void 0===s&&(s=!1),e(this,void 0,void 0,(function(){var i,n,o=this;return t(this,(function(r){switch(r.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),i=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?i.push(e):n.push(e)})),[4,d(i,this.config.flushQueueSize).reduce((function(i,n){return e(o,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,i];case 1:return e.sent(),[4,this.send(n,s)];case 2:return[2,e.sent()]}}))}))}),Promise.resolve())]);case 1:return r.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}}))}))},R.prototype.send=function(i,n){var r;return void 0===n&&(n=!0),e(this,void 0,void 0,(function(){var e,a,c,h,d;return t(this,(function(t){switch(t.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(i,400,l)];e={api_key:this.config.apiKey,events:i.map((function(e){var t=e.event;return t.extra,s(t,["extra"])})),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new p,t.label=1;case 1:return t.trys.push([1,3,,4]),a=v(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(a,e)];case 2:return null===(c=t.sent())?(this.fulfillRequest(i,0,u),[2]):n?(this.handleResponse(c,i),[3,4]):("body"in c?this.fulfillRequest(i,c.statusCode,"".concat(c.status,": ").concat(b(c))):this.fulfillRequest(i,c.statusCode,c.status),[2]);case 3:return h=t.sent(),d=(f=h)instanceof Error?f.message:String(f),this.config.loggerProvider.error(d),null===(r=this.diagnosticsClient)||void 0===r||r.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:i.map((function(e){return e.event.event_type})),message:d,stack_trace:y()}),this.handleResponse({status:o.Failed,statusCode:0},i),[3,4];case 4:return[2]}var f}))}))},R.prototype.handleResponse=function(e,t){var s;m(e.statusCode)||null===(s=this.diagnosticsClient)||void 0===s||s.recordEvent("analytics.events.unsuccessful",{events:t.map((function(e){return e.event.event_type})),code:e.statusCode,status:e.status,body:b(e),stack_trace:y()});var i=e.status;switch(i){case o.Success:this.handleSuccessResponse(e,t);break;case o.Invalid:this.handleInvalidResponse(e,t);break;case o.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case o.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(i,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},R.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,a)},R.prototype.handleInvalidResponse=function(e,t){var s=this;if(e.body.missingField||e.body.error.startsWith(c))this.fulfillRequest(t,e.statusCode,e.body.error);else{var o=i(i(i(i([],n(Object.values(e.body.eventsWithInvalidFields)),!1),n(Object.values(e.body.eventsWithMissingFields)),!1),n(Object.values(e.body.eventsWithInvalidIdLengths)),!1),n(e.body.silencedEvents),!1).flat(),r=new Set(o),u=t.filter((function(t,i){if(!r.has(i))return!0;s.fulfillRequest([t],e.statusCode,e.body.error)}));u.length>0&&this.config.loggerProvider.warn(b(e));var l=this.removeEventsExceedFlushMaxRetries(u);this.scheduleEvents(l)}},R.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(b(e)),this.config.flushQueueSize/=2;var s=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(s)}else this.fulfillRequest(t,e.statusCode,e.body.error)},R.prototype.handleRateLimitResponse=function(e,t){var s=this,i=Object.keys(e.body.exceededDailyQuotaUsers),n=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,r=new Set(i),u=new Set(n),l=new Set(o),a=t.filter((function(t,i){if(!(t.event.user_id&&r.has(t.event.user_id)||t.event.device_id&&u.has(t.event.device_id)))return l.has(i)&&(t.timeout=s.throttleTimeout),!0;s.fulfillRequest([t],e.statusCode,e.body.error)}));a.length>0&&this.config.loggerProvider.warn(b(e));var c=this.removeEventsExceedFlushMaxRetries(a);this.scheduleEvents(c)},R.prototype.handleOtherResponse=function(e){var t=this,s=e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e})),i=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(i)},R.prototype.fulfillRequest=function(e,t,s){var i,n,o;m(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(i=this.diagnosticsClient)||void 0===i||i.increment("analytics.events.dropped",e.length),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.dropped",{events:e.map((function(e){return e.event.event_type})),code:t,message:s,stack_trace:y()})),this.removeEvents(e),e.forEach((function(e){return e.callback(f(e.event,t,s))}))},R.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map((function(e){return e.event}));this.config.storageProvider.set(this.storageKey,e)}},R.prototype.removeEvents=function(e){this.queue=this.queue.filter((function(t){return!e.some((function(e){return e.event.insert_id===t.event.insert_id}))})),this.saveEvents()},R}();export{R as Destination,b as getResponseBodyString};
import{__values as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e="data-amp-mask",r="*****",l=/\b(?:\d[ -]*?){13,16}\b/,n=/(\d{3}-?\d{2}-?\d{4})/g,o=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,i=function(e,i){var a,u;if(void 0===i&&(i=[]),"string"!=typeof e)return"";var c=e;c=(c=(c=c.replace(l,r)).replace(n,r)).replace(o,r);try{for(var d=t(i),p=d.next();!p.done;p=d.next()){var s=p.value;try{c=c.replace(s,r)}catch(t){}}}catch(t){a={error:t}}finally{try{p&&!p.done&&(u=d.return)&&u.call(d)}finally{if(a)throw a.error}}return c},a=function(t){if("undefined"==typeof document||!document.title)return"";var l=document.querySelector("title");return l&&l.hasAttribute(e)?r:t?t(document.title):document.title};export{l as CC_REGEX,o as EMAIL_REGEX,r as MASKED_TEXT_VALUE,n as SSN_REGEX,e as TEXT_MASK_ATTRIBUTE,a as getPageTitle,i as replaceSensitiveString};
import{__awaiter as t,__generator as i}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getAnalyticsConnector as e}from"../analytics-connector.js";var n=function(){function n(){this.name="identity",this.type="before",this.identityStore=e().identityStore}return n.prototype.execute=function(e){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]}))}))},n.prototype.setup=function(n){return t(this,void 0,void 0,(function(){return i(this,(function(t){return n.instanceName&&(this.identityStore=e(n.instanceName).identityStore),[2]}))}))},n}();export{n as IdentityEventSender};
import{getGlobalScope as o}from"./global-scope.js";var r=function(){var r,t=o();return(null===(r=null==t?void 0:t.location)||void 0===r?void 0:r.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce((function(o,r){var t=r.split("=",2),e=n(t[0]),i=n(t[1]);return i?(o[e]=i,o):o}),{}):{}},n=function(o){void 0===o&&(o="");try{return decodeURIComponent(o)}catch(o){return""}};export{r as getQueryParams,n as tryDecodeURIComponent};
var e=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var o=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(o))),Promise.resolve({remoteConfig:o.remoteConfig,lastFetch:new Date(o.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();export{e as RemoteConfigLocalStorage};
import{__awaiter as e,__generator as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{RemoteConfigLocalStorage as r}from"./remote-config-localstorage.js";import{UUID as o}from"../utils/uuid.js";var i="https://sr-client-cfg.amplitude.com/config",n="https://sr-client-cfg.eu.amplitude.com/config",c=3,s=function(){function c(e,t,o,c){void 0===o&&(o="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.apiKey=e,this.serverUrl=c||("US"===o?i:n),this.logger=t,this.storage=new r(e,t)}return c.prototype.subscribe=function(e,t,r){var i=o(),n={id:i,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(n),"all"===t?this.subscribeAll(n):this.subscribeWaitForRemote(n,t.timeout),i},c.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex((function(t){return t.id===e}));return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},c.prototype.updateConfigs=function(){return e(this,void 0,void 0,(function(){var e,r=this;return t(this,(function(t){switch(t.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=t.sent(),this.storage.setConfig(e),this.callbackInfos.forEach((function(t){r.sendCallback(t,e,"remote")})),[2]}}))}))},c.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise||(this.fetchPromise=this.fetch().then((function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t})).finally((function(){e.fetchPromise=null}))),this.fetchPromise},c.prototype.subscribeAll=function(r){return e(this,void 0,void 0,(function(){var e,o,i,n=this;return t(this,(function(t){switch(t.label){case 0:return e=this.getOrCreateFetchPromise().then((function(e){n.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(e))),n.sendCallback(r,e,"remote"),n.storage.setConfig(e)})),o=this.storage.fetchConfig().then((function(e){return e})),[4,Promise.race([e,o])];case 1:return void 0!==(i=t.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),null!==i.remoteConfig?this.sendCallback(r,i,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,e];case 2:return t.sent(),[2]}}))}))},c.prototype.subscribeWaitForRemote=function(r,o){return e(this,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:e=new Promise((function(e,t){setTimeout((function(){t("Timeout exceeded")}),o)})),t.label=1;case 1:return t.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),e])];case 2:return i=t.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(r,i,"remote"),this.storage.setConfig(i),[3,5];case 3:return t.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(i=t.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(r,i,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(r,i,"remote")),[3,5];case 5:return[2]}}))}))},c.prototype.sendCallback=function(e,t,r){var o;e.lastCallback=new Date,o=e.key?e.key.split(".").reduce((function(e,t){return null===e?e:t in e?e[t]:null}),t.remoteConfig):t.remoteConfig,e.callback(o,r,t.lastFetch)},c.prototype.fetch=function(r,o){return void 0===r&&(r=3),void 0===o&&(o=1e3),e(this,void 0,void 0,(function(){var e,i,n,c,s,a,l=this;return t(this,(function(u){switch(u.label){case 0:e=o/r,i={remoteConfig:null,lastFetch:new Date},n=function(i){var n,s,a,u,f;return t(this,(function(t){switch(t.label){case 0:n=new AbortController,s=setTimeout((function(){return n.abort()}),o),t.label=1;case 1:return t.trys.push([1,7,8,9]),[4,fetch(c.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:n.signal})];case 2:return(a=t.sent()).ok?[3,4]:[4,a.text()];case 3:return u=t.sent(),c.logger.debug("Remote config client fetch with retry time ".concat(r," failed with ").concat(a.status,": ").concat(u)),[3,6];case 4:return[4,a.json()];case 5:return[2,{value:{remoteConfig:t.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return(f=t.sent())instanceof Error&&"AbortError"===f.name?c.logger.debug("Remote config client fetch with retry time ".concat(r," timed out after ").concat(o,"ms")):c.logger.debug("Remote config client fetch with retry time ".concat(r," is rejected because: "),f),[3,9];case 8:return clearTimeout(s),[7];case 9:return i<r-1?[4,new Promise((function(t){return setTimeout(t,l.getJitterDelay(e))}))]:[3,11];case 10:t.sent(),t.label=11;case 11:return[2]}}))},c=this,s=0,u.label=1;case 1:return s<r?[5,n(s)]:[3,4];case 2:if("object"==typeof(a=u.sent()))return[2,a.value];u.label=3;case 3:return s++,[3,1];case 4:return[2,i]}}))}))},c.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},c.prototype.getUrlParams=function(){var e=encodeURIComponent(this.apiKey),t=new URLSearchParams;return t.append("config_group",c.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(e,"?").concat(t.toString())},c.CONFIG_GROUP="browser",c}();export{c as DEFAULT_MAX_RETRIES,n as EU_SERVER_URL,s as RemoteConfigClient,i as US_SERVER_URL};
import{__assign as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isValidObject as e}from"./utils/valid-properties.js";var r,i=function(){function i(){this.productId="",this.quantity=1,this.price=0}return i.prototype.setProductId=function(t){return this.productId=t,this},i.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},i.prototype.setPrice=function(t){return this.price=t,this},i.prototype.setRevenueType=function(t){return this.revenueType=t,this},i.prototype.setCurrency=function(t){return this.currency=t,this},i.prototype.setRevenue=function(t){return this.revenue=t,this},i.prototype.setReceipt=function(t){return this.receipt=t,this},i.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},i.prototype.setEventProperties=function(t){return e(t)&&(this.properties=t),this},i.prototype.getEventProperties=function(){var e=this.properties?t({},this.properties):{};return e[r.REVENUE_PRODUCT_ID]=this.productId,e[r.REVENUE_QUANTITY]=this.quantity,e[r.REVENUE_PRICE]=this.price,e[r.REVENUE_TYPE]=this.revenueType,e[r.REVENUE_CURRENCY]=this.currency,e[r.REVENUE]=this.revenue,e[r.RECEIPT]=this.receipt,e[r.RECEIPT_SIG]=this.receiptSig,e},i}();!function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue",t.RECEIPT="$receipt",t.RECEIPT_SIG="$receiptSig"}(r||(r={}));export{i as Revenue,r as RevenueProperty};
var n=function(n,o){return void 0===o&&(o=Date.now()),Date.now()-o>n};export{n as isNewSession};
import{__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e=function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return t(this,void 0,void 0,(function(){var t,n,o;return r(this,(function(r){switch(r.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),o="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,n.set(o,t)];case 2:return r.sent(),[4,n.get(o)];case 3:return[2,r.sent()===t];case 4:return r.sent(),[2,!1];case 5:return[4,n.remove(o)];case 6:return r.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=r.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}}))}))},e.prototype.getRaw=function(e){var n;return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,(null===(n=this.storage)||void 0===n?void 0:n.getItem(e))||void 0]}))}))},e.prototype.set=function(e,n){var o;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(o=this.storage)||void 0===o||o.setItem(e,JSON.stringify(n))}catch(t){}return[2]}))}))},e.prototype.remove=function(e){var n;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(n=this.storage)||void 0===n||n.removeItem(e)}catch(t){}return[2]}))}))},e.prototype.reset=function(){var e;return t(this,void 0,void 0,(function(){return r(this,(function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(t){}return[2]}))}))},e}();export{e as BrowserStorage};
import{__assign as t,__awaiter as e,__generator as o}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var r=function(){function r(e){this.options=t({},e)}return r.prototype.isEnabled=function(){return e(this,void 0,void 0,(function(){var t,e;return o(this,(function(o){switch(o.label){case 0:if(!n())return[2,!1];r.testValue=String(Date.now()),t=new r(this.options),e="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,t.set(e,r.testValue)];case 2:return o.sent(),[4,t.get(e)];case 3:return[2,o.sent()===r.testValue];case 4:return o.sent(),[2,!1];case 5:return[4,t.remove(e)];case 6:return o.sent(),[7];case 7:return[2]}}))}))},r.prototype.get=function(t){var n;return e(this,void 0,void 0,(function(){var e,r;return o(this,(function(o){switch(o.label){case 0:return[4,this.getRaw(t)];case 1:if(!(e=o.sent()))return[2,void 0];try{return void 0===(r=null!==(n=i(e))&&void 0!==n?n:s(e))?(console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(e)),[2,void 0]):[2,JSON.parse(r)]}catch(o){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(e)),[2,void 0]}return[2]}}))}))},r.prototype.getRaw=function(t){var r,i;return e(this,void 0,void 0,(function(){var e,s,c;return o(this,(function(o){return e=n(),s=null!==(i=null===(r=null==e?void 0:e.document)||void 0===r?void 0:r.cookie.split("; "))&&void 0!==i?i:[],(c=s.find((function(e){return 0===e.indexOf(t+"=")})))?[2,c.substring(t.length+1)]:[2,void 0]}))}))},r.prototype.set=function(t,r){var i;return e(this,void 0,void 0,(function(){var e,s,c,u,a,l,d;return o(this,(function(o){try{e=null!==(i=this.options.expirationDays)&&void 0!==i?i:0,c=void 0,(s=null!==r?e:-1)&&((u=new Date).setTime(u.getTime()+24*s*60*60*1e3),c=u),a="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),c&&(a+="; expires=".concat(c.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(l=n())&&(l.document.cookie=a)}catch(e){d=e instanceof Error?e.message:String(e),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(d))}return[2]}))}))},r.prototype.remove=function(t){return e(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.set(t,null)];case 1:return e.sent(),[2]}}))}))},r.prototype.reset=function(){return e(this,void 0,void 0,(function(){return o(this,(function(t){return[2]}))}))},r}(),i=function(t){try{return decodeURIComponent(atob(t))}catch(t){return}},s=function(t){try{return decodeURIComponent(atob(decodeURIComponent(t)))}catch(t){return}};export{r as CookieStorage};
import{AMPLITUDE_PREFIX as o}from"../types/constants.js";var t=function(t,n,r){return void 0===n&&(n=""),void 0===r&&(r=10),[o,n,t.substring(0,r)].filter(Boolean).join("_")};export{t as getStorageKey};
import{__awaiter as t,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var n=function(){function n(){this.memoryStorage=new Map}return n.prototype.isEnabled=function(){return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,!0]}))}))},n.prototype.get=function(n){return t(this,void 0,void 0,(function(){return r(this,(function(t){return[2,this.memoryStorage.get(n)]}))}))},n.prototype.getRaw=function(n){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,this.get(n)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}}))}))},n.prototype.set=function(n,o){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.set(n,o),[2]}))}))},n.prototype.remove=function(n){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.delete(n),[2]}))}))},n.prototype.reset=function(){return t(this,void 0,void 0,(function(){return r(this,(function(t){return this.memoryStorage.clear(),[2]}))}))},n}();export{n as MemoryStorage};
import{__awaiter as e,__generator as n,__assign as t,__read as i,__values as r}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{buildResult as o}from"./utils/result-builder.js";import{UUID as l}from"./utils/uuid.js";var u=function(){function u(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return u.prototype.register=function(t,i){var r,o;return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return this.plugins.some((function(e){return e.name===t.name}))?(this.loggerProvider.warn("Plugin with name ".concat(t.name," already exists, skipping registration")),[2]):(void 0===t.name&&(t.name=l(),this.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(t.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),t.type=null!==(r=t.type)&&void 0!==r?r:"enrichment",[4,null===(o=t.setup)||void 0===o?void 0:o.call(t,i,this.client)]);case 1:return e.sent(),this.plugins.push(t),[2]}}))}))},u.prototype.deregister=function(t,i){var r;return e(this,void 0,void 0,(function(){var e,o;return n(this,(function(n){switch(n.label){case 0:return e=this.plugins.findIndex((function(e){return e.name===t})),-1===e?(i.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[e],this.plugins.splice(e,1),[4,null===(r=o.teardown)||void 0===r?void 0:r.call(o)]);case 1:return n.sent(),[2]}}))}))},u.prototype.reset=function(e){this.applying=!1,this.plugins.map((function(e){var n;return null===(n=e.teardown)||void 0===n?void 0:n.call(e)})),this.plugins=[],this.client=e},u.prototype.push=function(e){var n=this;return new Promise((function(t){n.queue.push([e,t]),n.scheduleApply(0)}))},u.prototype.scheduleApply=function(e){var n=this;this.applying||(this.applying=!0,setTimeout((function(){n.apply(n.queue.shift()).then((function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)}))}),e))},u.prototype.apply=function(l){return e(this,void 0,void 0,(function(){var e,u,s,a,c,p,h,g,f,d,v,y,m,b,P,w,x,S,E,O;return n(this,(function(n){switch(n.label){case 0:if(!l)return[2];e=i(l,1),u=e[0],s=i(l,2),a=s[1],this.loggerProvider.log("Timeline.apply: Initial event",u),c=this.plugins.filter((function(e){return"before"===e.type})),n.label=1;case 1:n.trys.push([1,6,7,8]),p=r(c),h=p.next(),n.label=2;case 2:return h.done?[3,5]:(y=h.value).execute?[4,y.execute(t({},u))]:[3,4];case 3:if(null===(m=n.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),a({event:u,code:0,message:""}),[2];u=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),n.label=4;case 4:return h=p.next(),[3,2];case 5:return[3,8];case 6:return g=n.sent(),x={error:g},[3,8];case 7:try{h&&!h.done&&(S=p.return)&&S.call(p)}finally{if(x)throw x.error}return[7];case 8:f=this.plugins.filter((function(e){return"enrichment"===e.type||void 0===e.type})),n.label=9;case 9:n.trys.push([9,14,15,16]),d=r(f),v=d.next(),n.label=10;case 10:return v.done?[3,13]:(y=v.value).execute?[4,y.execute(t({},u))]:[3,12];case 11:if(null===(m=n.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),a({event:u,code:0,message:""}),[2];u=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(y.name),"', event: ").concat(JSON.stringify(u))),n.label=12;case 12:return v=d.next(),[3,10];case 13:return[3,16];case 14:return b=n.sent(),E={error:b},[3,16];case 15:try{v&&!v.done&&(O=d.return)&&O.call(d)}finally{if(E)throw E.error}return[7];case 16:return P=this.plugins.filter((function(e){return"destination"===e.type})),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(u))),w=P.map((function(e){var n=t({},u);return e.execute(n).catch((function(e){return o(n,0,String(e))}))})),Promise.all(w).then((function(e){var n=i(e,1)[0]||o(u,100,"Event not tracked, no destination plugins on the instance");a(n)})),[2]}}))}))},u.prototype.flush=function(){return e(this,void 0,void 0,(function(){var e,t,i,r=this;return n(this,(function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return r.apply(e)})))];case 1:return n.sent(),t=this.plugins.filter((function(e){return"destination"===e.type})),i=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(i)];case 2:return n.sent(),[2]}}))}))},u.prototype.onIdentityChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onIdentityChanged)||void 0===t||t.call(n,e)}))},u.prototype.onSessionIdChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onSessionIdChanged)||void 0===t||t.call(n,e)}))},u.prototype.onOptOutChanged=function(e){this.plugins.forEach((function(n){var t;null===(t=n.onOptOutChanged)||void 0===t||t.call(n,e)}))},u.prototype.onReset=function(){this.plugins.forEach((function(e){var n;null===(n=e.onReset)||void 0===n||n.call(e)}))},u}();export{u as Timeline};
import{Status as e}from"../types/status.js";import{isSuccessStatusCode as t}from"../utils/status-code.js";var s=function(){function s(){}return s.prototype.send=function(e,t){return Promise.resolve(null)},s.prototype.buildResponse=function(t){var s,d,i,l,o,n,r,u,v,a,c,_,h,y,p,m,f,g,b,D,x,T;if("object"!=typeof t)return null;var I=t.code||0,w=this.buildStatus(I);switch(w){case e.Success:return{status:w,statusCode:I,body:{eventsIngested:null!==(s=t.events_ingested)&&void 0!==s?s:0,payloadSizeBytes:null!==(d=t.payload_size_bytes)&&void 0!==d?d:0,serverUploadTime:null!==(i=t.server_upload_time)&&void 0!==i?i:0}};case e.Invalid:return{status:w,statusCode:I,body:{error:null!==(l=t.error)&&void 0!==l?l:"",missingField:null!==(o=t.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(n=t.events_with_invalid_fields)&&void 0!==n?n:{},eventsWithMissingFields:null!==(r=t.events_with_missing_fields)&&void 0!==r?r:{},eventsWithInvalidIdLengths:null!==(u=t.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(v=t.eps_threshold)&&void 0!==v?v:0,exceededDailyQuotaDevices:null!==(a=t.exceeded_daily_quota_devices)&&void 0!==a?a:{},silencedDevices:null!==(c=t.silenced_devices)&&void 0!==c?c:[],silencedEvents:null!==(_=t.silenced_events)&&void 0!==_?_:[],throttledDevices:null!==(h=t.throttled_devices)&&void 0!==h?h:{},throttledEvents:null!==(y=t.throttled_events)&&void 0!==y?y:[]}};case e.PayloadTooLarge:return{status:w,statusCode:I,body:{error:null!==(p=t.error)&&void 0!==p?p:""}};case e.RateLimit:return{status:w,statusCode:I,body:{error:null!==(m=t.error)&&void 0!==m?m:"",epsThreshold:null!==(f=t.eps_threshold)&&void 0!==f?f:0,throttledDevices:null!==(g=t.throttled_devices)&&void 0!==g?g:{},throttledUsers:null!==(b=t.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(D=t.exceeded_daily_quota_devices)&&void 0!==D?D:{},exceededDailyQuotaUsers:null!==(x=t.exceeded_daily_quota_users)&&void 0!==x?x:{},throttledEvents:null!==(T=t.throttled_events)&&void 0!==T?T:[]}};case e.Timeout:default:return{status:w,statusCode:I}}},s.prototype.buildStatus=function(s){return t(s)?e.Success:429===s?e.RateLimit:413===s?e.PayloadTooLarge:408===s?e.Timeout:s>=400&&s<500?e.Invalid:s>=500?e.Failed:e.Unknown},s}();export{s as BaseTransport};
import{__extends as t,__awaiter as e,__generator as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{BaseTransport as n}from"./base.js";var s=function(n){function s(){return null!==n&&n.apply(this,arguments)||this}return t(s,n),s.prototype.send=function(t,n){return e(this,void 0,void 0,(function(){var e,s,o;return r(this,(function(r){switch(r.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return e={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(t,e)];case 1:return[4,(s=r.sent()).text()];case 2:o=r.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(t){return[2,this.buildResponse({code:s.status})]}return[2]}}))}))},s}(n);export{s as FetchTransport};
var t="-",i="AMP",e="".concat("AMP","_unsent"),c="$default_instance",o="https://api2.amplitude.com/2/httpapi",a="https://api.eu.amplitude.com/2/httpapi",d="https://api2.amplitude.com/batch",n="https://api.eu.amplitude.com/batch",r="utm_campaign",l="utm_content",s="utm_id",m="utm_medium",p="utm_source",u="utm_term",_="dclid",v="fbclid",g="gbraid",h="gclid",w="ko_click_id",b="li_fat_id",f="msclkid",k="rdt_cid",x="ttclid",y="twclid",A="wbraid",M={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},P=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],z=["authorization","cookie","set-cookie"];export{d as AMPLITUDE_BATCH_SERVER_URL,i as AMPLITUDE_PREFIX,o as AMPLITUDE_SERVER_URL,M as BASE_CAMPAIGN,_ as DCLID,c as DEFAULT_INSTANCE_NAME,n as EU_AMPLITUDE_BATCH_SERVER_URL,a as EU_AMPLITUDE_SERVER_URL,v as FBCLID,z as FORBIDDEN_HEADERS,g as GBRAID,h as GCLID,w as KO_CLICK_ID,b as LI_FAT_ID,f as MSCLKID,k as RDT_CID,P as SAFE_HEADERS,e as STORAGE_PREFIX,x as TTCLID,y as TWCLID,t as UNSET_VALUE,r as UTM_CAMPAIGN,l as UTM_CONTENT,s as UTM_ID,m as UTM_MEDIUM,p as UTM_SOURCE,u as UTM_TERM,A as WBRAID};
var a=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],t="data-amp-track-",e=["div","span","h1","h2","h3","h4","h5","h6"];export{e as DEFAULT_ACTION_CLICK_ALLOWLIST,a as DEFAULT_CSS_SELECTOR_ALLOWLIST,t as DEFAULT_DATA_ATTRIBUTE_PREFIX};
var e,E;!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(e||(e={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(E||(E={}));export{e as IdentifyOperation,E as SpecialEventType};
import{__spreadArray as e,__read as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var i=e(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],t(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),o=["*"],l=1e3,p=4,r=50;export{i as DEFAULT_DEAD_CLICK_ALLOWLIST,o as DEFAULT_RAGE_CLICK_ALLOWLIST,r as DEFAULT_RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD,p as DEFAULT_RAGE_CLICK_THRESHOLD,l as DEFAULT_RAGE_CLICK_WINDOW_MS};
var r;!function(r){r[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Verbose=3]="Verbose",r[r.Debug=4]="Debug"}(r||(r={}));export{r as LogLevel};
var e="Event tracked successfully",t="Unexpected error occurred",d="Event rejected due to exceeded retry count",n="Event skipped due to optOut config",r="Event rejected due to missing API key",c="Invalid API key",i="Client not initialized";export{i as CLIENT_NOT_INITIALIZED,c as INVALID_API_KEY,d as MAX_RETRIES_EXCEEDED_MESSAGE,r as MISSING_API_KEY_MESSAGE,n as OPT_OUT_MESSAGE,e as SUCCESS_MESSAGE,t as UNEXPECTED_ERROR_MESSAGE};
var l=null;export{l as OfflineDisabled};
var G;!function(G){G.US="US",G.EU="EU",G.STAGING="STAGING"}(G||(G={}));export{G as ServerZone};
var e;!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(e||(e={}));export{e as Status};
var r=function(r,t){var a=Math.max(t,1);return r.reduce((function(r,t,n){var u=Math.floor(n/a);return r[u]||(r[u]=[]),r[u].push(t),r}),[])};export{r as chunk};
import{__values as r,__assign as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{LogLevel as e}from"../types/loglevel.js";var n=function(r){return void 0===r&&(r=0),((new Error).stack||"").split("\n").slice(2+r).map((function(r){return r.trim()}))},o=function(r){return function(){var e=t({},r.config);return{logger:e.loggerProvider,logLevel:e.logLevel}}},i=function(t,e){var n,o;e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=r(e.split(".")),l=i.next();!l.done;l=i.next()){var a=l.value;if(!(a in t))return;t=t[a]}}catch(r){n={error:r}}finally{try{l&&!l.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return t},l=function(t,e){return function(){var n,o,l={};try{for(var a=r(e),u=a.next();!u.done;u=a.next()){var s=u.value;l[s]=i(t,s)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return l}},a=function(r,t,o,i,l){return void 0===l&&(l=null),function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];var s=o(),f=s.logger,c=s.logLevel;if(c&&c<e.Debug||!c||!f)return r.apply(l,a);var p={type:"invoke public method",name:t,args:a,stacktrace:n(1),time:{start:(new Date).toISOString()},states:{}};i&&p.states&&(p.states.before=i());var g=r.apply(l,a);return g&&g.promise?g.promise.then((function(){i&&p.states&&(p.states.after=i()),p.time&&(p.time.end=(new Date).toISOString()),f.debug(JSON.stringify(p,null,2))})):(i&&p.states&&(p.states.after=i()),p.time&&(p.time.end=(new Date).toISOString()),f.debug(JSON.stringify(p,null,2))),g}};export{a as debugWrapper,o as getClientLogConfig,l as getClientStates,n as getStacktrace,i as getValueByStringPath};
import{__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{Identify as t}from"../identify.js";import{SpecialEventType as r}from"../types/event/event.js";var p=function(t,r,p){return e(e(e({},"string"==typeof t?{event_type:t}:t),p),r&&{event_properties:r})},n=function(t,p){return e(e({},p),{event_type:r.IDENTIFY,user_properties:t.getUserProperties()})},o=function(t,p,n,o){var s;return e(e({},o),{event_type:r.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(s={},s[t]=p,s)})},s=function(p,n,o){var s,i=new t;return i.set(p,n),e(e({},o),{event_type:r.IDENTIFY,user_properties:i.getUserProperties(),groups:(s={},s[p]=n,s)})},i=function(t,p){return e(e({},p),{event_type:r.REVENUE,event_properties:t.getEventProperties()})};export{s as createGroupEvent,o as createGroupIdentifyEvent,n as createIdentifyEvent,i as createRevenueEvent,p as createTrackEvent};
import{__values as t,__spreadArray as e,__read as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";function n(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t}function l(t,e,r){t&&o({json:t,allowlist:e.map(i),excludelist:r.map(i),ancestors:[]})}function o(l){var i,s,u=l.json,c=l.targetObject,f=l.allowlist,p=l.excludelist,g=l.ancestors,y=l.parentObject,b=l.targetKey;c||(c=u);var d=Object.keys(c);try{for(var h=t(d),j=h.next();!j.done;j=h.next()){var v=j.value,m=e(e([],r(g),!1),[v],!1);n(c[v])?a(m,f)&&!a(m,p)||delete c[v]:o({json:u,targetObject:c[v],allowlist:f,excludelist:p,ancestors:m,parentObject:c,targetKey:v})}}catch(t){i={error:t}}finally{try{j&&!j.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}0===Object.keys(c).length&&y&&b&&delete y[b]}function i(t){return t.startsWith("/")&&(t=t.slice(1)),t.split("/").map((function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")}))}function s(t,e,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),n===e.length)return r===t.length;if(r===t.length){for(;n<e.length&&"**"===e[n];)n++;return n===e.length}var l=e[n];if("**"===l){if(n+1===e.length)return!0;for(var o=r;o<=t.length;o++)if(s(t,e,o,n+1))return!0;return!1}return("*"===l||l===t[r])&&s(t,e,r+1,n+1)}function a(t,e){return e.some((function(e){return s(t,e)}))}export{o as _pruneJson,s as isPathMatch,l as pruneJson,i as tokenizeJsonPath};
import{__values as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{Observable as n}from"../../../../../../../zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js";function e(r,e){return new n((function(n){r.subscribe({next:function(r){e(r).then((function(r){return n.next(r)})).catch((function(r){return n.error(r)}))},error:function(r){n.error(r)},complete:function(){n.complete()}})}))}function t(e,t){return new n((function(n){var o=!1,l=new Set,u=function(){var n,e;o=!0;try{for(var t=r(l),u=t.next();!u.done;u=t.next()){var c=u.value;try{c.unsubscribe()}catch(r){}}}catch(r){n={error:r}}finally{try{u&&!u.done&&(e=t.return)&&e.call(t)}finally{if(n)throw n.error}}l.clear()},c=function(r){var e=r.subscribe({next:function(r){o||n.next(r)},error:function(r){o||(o=!0,n.error(r),u())},complete:function(){l.delete(e),o||0!==l.size||(n.complete(),u(),o=!0)}});l.add(e)};return c(e),c(t),u}))}function o(e){var t=new Set,o=null;function l(){null==o||o.unsubscribe(),o=null,t.clear()}return new n((function(n){return t.add(n),null===o&&(o=e.subscribe({next:function(n){var e,o,l;try{for(var u=r(t),c=u.next();!c.done;c=u.next()){var i=c.value;null===(l=i.next)||void 0===l||l.call(i,n)}}catch(r){e={error:r}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(e)throw e.error}}},error:function(n){var e,o,u;try{for(var c=r(t),i=c.next();!i.done;i=c.next()){var a=i.value;null===(u=a.error)||void 0===u||u.call(a,n)}}catch(r){e={error:r}}finally{try{i&&!i.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}l()},complete:function(){var n,e,o;try{for(var u=r(t),c=u.next();!c.done;c=u.next()){var i=c.value;null===(o=i.complete)||void 0===o||o.call(i)}}catch(r){n={error:r}}finally{try{c&&!c.done&&(e=u.return)&&e.call(u)}finally{if(n)throw n.error}}l()}})),function(){t.delete(n),0===t.size&&o&&(o.unsubscribe(),o=null)}}))}export{n as Observable,e as asyncMap,t as merge,o as multicast};
import{Status as e}from"../types/status.js";var o=function(o,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.Unknown),{event:o,code:t,message:n}};export{o as buildResult};
var r=function(r){return{promise:r||Promise.resolve()}};export{r as returnWrapper};
var r=function(r){var t=0;if(0===r.length)return t;for(var n=0;n<r.length;n++){t=(t<<5)-t+r.charCodeAt(n),t|=0}return t},t=function(t,n){var e=r(t.toString());return 31*Math.abs(e)%1e5/1e5<n};export{r as generateHashCode,t as isTimestampInSampleTemp};
function n(n){return n>=200&&n<300}export{n as isSuccessStatusCode};
var r=function(r,e){return!e||!e.length||e.some((function(e){return"string"==typeof e?r===e:r.match(e)}))},e=function(r,e){var n=r;try{n=decodeURI(r)}catch(r){null==e||e.error("Malformed URI sequence: ",r)}return n};export{e as getDecodeURI,r as isUrlMatchAllowlist};
import{__spreadArray as r,__read as t}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as n}from"../global-scope.js";var e=r([],t(Array(256).keys()),!1).map((function(r){return r.toString(16).padStart(2,"0")})),i=function(o){var a,l=n();if(!(null===(a=null==l?void 0:l.crypto)||void 0===a?void 0:a.getRandomValues))return function(r){return r?(r^16*Math.random()>>r/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,i)}(o);var u=l.crypto.getRandomValues(new Uint8Array(16));return u[6]=15&u[6]|64,u[8]=63&u[8]|128,r([],t(u.entries()),!1).map((function(r){var n=t(r,2),i=n[0],o=n[1];return[4,6,8,10].includes(i)?"-".concat(e[o]):e[o]})).join("")};export{i as UUID};
import{__values as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";var e=function(r){if(Object.keys(r).length>1e3)return!1;for(var e in r){var n=r[e];if(!t(e,n))return!1}return!0},t=function(t,n){var i,o;if("string"!=typeof t)return!1;if(Array.isArray(n)){var f=!0;try{for(var l=r(n),u=l.next();!u.done;u=l.next()){var s=u.value;if(Array.isArray(s))return!1;if("object"==typeof s)f=f&&e(s);else if(!["number","string"].includes(typeof s))return!1;if(!f)return!1}}catch(r){i={error:r}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}else{if(null==n)return!1;if("object"==typeof n)return e(n);if(!["number","string","boolean"].includes(typeof n))return!1}return!0};export{e as isValidObject,t as isValidProperties};
import{__awaiter as e,__generator as t,__values as n,__assign as o,__spreadArray as i,__read as r}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{VERSION as l}from"./version.js";import{PLUGIN_NAME as a,AMPLITUDE_ORIGINS_MAP as s}from"./constants.js";import{createShouldTrackEvent as c}from"./helpers.js";import{WindowMessenger as u}from"./libs/messenger.js";import{trackClicks as d}from"./autocapture/track-click.js";import{trackChange as v}from"./autocapture/track-change.js";import{trackActionClick as p}from"./autocapture/track-action-click.js";import{createClickObservable as g,createMutationObservable as m}from"./observables.js";import{groupLabeledEventIdsByEventType as b,createLabeledEventToTriggerMap as f,createTriggerEvaluator as h}from"./pageActions/triggers.js";import{DataExtractor as w}from"./data-extractor.js";import{DEFAULT_CSS_SELECTOR_ALLOWLIST as A,DEFAULT_ACTION_CLICK_ALLOWLIST as E,DEFAULT_DATA_ATTRIBUTE_PREFIX as y}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js";import{multicast as k}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js";import{Observable as j}from"../../../../../../zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js";import{getGlobalScope as O}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var C;!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"}(C||(C={}));var x=function(x,P){var _,S,T,L,R,z,M,N;void 0===x&&(x={}),null==P||P.diagnosticsClient.setTag("plugin.autocapture.version",l);var U=x.dataAttributePrefix,Z=void 0===U?y:U,D=x.visualTaggingOptions,I=void 0===D?{enabled:!0,messenger:new u}:D;x.cssSelectorAllowlist=null!==(_=x.cssSelectorAllowlist)&&void 0!==_?_:A,x.actionClickAllowlist=null!==(S=x.actionClickAllowlist)&&void 0!==S?S:E,x.debounceTime=null!==(T=x.debounceTime)&&void 0!==T?T:0,x.pageUrlExcludelist=null===(L=x.pageUrlExcludelist)||void 0===L?void 0:L.reduce((function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e}),[]);var K=a,q=[],B=new w(x,P),F=b(Object.values(null!==(z=null===(R=x.pageActions)||void 0===R?void 0:R.labeledEvents)&&void 0!==z?z:{})),G=f(null!==(N=null===(M=x.pageActions)||void 0===M?void 0:M.triggers)&&void 0!==N?N:[]),H=h(F,G,B,x);return{name:K,type:"enrichment",setup:function(n,l){return e(void 0,void 0,void 0,(function(){var e,a,u,h,w,A,E,y,P,_;return t(this,(function(t){return"undefined"==typeof document||(n.fetchRemoteConfig&&(n.remoteConfigClient?n.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",(function(e){!function(e){var t,n;e&&(x.pageActions=o(o({},x.pageActions),e),F=b(Object.values(null!==(t=x.pageActions.labeledEvents)&&void 0!==t?t:{})),G=f(null!==(n=x.pageActions.triggers)&&void 0!==n?n:[]),H.update(F,G,x))}(e)})):n.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),e=c(x,x.cssSelectorAllowlist),a=c(x,x.actionClickAllowlist),u=function(){var e,t,n=k(g().map((function(e){return B.addAdditionalEventProperties(e,"click",x.cssSelectorAllowlist,Z)}))),o=k(new j((function(e){var t,n=function(t){var n=B.addAdditionalEventProperties(t,"change",x.cssSelectorAllowlist,Z);e.next(n)};return null===(t=O())||void 0===t||t.document.addEventListener("change",n,{capture:!0}),function(){var e;return null===(e=O())||void 0===e?void 0:e.document.removeEventListener("change",n)}})));window.navigation&&(t=k(new j((function(e){var t=function(t){var n=B.addAdditionalEventProperties(t,"navigate",x.cssSelectorAllowlist,Z);e.next(n)};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}))));var i=k(m().map((function(e){return B.addAdditionalEventProperties(e,"mutation",x.cssSelectorAllowlist,Z)})));return(e={})[C.ChangeObservable]=o,e[C.ClickObservable]=n,e[C.MutationObservable]=i,e[C.NavigateObservable]=t,e}(),h=d({allObservables:u,amplitude:l,shouldTrackEvent:e,evaluateTriggers:H.evaluate.bind(H)}),q.push(h),w=v({allObservables:u,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B.getEventProperties.apply(B,i(i([],r(e),!1),[Z],!1))},amplitude:l,shouldTrackEvent:e,evaluateTriggers:H.evaluate.bind(H)}),q.push(w),A=p({allObservables:u,options:x,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B.getEventProperties.apply(B,i(i([],r(e),!1),[Z],!1))},amplitude:l,shouldTrackEvent:e,shouldTrackActionClick:a}),A&&q.push(A),null===(P=null==n?void 0:n.loggerProvider)||void 0===P||P.log("".concat(K," has been successfully added.")),window.opener&&I.enabled&&(E=x.cssSelectorAllowlist,y=x.actionClickAllowlist,null===(_=I.messenger)||void 0===_||_.setup(o(o({dataExtractor:B,logger:null==n?void 0:n.loggerProvider},(null==n?void 0:n.serverZone)&&{endpoint:s[n.serverZone]}),{isElementSelectable:c(x,i(i([],r(E),!1),r(y),!1)),cssSelectorAllowlist:E,actionClickAllowlist:y})))),[2]}))}))},execute:function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,n]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){var e,o,i,r;return t(this,(function(t){try{for(e=n(q),o=e.next();!o.done;o=e.next())o.value.unsubscribe()}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=e.return)&&r.call(e)}finally{if(i)throw i.error}}return[2]}))}))}}};export{C as ObservablesEnum,x as autocapturePlugin};
import{getClosestElement as e,filterOutNonTrackableEvents as t}from"../helpers.js";import{AMPLITUDE_ELEMENT_CLICKED_EVENT as r}from"../constants.js";import{merge as l,asyncMap as n}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js";function o(o){var s=o.amplitude,c=o.allObservables,i=o.options,u=o.getEventProperties,a=o.shouldTrackEvent,m=o.shouldTrackActionClick,k=c.clickObservable,f=c.mutationObservable,v=c.navigateObservable,p=k.filter((function(e){return!a("click",e.closestTrackedAncestor)})).map((function(t){var r=e(t.event.target,i.actionClickAllowlist);return t.closestTrackedAncestor=r,null!==t.closestTrackedAncestor&&(t.targetElementProperties=u(t.type,t.closestTrackedAncestor)),t})).filter(t).filter((function(e){return m("click",e.closestTrackedAncestor)})),b=v?l(f,v):f,d=l(p,b),T=null,A=null;return n(d,(function(e){if(T&&(clearTimeout(T),T=null),"click"===e.type)return A=e,T=setTimeout((function(){T=null,A=null}),500),Promise.resolve(null);if(A){var t=A;return A=null,Promise.resolve(t)}return Promise.resolve(null)})).subscribe((function(e){e&&(null==s||s.track(r,u("click",e.closestTrackedAncestor)))}))}export{o as trackActionClick};
import{filterOutNonTrackableEvents as e}from"../helpers.js";import{AMPLITUDE_ELEMENT_CHANGED_EVENT as r}from"../constants.js";function t(t){var n=t.amplitude,s=t.allObservables,c=t.getEventProperties,a=t.shouldTrackEvent,o=t.evaluateTriggers;return s.changeObservable.filter(e).filter((function(e){return a("change",e.closestTrackedAncestor)})).map((function(e){return o(e)})).subscribe((function(e){null==n||n.track(r,c("change",e.closestTrackedAncestor))}))}export{t as trackChange};
import{filterOutNonTrackableEvents as r}from"../helpers.js";import{AMPLITUDE_ELEMENT_CLICKED_EVENT as e}from"../constants.js";function t(t){var n=t.amplitude,l=t.allObservables,s=t.shouldTrackEvent,c=t.evaluateTriggers;return l.clickObservable.filter(r).filter((function(r){return s("click",r.closestTrackedAncestor)})).map((function(r){return c(r)})).subscribe((function(r){null==n||n.track(e,r.targetElementProperties)}))}export{t as trackClicks};
import{__assign as e}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{filterOutNonTrackableEvents as t}from"../helpers.js";import{AMPLITUDE_ELEMENT_DEAD_CLICKED_EVENT as l}from"../constants.js";import{merge as r,asyncMap as i}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js";var n=["mutation","navigate"];function s(s){var o=s.amplitude,c=s.allObservables,a=s.getEventProperties,u=s.shouldTrackDeadClick,m=c.clickObservable,p=c.mutationObservable,v=c.navigateObservable,b=m.filter((function(e){return t(e)&&u("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')})),d=v?r(p,v):p,f=r(b,d),k=null;return i(f,(function(e){return k&&n.includes(e.type)?(clearTimeout(k),k=null,Promise.resolve(null)):"click"===e.type?k?Promise.resolve(null):new Promise((function(t){k=setTimeout((function(){t(e),k=null}),3e3)})):Promise.resolve(null)})).subscribe((function(t){if(t){var r={"[Amplitude] X":t.event.clientX,"[Amplitude] Y":t.event.clientY};o.track(l,e(e({},a("click",t.closestTrackedAncestor)),r),{time:t.timestamp})}}))}export{s as trackDeadClick};
import{__awaiter as t,__generator as e,__assign as n}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{AMPLITUDE_ELEMENT_RAGE_CLICKED_EVENT as i}from"../constants.js";import{asyncMap as l}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js";import{DEFAULT_RAGE_CLICK_WINDOW_MS as r,DEFAULT_RAGE_CLICK_THRESHOLD as o,DEFAULT_RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD as u}from"../../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/frustration-interactions.js";var s=o,a=r,m=u;function c(t,e){var n,i,l,r,o=e.event,u=o.clientX,s=o.clientY;t.yMin=Math.min(null!==(n=t.yMin)&&void 0!==n?n:s,s),t.yMax=Math.max(null!==(i=t.yMax)&&void 0!==i?i:s,s),t.xMin=Math.min(null!==(l=t.xMin)&&void 0!==l?l:u,u),t.xMax=Math.max(null!==(r=t.xMax)&&void 0!==r?r:u,u),t.isOutOfBounds=t.yMax-t.yMin>m||t.xMax-t.xMin>m}function p(t){if(0===t.length)return null;var e=t[0],i=t[t.length-1];return{rageClickEvent:n({"[Amplitude] Begin Time":new Date(e.timestamp).toISOString(),"[Amplitude] End Time":new Date(i.timestamp).toISOString(),"[Amplitude] Duration":i.timestamp-e.timestamp,"[Amplitude] Clicks":t.map((function(t){return{X:t.event.clientX,Y:t.event.clientY,Time:t.timestamp}})),"[Amplitude] Click Count":t.length},e.targetElementProperties),time:e.timestamp}}function d(n){var r=this,o=n.amplitude,u=n.allObservables,m=n.shouldTrackRageClick,d=u.clickObservable,f=[],v={},h=null;return l(d.filter((function(t){return m("click",t.closestTrackedAncestor)})),(function(n){return t(r,void 0,void 0,(function(){var t;return e(this,(function(e){return c(v,n),t=null,0===f.length||function(t,e){return t.length>0&&t[t.length-1].closestTrackedAncestor!==e.closestTrackedAncestor}(f,n)||function(t,e){var n=t[Math.max(0,t.length-s+1)];return e.timestamp-n.timestamp>=a}(f,n)||v.isOutOfBounds?(h&&(t=p(f)),function(t){f=[],v={},t&&(c(v,t),f.push(t))}(n)):f.push(n),h&&(clearTimeout(h.timerId),h.resolve(t),h=null),f.length>=s?[2,new Promise((function(t){h={resolve:t,timerId:setTimeout((function(){t(p(f))}),a)}}))]:[2,null]}))}))})).subscribe((function(t){null!==t&&o.track(i,t.rageClickEvent,{time:t.time})}))}export{d as trackRageClicks};
var e="@amplitude/plugin-autocapture-browser",t="@amplitude/plugin-frustration-browser",l="[Amplitude] Element Clicked",i="[Amplitude] Dead Click",m="[Amplitude] Rage Click",p="[Amplitude] Element Changed",a="[Amplitude] Element ID",u="[Amplitude] Element Class",d="[Amplitude] Element Tag",n="[Amplitude] Element Text",s="[Amplitude] Element Hierarchy",A="[Amplitude] Element Href",r="[Amplitude] Element Position Left",g="[Amplitude] Element Position Top",o="[Amplitude] Element Aria Label",E="[Amplitude] Element Attributes",c="[Amplitude] Element Parent Label",h="[Amplitude] Page URL",b="[Amplitude] Page Title",C="[Amplitude] Viewport Height",P="[Amplitude] Viewport Width",T="https://app.amplitude.com",k="https://app.eu.amplitude.com",w="https://apps.stag2.amplitude.com",L={US:T,EU:k,STAGING:w},f="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",v="amp-visual-tagging-selector-highlight",H="data-amp-mask-attributes",U=25,x=128;export{p as AMPLITUDE_ELEMENT_CHANGED_EVENT,l as AMPLITUDE_ELEMENT_CLICKED_EVENT,i as AMPLITUDE_ELEMENT_DEAD_CLICKED_EVENT,m as AMPLITUDE_ELEMENT_RAGE_CLICKED_EVENT,o as AMPLITUDE_EVENT_PROP_ELEMENT_ARIA_LABEL,E as AMPLITUDE_EVENT_PROP_ELEMENT_ATTRIBUTES,u as AMPLITUDE_EVENT_PROP_ELEMENT_CLASS,s as AMPLITUDE_EVENT_PROP_ELEMENT_HIERARCHY,A as AMPLITUDE_EVENT_PROP_ELEMENT_HREF,a as AMPLITUDE_EVENT_PROP_ELEMENT_ID,c as AMPLITUDE_EVENT_PROP_ELEMENT_PARENT_LABEL,r as AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_LEFT,g as AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_TOP,d as AMPLITUDE_EVENT_PROP_ELEMENT_TAG,n as AMPLITUDE_EVENT_PROP_ELEMENT_TEXT,b as AMPLITUDE_EVENT_PROP_PAGE_TITLE,h as AMPLITUDE_EVENT_PROP_PAGE_URL,C as AMPLITUDE_EVENT_PROP_VIEWPORT_HEIGHT,P as AMPLITUDE_EVENT_PROP_VIEWPORT_WIDTH,T as AMPLITUDE_ORIGIN,L as AMPLITUDE_ORIGINS_MAP,k as AMPLITUDE_ORIGIN_EU,w as AMPLITUDE_ORIGIN_STAGING,v as AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS,f as AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL,H as DATA_AMP_MASK_ATTRIBUTES,t as FRUSTRATION_PLUGIN_NAME,x as MAX_ATTRIBUTE_LENGTH,U as MAX_MASK_TEXT_PATTERNS,e as PLUGIN_NAME};
import{__spreadArray as t,__read as e,__values as r}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{DATA_AMP_MASK_ATTRIBUTES as n,AMPLITUDE_EVENT_PROP_ELEMENT_HIERARCHY as i,AMPLITUDE_EVENT_PROP_ELEMENT_TAG as a,AMPLITUDE_EVENT_PROP_ELEMENT_TEXT as o,AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_LEFT as l,AMPLITUDE_EVENT_PROP_ELEMENT_POSITION_TOP as s,AMPLITUDE_EVENT_PROP_ELEMENT_ATTRIBUTES as c,AMPLITUDE_EVENT_PROP_ELEMENT_PARENT_LABEL as u,AMPLITUDE_EVENT_PROP_PAGE_URL as p,AMPLITUDE_EVENT_PROP_PAGE_TITLE as d,AMPLITUDE_EVENT_PROP_VIEWPORT_HEIGHT as v,AMPLITUDE_EVENT_PROP_VIEWPORT_WIDTH as f,AMPLITUDE_EVENT_PROP_ELEMENT_ID as g,AMPLITUDE_EVENT_PROP_ELEMENT_CLASS as h,AMPLITUDE_EVENT_PROP_ELEMENT_ARIA_LABEL as m,MAX_ATTRIBUTE_LENGTH as y,AMPLITUDE_EVENT_PROP_ELEMENT_HREF as T,MAX_MASK_TEXT_PATTERNS as x}from"./constants.js";import{parseAttributesToMask as b,extractPrefixedAttributes as w,removeEmptyProperties as E,isElementBasedEvent as S,isElementPointerCursor as A,getClosestElement as P}from"./helpers.js";import{getAncestors as _,getElementProperties as j}from"./hierarchy.js";import{getDataSource as k}from"./pageActions/actions.js";import{replaceSensitiveString as M,getPageTitle as C,TEXT_MASK_ATTRIBUTE as L,MASKED_TEXT_VALUE as N}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js";import{getDecodeURI as H}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js";var R=function(R,D){var q,B,O,F=this;this.replaceSensitiveString=function(t){return M(t,F.additionalMaskTextPatterns)},this.getHierarchy=function(i){var a,o,l,s,c,u=performance.now();if(!i)return[];for(var p=_(i),d=new Map,v=p.length-1;v>=0;v--){var f=p[v];if(f){var g=b(f.getAttribute(n)),h=v===p.length-1?[]:null!==(l=d.get(p[v+1]))&&void 0!==l?l:new Set,m=new Set(t(t([],e(h),!1),e(g),!1));d.set(f,m)}}c=p.map((function(t){var e;return j(t,null!==(e=d.get(t))&&void 0!==e?e:new Set)}));var y=function(t){(null==t?void 0:t.attrs)&&Object.entries(t.attrs).forEach((function(r){var n=e(r,2),i=n[0],a=n[1];t.attrs&&(t.attrs[i]=F.replaceSensitiveString(a))}))};try{for(var T=r(c),x=T.next();!x.done;x=T.next())y(x.value)}catch(t){a={error:t}}finally{try{x&&!x.done&&(o=T.return)&&o.call(T)}finally{if(a)throw a.error}}var w=performance.now();return null===(s=F.diagnosticsClient)||void 0===s||s.recordHistogram("autocapturePlugin.getHierarchy",w-u),c},this.getNearestLabel=function(t){var e,r=t.parentElement;if(!r)return"";try{e=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(t){e=null}return e?F.getText(e):F.getNearestLabel(r)},this.getEventProperties=function(t,e,r){var n,x,b,S,A=null===(b=null===(x=null==e?void 0:e.tagName)||void 0===x?void 0:x.toLowerCase)||void 0===b?void 0:b.call(x),P="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{left:null,top:null},_=F.getHierarchy(e),j=null===(S=_[0])||void 0===S?void 0:S.attrs,k=F.getNearestLabel(e),M=w(null!=j?j:{},r),L=((n={})[i]=_,n[a]=A,n[o]=F.getText(e),n[l]=null==P.left?null:Math.round(P.left),n[s]=null==P.top?null:Math.round(P.top),n[c]=M,n[u]=k,n[p]=H(window.location.href.split("?")[0]),n[d]=C(F.replaceSensitiveString),n[v]=window.innerHeight,n[f]=window.innerWidth,n);if(L[g]=e.getAttribute("id")||"",L[h]=e.getAttribute("class"),L[m]=null==j?void 0:j["aria-label"],"a"===A&&"click"===t&&e instanceof HTMLAnchorElement){var N=e.href.substring(0,y);L[T]=F.replaceSensitiveString(N)}return E(L)},this.addAdditionalEventProperties=function(t,e,r,n,i){void 0===i&&(i=!1);var a={event:t,timestamp:Date.now(),type:e};if(S(a)&&null!==a.event.target){if(i&&A(a.event.target,a.type))return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=F.getEventProperties(a.type,a.closestTrackedAncestor,n),a;var o=P(a.event.target,r);return o&&(a.closestTrackedAncestor=o,a.targetElementProperties=F.getEventProperties(a.type,o,n)),a}return a},this.extractDataFromDataSource=function(t,e){if("DOM_ELEMENT"===t.sourceType){var r=k(t,e);if(!r)return;return"TEXT"===t.elementExtractType?F.getText(r):"ATTRIBUTE"===t.elementExtractType&&t.attribute?r.getAttribute(t.attribute):void 0}},this.getText=function(t){if(null!==t.closest("[".concat(L,"]")))return N;var e="";if(t.querySelector("[".concat(L,"], [contenteditable]"))){var r=t.cloneNode(!0);r.querySelectorAll("[".concat(L,"], [contenteditable]")).forEach((function(t){t.innerText=N})),e=r.innerText||""}else e=t.innerText||"";return F.replaceSensitiveString(e.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(t){var e,r,n;if(!t)return{};var i=null===(n=null===(r=null==t?void 0:t.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===n?void 0:n.call(r),l=((e={})[a]=i,e[o]=F.getText(t),e[p]=window.location.href.split("?")[0],e);return E(l)},this.diagnosticsClient=null==D?void 0:D.diagnosticsClient;var I=null!==(O=R.maskTextRegex)&&void 0!==O?O:[],U=[];try{for(var W=r(I),X=W.next();!X.done;X=W.next()){var z=X.value;if(U.length>=x)break;if(z instanceof RegExp)U.push(z);else if("pattern"in z&&"string"==typeof z.pattern)try{U.push(new RegExp(z.pattern,"i"))}catch(t){}}}catch(t){q={error:t}}finally{try{X&&!X.done&&(B=W.return)&&B.call(W)}finally{if(q)throw q.error}}this.additionalMaskTextPatterns=U};export{R as DataExtractor};
import{__spreadArray as e,__read as t,__awaiter as r,__generator as i,__values as n,__assign as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{FRUSTRATION_PLUGIN_NAME as a}from"./constants.js";import{createShouldTrackEvent as l}from"./helpers.js";import{trackDeadClick as s}from"./autocapture/track-dead-click.js";import{trackRageClicks as u}from"./autocapture/track-rage-click.js";import{ObservablesEnum as d}from"./autocapture-plugin.js";import{createClickObservable as c,createMutationObservable as v}from"./observables.js";import{DataExtractor as m}from"./data-extractor.js";import{DEFAULT_RAGE_CLICK_ALLOWLIST as p,DEFAULT_DEAD_CLICK_ALLOWLIST as f}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/frustration-interactions.js";import{DEFAULT_DATA_ATTRIBUTE_PREFIX as b}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js";import{multicast as g}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js";import{Observable as y}from"../../../../../../zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js";var w=function(w){var h,j,k,_,x;void 0===w&&(w={});var E=a,P=[],A=null!==(j=null===(h=w.rageClicks)||void 0===h?void 0:h.cssSelectorAllowlist)&&void 0!==j?j:p,C=null!==(_=null===(k=w.deadClicks)||void 0===k?void 0:k.cssSelectorAllowlist)&&void 0!==_?_:f,O=null!==(x=w.dataAttributePrefix)&&void 0!==x?x:b,S=new m(w),z=e([],t(new Set(e(e([],t(A),!1),t(C),!1))),!1);return{name:E,type:"enrichment",setup:function(e,t){return r(void 0,void 0,void 0,(function(){var r,n,a,m,p,f;return i(this,(function(i){return"undefined"==typeof document||(r=l(w,A),n=l(w,C),a=function(){var e,t,r=g(c("pointerdown").map((function(e){return S.addAdditionalEventProperties(e,"click",z,O,!0)}))),i=g(v().map((function(e){return S.addAdditionalEventProperties(e,"mutation",z,O)})));if(window.navigation){var n=new y((function(e){var t=function(t){e.next(o(o({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}));t=g(n.map((function(e){return S.addAdditionalEventProperties(e,"navigate",z,O)})))}return(e={})[d.ClickObservable]=r,e[d.MutationObservable]=i,e[d.NavigateObservable]=t,e}(),m=u({allObservables:a,amplitude:t,shouldTrackRageClick:r}),P.push(m),p=s({amplitude:t,allObservables:a,getEventProperties:function(e,t){return S.getEventProperties(e,t,O)},shouldTrackDeadClick:n}),P.push(p),null===(f=null==e?void 0:e.loggerProvider)||void 0===f||f.log("".concat(E," has been successfully added."))),[2]}))}))},execute:function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){return[2,e]}))}))},teardown:function(){return r(void 0,void 0,void 0,(function(){var e,t,r,o;return i(this,(function(i){try{for(e=n(P),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(r)throw r.error}}return[2]}))}))}}};export{w as frustrationPlugin};
import{__read as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isUrlMatchAllowlist as e}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js";var n=["input","select","textarea"],r=function(t,e){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,t);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===e},i=function(t,n,i){return void 0===i&&(i=!1),function(o,l){var u,c,a=t.pageUrlAllowlist,s=t.pageUrlExcludelist,d=t.shouldTrackEventResolver,v=null===(c=null===(u=null==l?void 0:l.tagName)||void 0===u?void 0:u.toLowerCase)||void 0===c?void 0:c.call(u);if(!v)return!1;if(d)return d(o,l);if(!e(window.location.href,a))return!1;if(s&&s.length>0&&e(window.location.href,s))return!1;var f=String(null==l?void 0:l.getAttribute("type"))||"";if("string"==typeof f)switch(f.toLowerCase()){case"hidden":case"password":return!1}var p=r(l,o);if(i&&p)return!0;if(n){var m=n.some((function(t){var e;return!!(null===(e=null==l?void 0:l.matches)||void 0===e?void 0:e.call(l,t))}));if(!m)return!1}switch(v){case"input":case"select":case"textarea":return"change"===o||"click"===o;default:return!!p||"click"===o}}},o=function(t){var e,r,i,o=null===(r=null===(e=null==t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase)||void 0===r?void 0:r.call(e),l=t instanceof HTMLElement&&"true"===(null===(i=t.getAttribute("contenteditable"))||void 0===i?void 0:i.toLowerCase());return!n.includes(o)&&!l},l=function(t){return t?t.split(",").map((function(t){return t.trim()})).filter((function(t){return t.length>0&&"id"!==t&&"class"!==t})):[]},u=function(e,n){return Object.entries(e).reduce((function(e,r){var i=t(r,2),o=i[0],l=i[1];if(o.startsWith(n)){var u=o.replace(n,"");u&&(e[u]=l||"")}return e}),{})},c=function(t){return null==t||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length},a=function(t){return Object.keys(t).reduce((function(e,n){var r=t[n];return c(r)||(e[n]=r),e}),{})},s=function(t,e){return t?e.some((function(e){var n;return null===(n=null==t?void 0:t.matches)||void 0===n?void 0:n.call(t,e)}))?t:s(null==t?void 0:t.parentElement,e):null},d=function(t){return new Promise((function(e,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,i.addEventListener("load",(function(){e({status:!0})}),{once:!0}),i.addEventListener("error",(function(){n({status:!1,message:"Failed to load the script ".concat(t)})})),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(t){n(t)}}))};function v(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var f=function(t){return!(null===t.event.target||!t.closestTrackedAncestor)};function p(t){return"click"===t.type||"change"===t.type}export{d as asyncLoadScript,i as createShouldTrackEvent,u as extractPrefixedAttributes,f as filterOutNonTrackableEvents,v as generateUniqueId,s as getClosestElement,p as isElementBasedEvent,r as isElementPointerCursor,c as isEmpty,o as isNonSensitiveElement,l as parseAttributesToMask,a as removeEmptyProperties};
import{__values as e}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{isNonSensitiveElement as t}from"./helpers.js";import{MAX_ATTRIBUTE_LENGTH as r,DATA_AMP_MASK_ATTRIBUTES as n}from"./constants.js";import{MASKED_TEXT_VALUE as a,TEXT_MASK_ATTRIBUTE as i}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js";var l=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",n,i]),o=["type"],s=["svg","path","g"],u=["password","hidden"];function d(n,i){var d,m,p,c,f,v;if(null===n)return null;var g=String(n.tagName).toLowerCase(),y={tag:g},h=Array.from(null!==(c=null===(p=n.parentElement)||void 0===p?void 0:p.children)&&void 0!==c?c:[]);h.length&&(y.index=h.indexOf(n),y.indexOfType=h.filter((function(e){return e.tagName===n.tagName})).indexOf(n));var b=null===(v=null===(f=n.previousElementSibling)||void 0===f?void 0:f.tagName)||void 0===v?void 0:v.toLowerCase();b&&(y.prevSib=String(b));var S=n.getAttribute("id");S&&(y.id=String(S));var x=Array.from(n.classList);x.length&&(y.classes=x);var _={},k=Array.from(n.attributes).filter((function(e){return!l.has(e.name)})),w=!t(n);if(!u.includes(String(n.getAttribute("type")))&&!s.includes(g))try{for(var j=e(k),A=j.next();!A.done;A=j.next()){var N=A.value;w&&!o.includes(N.name)||(i.has(N.name)?_[N.name]=a:_[N.name]=String(N.value).substring(0,r))}}catch(e){d={error:e}}finally{try{A&&!A.done&&(m=j.return)&&m.call(j)}finally{if(d)throw d.error}}return Object.keys(_).length&&(y.attrs=_),y}function m(e){var t=[];if(!e)return t;t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t}export{m as getAncestors,d as getElementProperties};
import{AMPLITUDE_ORIGIN as e,AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS as t,AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL as o}from"../constants.js";import{generateUniqueId as i,asyncLoadScript as n}from"../helpers.js";import{VERSION as l}from"../version.js";import{DataExtractor as a}from"../data-extractor.js";var s=function(){function s(t){var o=(void 0===t?{}:t).origin,i=void 0===o?e:o,n=this;this.endpoint=e,this.requestCallbacks={},this.onSelect=function(e){n.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?n.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&n.notify({action:"track-selector-moved",data:t})},this.endpoint=i}return s.prototype.notify=function(e){var t,o,i,n;null===(o=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===o||o.call(t,"Message sent: ",JSON.stringify(e)),null===(n=null===(i=window.opener)||void 0===i?void 0:i.postMessage)||void 0===n||n.call(i,e,this.endpoint)},s.prototype.sendRequest=function(e,t,o){var n=this;void 0===o&&(o={timeout:15e3});var l=i(),a={id:l,action:e,args:t};return new Promise((function(t,i){n.requestCallbacks[l]={resolve:t,reject:i},n.notify(a),(null==o?void 0:o.timeout)>0&&setTimeout((function(){i(new Error("".concat(e," timed out (id: ").concat(l,")"))),delete n.requestCallbacks[l]}),o.timeout)}))},s.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},s.prototype.setup=function(i){var s=this,r=void 0===i?{dataExtractor:new a({})}:i,c=r.logger,d=r.endpoint,u=r.isElementSelectable,v=r.cssSelectorAllowlist,g=r.actionClickAllowlist,p=r.dataExtractor;this.logger=c,d&&this.endpoint===e&&(this.endpoint=d);var f=null;window.addEventListener("message",(function(e){var i,a,r,c,d;if(null===(a=null===(i=s.logger)||void 0===i?void 0:i.debug)||void 0===a||a.call(i,"Message received: ",JSON.stringify(e)),s.endpoint===e.origin){var h=null==e?void 0:e.data,m=null==h?void 0:h.action;if(m)if("id"in h)null===(c=null===(r=s.logger)||void 0===r?void 0:r.debug)||void 0===c||c.call(r,"Received Response to previous request: ",JSON.stringify(e)),s.handleResponse(h);else if("ping"===m)s.notify({action:"pong"});else if("initialize-visual-tagging-selector"===m){var w=null==h?void 0:h.data;n(o).then((function(){var e;f=null===(e=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===e?void 0:e.call(window,{getEventTagProps:p.getEventTagProps,isElementSelectable:function(e){return!u||u((null==w?void 0:w.actionType)||"click",e)},onTrack:s.onTrack,onSelect:s.onSelect,visualHighlightClass:t,messenger:s,cssSelectorAllowlist:v,actionClickAllowlist:g,extractDataFromDataSource:p.extractDataFromDataSource,dataExtractor:p,diagnostics:{autocapture:{version:l}}}),s.notify({action:"selector-loaded"})})).catch((function(){var e;null===(e=s.logger)||void 0===e||e.warn("Failed to initialize visual tagging selector")}))}else"close-visual-tagging-selector"===m&&(null===(d=null==f?void 0:f.close)||void 0===d||d.call(f))}})),this.notify({action:"page-loaded"})},s}();export{s as WindowMessenger};
import{Observable as e}from"../../../../../../zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js";import{getGlobalScope as n}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";var t=function(){return new e((function(e){var n=new MutationObserver((function(n){e.next(n)}));return document.body&&n.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return n.disconnect()}}))},o=function(t){return void 0===t&&(t="click"),new e((function(e){var o,r=function(n){e.next(n)};return null===(o=n())||void 0===o||o.document.addEventListener(t,r,{capture:!0}),function(){var e;null===(e=n())||void 0===e||e.document.removeEventListener(t,r,{capture:!0})}}))};export{o as createClickObservable,t as createMutationObservable};
var e=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var r=document.documentElement;return e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector?r.querySelector(e.selector):r}}catch(e){return}},t=function(e,t,r){e.forEach((function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var o=r.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=o}}))};export{t as executeActions,e as getDataSource};
var e=function(e,r){try{if("[Amplitude] Element Text"===r.subprop_key)return"is"===r.subprop_op&&r.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===r.subprop_key)return"autotrack css match"===r.subprop_op&&!!e.closestTrackedAncestor.closest(r.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1};export{e as matchEventToFilter};
import{__values as r}from"../../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{matchEventToFilter as e}from"./matchEventToFilter.js";import{executeActions as t}from"./actions.js";var n={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},o=function(e){var t,o,i,a,l=Object.values(n).reduce((function(r,e){return r[e]=new Set,r}),{});if(!e)return l;try{for(var u=r(e),f=u.next();!f.done;f=u.next()){var c=f.value;try{try{for(var d=(i=void 0,r(c.definition)),v=d.next();!v.done;v=d.next()){var y=v.value,p=n[y.event_type];p&&l[p].add(c.id)}}catch(r){i={error:r}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}}catch(r){console.warn("Skipping Labeled Event due to malformed definition",null==c?void 0:c.id,r)}}}catch(r){t={error:r}}finally{try{f&&!f.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return l},i=function(e){var t,n,o,i,a=new Map;try{for(var l=r(e),u=l.next();!u.done;u=l.next()){var f=u.value;try{for(var c=(o=void 0,r(f.conditions)),d=c.next();!d.done;d=c.next()){var v=d.value;if("LABELED_EVENT"===v.type){var y=v.match.eventId,p=a.get(y);p||(p=[],a.set(y,p)),p.push(f)}}}catch(r){o={error:r}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}}catch(r){t={error:r}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a},a=function(r,t){return t.filter((function(t){return t.definition.some((function(t){return n[t.event_type]===r.type&&t.filters.every((function(t){return e(r,t)}))}))}))},l=function(e,t){var n,o,i,a,l=new Set;try{for(var u=r(e),f=u.next();!f.done;f=u.next()){var c=f.value,d=t.get(c.id);if(d)try{for(var v=(i=void 0,r(d)),y=v.next();!y.done;y=v.next()){var p=y.value;l.add(p)}}catch(r){i={error:r}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}}catch(r){n={error:r}}finally{try{f&&!f.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return Array.from(l)},u=function(){function e(r,e,t,n){this.groupedLabeledEvents=r,this.labeledEventToTriggerMap=e,this.dataExtractor=t,this.options=n}return e.prototype.evaluate=function(e){var n,o,i=this.options.pageActions;if(!i)return e;var u=a(e,Array.from(this.groupedLabeledEvents[e.type]).map((function(r){return i.labeledEvents[r]}))),f=l(u,this.labeledEventToTriggerMap);try{for(var c=r(f),d=c.next();!d.done;d=c.next()){var v=d.value;t(v.actions,e,this.dataExtractor)}}catch(r){n={error:r}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return e},e.prototype.update=function(r,e,t){this.groupedLabeledEvents=r,this.labeledEventToTriggerMap=e,this.options=t},e}(),f=function(r,e,t,n){return new u(r,e,t,n)};export{u as TriggerEvaluator,i as createLabeledEventToTriggerMap,f as createTriggerEvaluator,o as groupLabeledEventIdsByEventType,a as matchEventToLabeledEvents,l as matchLabeledEventsToTriggers};
var e="@amplitude/plugin-network-capture-browser",r="[Amplitude] Network Request";export{r as AMPLITUDE_NETWORK_REQUEST_EVENT,e as PLUGIN_NAME};
import{__awaiter as e,__generator as n}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{PLUGIN_NAME as r}from"./constants.js";import{trackNetworkEvents as t}from"./track-network-event.js";import{Observable as o}from"../../../../../../zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js";import{NetworkEventCallback as i,networkObserver as u}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/network-observer.js";var s,c;!function(e){e.NetworkObservable="networkObservable"}(s||(s={}));var l=function(l){void 0===l&&(l={});var a,d=r,v=function(){var e,n=new o((function(e){var n=new i((function(n){var r=function(e,n){return{event:e,timestamp:Date.now(),type:n}}(n,"network");e.next(r)}));return u.subscribe(n,a),function(){u.unsubscribe(n)}}));return(e={})[s.NetworkObservable]=n,e};return{name:d,type:"enrichment",setup:function(r,o){return e(void 0,void 0,void 0,(function(){var e;return n(this,(function(n){return"undefined"==typeof document||(e=v(),a=null==r?void 0:r.loggerProvider,c=t({allObservables:e,networkTrackingOptions:l,amplitude:o,loggerProvider:a}),null==a||a.log("".concat(d," has been successfully added."))),[2]}))}))},execute:function(r){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,r]}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return c.unsubscribe(),[2]}))}))}}};export{s as ObservablesEnum,l as networkCapturePlugin};
import{__spreadArray as e,__read as r,__awaiter as t,__generator as s,__values as o}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{AMPLITUDE_NETWORK_REQUEST_EVENT as n}from"./constants.js";import{getGlobalScope as i}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{isUrlMatchAllowlist as u}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js";import{SAFE_HEADERS as l}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";var a="500-599";function d(e,r){var t="^"+r.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(t).test(e)}function p(e,t){var s,n,i=t.split(",");try{for(var u=o(i),l=u.next();!l.done;l=u.next()){var a=l.value,d=r(a.split("-").map(Number),2),p=d[0],c=d[1];if(e===p&&void 0===c)return!0;if(e>=p&&e<=c)return!0}}catch(e){s={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(s)throw s.error}}return!1}function c(e){var r;if(e)try{var t=null===(r=i())||void 0===r?void 0:r.location.href,s=new URL(e,t),o=s.searchParams.toString(),n=s.hash.replace("#",""),u=s.href,l=s.host;return s.hash="",s.search="",{query:o,fragment:n,href:u,hrefWithoutQueryOrHash:s.href,host:l}}catch(e){return}}function f(t){if("object"==typeof t&&null!==t){if(0!==t.length)return t}else{if(t)return e([],r(l),!1);if(void 0===t){return}}}function m(e){var r,t;return!(null===(r=null==e?void 0:e.allowlist)||void 0===r?void 0:r.length)&&!(null===(t=null==e?void 0:e.blocklist)||void 0===t?void 0:t.length)}function y(t,s){var o;void 0===s&&(s={});var i=c(t.url);if(!i)return!1;var l,y=i.host;if(!1!==s.ignoreAmplitudeRequests&&(d(y,"*.amplitude.com")||d(y,"amplitude.com")))return!1;if(null===(o=s.ignoreHosts)||void 0===o?void 0:o.find((function(e){return d(y,e)})))return!1;if(!s.captureRules&&void 0!==t.status&&!p(t.status,a))return!1;if(s.captureRules&&(e([],r(s.captureRules),!1).reverse().find((function(e){if(l=function(e,r,t,s,o){if((!e.hosts||e.hosts.find((function(e){return d(r,e)})))&&(!s||!e.urls||u(s,e.urls))&&(!o||!e.methods||e.methods.find((function(e){return o.toLowerCase()===e.toLowerCase()||"*"===e}))))return!((t||0===t)&&!p(t,e.statusCodeRange||a))}(e,y,t.status,t.url,t.method),l){var r=f(e.responseHeaders);if(t.responseWrapper&&r){var s=t.responseWrapper.headers(r);s&&(t.responseHeaders=s)}var o=f(e.requestHeaders);if(t.requestWrapper&&o){var n=t.requestWrapper.headers(o);n&&(t.requestHeaders=n)}t.responseWrapper&&e.responseBody&&!m(e.responseBody)&&(t.responseBodyJson=t.responseWrapper.json(e.responseBody.allowlist,e.responseBody.blocklist)),t.requestWrapper&&e.requestBody&&!m(e.requestBody)&&(t.requestBodyJson=t.requestWrapper.json(e.requestBody.allowlist,e.requestBody.blocklist))}return void 0!==l})),!l))return!1;return!t.requestWrapper||!function(e,r){if(e.includes("amplitude.com"))try{var t=r.body;if("string"!=typeof t)return!1;if(JSON.parse(t).events.find((function(e){return e.event_type===n})))return!0}catch(e){}return!1}(y,t.requestWrapper)}function v(e,o,i,u){return t(this,void 0,void 0,(function(){var t,l,a;return s(this,(function(s){switch(s.label){case 0:return o.requestBodyJson||o.responseBodyJson?[4,Promise.all([o.requestBodyJson,o.responseBodyJson])]:[3,2];case 1:if(t=r.apply(void 0,[s.sent(),2]),l=t[0],a=t[1],l)try{e["[Amplitude] Request Body"]=JSON.stringify(l)}catch(e){null==u||u.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==u||u.debug("Failed to stringify response body")}s.label=2;case 2:return null==i||i.track(n,e),[2]}}))}))}function h(e){var r=e.allObservables,t=e.networkTrackingOptions,s=e.amplitude,o=e.loggerProvider;return r.networkObservable.filter((function(e){return y(e.event,t)})).subscribe((function(e){var r,t,n,i=e.event,u=c(i.url);if(u){var l=null===(t=i.responseWrapper)||void 0===t?void 0:t.bodySize,a=null===(n=i.requestWrapper)||void 0===n?void 0:n.bodySize;v(((r={})["[Amplitude] URL"]=u.hrefWithoutQueryOrHash,r["[Amplitude] URL Query"]=u.query,r["[Amplitude] URL Fragment"]=u.fragment,r["[Amplitude] Request Method"]=i.method,r["[Amplitude] Status Code"]=i.status,r["[Amplitude] Start Time"]=i.startTime,r["[Amplitude] Completion Time"]=i.endTime,r["[Amplitude] Duration"]=i.duration,r["[Amplitude] Request Body Size"]=a,r["[Amplitude] Response Body Size"]=l,r["[Amplitude] Request Type"]=i.type,r["[Amplitude] Request Headers"]=i.requestHeaders,r["[Amplitude] Response Headers"]=i.responseHeaders,r),i,s,o)}}))}export{v as logNetworkAnalyticsEvent,f as parseHeaderCaptureRule,y as shouldTrackNetworkEvent,h as trackNetworkEvents};
import{__awaiter as e,__generator as t,__assign as n,__read as i}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{getGlobalScope as r}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{getPageTitle as o,replaceSensitiveString as a}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js";import{getDecodeURI as l}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js";import{BrowserStorage as s}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js";import{SpecialEventType as u}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";var c,p="AMP_CURRENT_PAGE",d="AMP_PREVIOUS_PAGE",m="AMP_URL_INFO";!function(e){e.Direct="direct",e.Internal="internal",e.External="external"}(c||(c={}));var v=new Set([u.IDENTIFY,u.GROUP_IDENTIFY,u.REVENUE]),f=function(u){var f={}.internalDomains,g=void 0===f?[]:f,_=r(),h=void 0,P=!1,b=void 0,A=!1,E=!1,w=function(e){var t="undefined"!=typeof location&&location.hostname||"",n=e?function(e){var t;try{var n=l(e,b);t=new URL(n).hostname}catch(e){null==b||b.error("Could not parse URL: ",e)}return t}(e):void 0;if(!n)return c.Direct;var i=g.some((function(e){return-1!==t.indexOf(e)})),r=g.some((function(e){return-1!==n.indexOf(e)}));return t===n||r&&i?c.Internal:c.External},L=function(){e(void 0,void 0,void 0,(function(){var e,n,i,r,o;return t(this,(function(t){switch(t.label){case 0:return h&&P?[4,h.get(m)]:[3,3];case 1:return e=t.sent(),n=l("undefined"!=typeof location&&location.href||""),i=(null==e?void 0:e[p])||"",r=void 0,r=n===i?(null==e?void 0:e[d])||"":i||document.referrer||"",[4,h.set(m,(o={},o[p]=n,o[d]=r,o))];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},R={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return(b=n.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),E=!0,_?[4,(h=new s(_.sessionStorage)).isEnabled()]:[3,2];case 1:P=e.sent(),_.addEventListener("popstate",L),A||(_.history.pushState=new Proxy(_.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],l=r[2];e.apply(t,[o,a,l]),E&&L()}}),_.history.replaceState=new Proxy(_.history.replaceState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],l=r[2];e.apply(t,[o,a,l]),E&&L()}}),A=!0),e.label=2;case 2:return[2]}}))}))},execute:function(i){return e(void 0,void 0,void 0,(function(){var e,r,s,u,c;return t(this,(function(t){switch(t.label){case 0:return e=l("undefined"!=typeof location&&location.href||""),h&&P?[4,h.get(m)]:[3,5];case 1:return(null==(r=t.sent())?void 0:r[p])?[3,3]:[4,h.set(m,(c={},c[p]=e,c[d]=document.referrer||"",c))];case 2:t.sent(),t.label=3;case 3:return[4,h.get(m)];case 4:if(s=t.sent(),u="",s&&(u=s[d]||""),v.has(i.event_type))return[2,i];i.event_properties=n(n({},i.event_properties||{}),{"[Amplitude] Page Domain":y(i,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":y(i,"[Amplitude] Page Location",e),"[Amplitude] Page Path":y(i,"[Amplitude] Page Path","undefined"!=typeof location&&l(location.pathname)||""),"[Amplitude] Page Title":y(i,"[Amplitude] Page Title",o(a)),"[Amplitude] Page URL":y(i,"[Amplitude] Page URL",e.split("?")[0]),"[Amplitude] Previous Page Location":u,"[Amplitude] Previous Page Type":w(u)}),t.label=5;case 5:return[2,i]}}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return _&&(_.removeEventListener("popstate",L),E=!1),h&&P?[4,h.set(m,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))}};return R};function y(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]}export{p as CURRENT_PAGE_STORAGE_KEY,v as EXCLUDED_DEFAULT_EVENT_TYPES,d as PREVIOUS_PAGE_STORAGE_KEY,m as URL_INFO_STORAGE_KEY,f as pageUrlEnrichmentPlugin};
import{__awaiter as e,__generator as t,__assign as n,__read as i,__spreadArray as r}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{omitUndefined as o}from"./utils.js";import{getGlobalScope as a}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{IdentifyOperation as u}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js";import{BASE_CAMPAIGN as l}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/constants.js";import{getPageTitle as p,replaceSensitiveString as s}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js";import{CampaignParser as c}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js";var d="[Amplitude] Page Viewed",v=function(r){var o;void 0===r&&(r={});var u,l=a(),c=void 0,v=!1,g=r.trackOn,h=r.trackHistoryChanges,_=r.eventType,b=void 0===_?d:_,w=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==c||c.error("Malformed URI sequence: ",e)}return t},k=function(){return e(void 0,void 0,void 0,(function(){var e,i,r;return t(this,(function(t){switch(t.label){case 0:return e=w("undefined"!=typeof location&&location.href||""),r={event_type:b},i=[{}],[4,m()];case 1:return[2,(r.event_properties=n.apply(void 0,[n.apply(void 0,i.concat([t.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"undefined"!=typeof location&&w(location.pathname)||"","[Amplitude] Page Title":p(s),"[Amplitude] Page URL":e.split("?")[0]}]),r)]}}))}))},j=function(){return void 0===g||"function"==typeof g&&g()},P="undefined"!=typeof location?location.href:null,A=function(){return e(void 0,void 0,void 0,(function(){var e,n,i,r;return t(this,(function(t){switch(t.label){case 0:return e=location.href,n=y(h,e,P||"")&&j(),P=e,n?(null==c||c.log("Tracking page view event"),null!=o?[3,1]:[3,3]):[3,4];case 1:return r=(i=o).track,[4,k()];case 2:r.apply(i,[t.sent()]),t.label=3;case 3:t.label=4;case 4:return[2]}}))}))},C=function(){A()},L={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(n,r){return e(void 0,void 0,void 0,(function(){var e,a;return t(this,(function(t){switch(t.label){case 0:return o=r,u=n,(c=n.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),v=!0,l&&(l.addEventListener("popstate",C),l.history.pushState=new Proxy(l.history.pushState,{apply:function(e,t,n){var r=i(n,3),o=r[0],a=r[1],u=r[2];e.apply(t,[o,a,u]),v&&A()}})),j()?(c.log("Tracking page view event"),a=(e=o).track,[4,k()]):[3,2];case 1:a.apply(e,[t.sent()]),t.label=2;case 2:return[2]}}))}))},execute:function(i){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return"attribution"===g&&f(i)?(null==c||c.log("Enriching campaign event to page view event with campaign parameters"),[4,k()]):[3,2];case 1:e=t.sent(),i.event_type=e.event_type,i.event_properties=n(n({},i.event_properties),e.event_properties),t.label=2;case 2:return u&&i.event_type===b&&(u.pageCounter=u.pageCounter?u.pageCounter+1:1,i.event_properties=n(n({},i.event_properties),{"[Amplitude] Page Counter":u.pageCounter})),[2,i]}}))}))},teardown:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return l&&(l.removeEventListener("popstate",C),v=!1),[2]}))}))}};return L},m=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return e=o,[4,(new c).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}}))}))},f=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[u.SET]||{},o=t[u.UNSET]||{},a=r(r([],i(Object.keys(n)),!1),i(Object.keys(o)),!1);return Object.keys(l).every((function(e){return a.includes(e)}))}return!1},y=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var i=new URL(t),r=new URL(n);return i.origin+i.pathname!==r.origin+r.pathname}return t!==n};export{d as defaultPageViewEvent,v as pageViewTrackingPlugin,y as shouldTrackHistoryPageView};
var r=function(r){var a={};for(var n in r){var v=r[n];v&&(a[n]=v)}return a};export{r as omitUndefined};
var e="web-vitals-browser",r="[Amplitude] Web Vitals";export{e as PLUGIN_NAME,r as WEB_VITALS_EVENT_NAME};
import{__awaiter as i,__generator as t}from"../../../../../../@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{PLUGIN_NAME as e,WEB_VITALS_EVENT_NAME as n}from"./constants.js";import{onLCP as o,onFCP as r,onINP as l,onCLS as u,onTTFB as a}from"../../../../../../web-vitals@5.0.1/node_modules/web-vitals/dist/web-vitals.js";import{getGlobalScope as d}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/global-scope.js";import{getDecodeURI as s}from"../../../../../../@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js";function m(i){var t,e=(null===(t=i.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+e}function c(i){return{value:i.value,rating:i.rating,delta:i.delta,navigationType:i.navigationType,id:i.id,timestamp:Math.floor(m(i)),navigationStart:Math.floor(performance.timeOrigin)}}var v=function(){var m=null,v=d(),p=null==v?void 0:v.document,f=null==v?void 0:v.location;return{name:e,type:"enrichment",setup:function(e,d){return i(void 0,void 0,void 0,(function(){var i,v;return t(this,(function(t){return void 0===p||(i=s((null==f?void 0:f.href)||"",e.loggerProvider),v={"[Amplitude] Page Domain":(null==f?void 0:f.hostname)||"","[Amplitude] Page Location":i,"[Amplitude] Page Path":s((null==f?void 0:f.pathname)||"",e.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":s(i.split("?")[0],e.loggerProvider)},o((function(i){v["[Amplitude] LCP"]=c(i)})),r((function(i){v["[Amplitude] FCP"]=c(i)})),l((function(i){v["[Amplitude] INP"]=c(i)})),u((function(i){v["[Amplitude] CLS"]=c(i)})),a((function(i){v["[Amplitude] TTFB"]=c(i)})),m=function(){"hidden"===p.visibilityState&&m&&(d.track(n,v),p.removeEventListener("visibilitychange",m),m=null)},p.addEventListener("visibilitychange",m)),[2]}))}))},execute:function(e){return i(void 0,void 0,void 0,(function(){return t(this,(function(i){return[2,e]}))}))},teardown:function(){return i(void 0,void 0,void 0,(function(){return t(this,(function(i){return m&&(null==p||p.removeEventListener("visibilitychange",m)),[2]}))}))}}};export{v as webVitalsPlugin};
var t=function(r,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},t(r,e)};function r(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var e=function(){return e=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},e.apply(this,arguments)};function n(t,r){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(e[n[o]]=t[n[o]])}return e}function o(t,r,e,n){return new(e||(e=Promise))((function(o,l){function a(t){try{i(n.next(t))}catch(t){l(t)}}function c(t){try{i(n.throw(t))}catch(t){l(t)}}function i(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(a,c)}i((n=n.apply(t,r||[])).next())}))}function l(t,r){var e,n,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(i){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(l=0)),l;)try{if(e=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,n=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=r.call(t,l)}catch(t){c=[6,t],n=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}}function a(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,l=e.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(n=l.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=l.return)&&e.call(l)}finally{if(o)throw o.error}}return a}function i(t,r,e){if(e||2===arguments.length)for(var n,o=0,l=r.length;o<l;o++)!n&&o in r||(n||(n=Array.prototype.slice.call(r,0,o)),n[o]=r[o]);return t.concat(n||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;export{e as __assign,o as __awaiter,r as __extends,l as __generator,c as __read,n as __rest,i as __spreadArray,a as __values};
let e=-1;const t=t=>{addEventListener("pageshow",(n=>{n.persisted&&(e=n.timeStamp,t(n))}),!0)},n=(e,t,n,i)=>{let r,s;return o=>{t.value>=0&&(o||i)&&(s=t.value-(r??0),(s||void 0===r)&&(r=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},i=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},r=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},s=()=>{const e=r();return e?.activationStart??0},o=(t,n=-1)=>{const i=r();let o="navigate";return e>=0?o="back-forward-cache":i&&(document.prerendering||s()>0?o="prerender":document.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-"))),{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},a=new WeakMap;function d(e,t){return a.get(e)||a.set(e,new t),a.get(e)}class l{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const c=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return i.observe({type:e,buffered:!0,...n}),i}}catch{}},h=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let u=-1;const m=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=e=>{"hidden"===document.visibilityState&&u>-1&&(u="visibilitychange"===e.type?e.timeStamp:0,g())},v=()=>{addEventListener("visibilitychange",p,!0),addEventListener("prerenderingchange",p,!0)},g=()=>{removeEventListener("visibilitychange",p,!0),removeEventListener("prerenderingchange",p,!0)},T=()=>{if(u<0){const e=s(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;u=n??m(),v(),t((()=>{setTimeout((()=>{u=m(),v()}))}))}return{get firstHiddenTime(){return u}}},f=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},y=[1800,3e3],C=(e,r={})=>{f((()=>{const a=T();let d,l=o("FCP");const h=c("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(h.disconnect(),t.startTime<a.firstHiddenTime&&(l.value=Math.max(t.startTime-s(),0),l.entries.push(t),d(!0)))}));h&&(d=n(e,l,y,r.reportAllChanges),t((t=>{l=o("FCP"),d=n(e,l,y,r.reportAllChanges),i((()=>{l.value=performance.now()-t.timeStamp,d(!0)}))})))}))},b=[.1,.25],L=(e,r={})=>{C(h((()=>{let s,a=o("CLS",0);const h=d(r,l),u=e=>{for(const t of e)h.h(t);h.i>a.value&&(a.value=h.i,a.entries=h.o,s())},m=c("layout-shift",u);m&&(s=n(e,a,b,r.reportAllChanges),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(u(m.takeRecords()),s(!0))})),t((()=>{h.i=0,a=o("CLS",0),s=n(e,a,b,r.reportAllChanges),i((()=>s()))})),setTimeout(s))})))};let P=0,S=1/0,E=0;const A=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),E=Math.max(E,t.interactionId),P=E?(E-S)/7+1:0)};let I;const w=()=>I?P:performance.interactionCount??0;let M=0;class F{u=[];l=new Map;m;p;v(){M=w(),this.u.length=0,this.l.clear()}P(){const e=Math.min(this.u.length-1,Math.floor((w()-M)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.T){if(n?e.duration>n.T?(n.entries=[e],n.T=e.duration):e.duration===n.T&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],T:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(((e,t)=>t.T-e.T)),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const k=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(t(e=h(e)),document.addEventListener("visibilitychange",e,{once:!0}))},B=[200,500],x=(e,i={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&f((()=>{"interactionCount"in performance||I||(I=c("event",A,{type:"event",buffered:!0,durationThreshold:0}));let r,s=o("INP");const a=d(i,F),l=e=>{k((()=>{for(const t of e)a.h(t);const t=a.P();t&&t.T!==s.value&&(s.value=t.T,s.entries=t.entries,r())}))},h=c("event",l,{durationThreshold:i.durationThreshold??40});r=n(e,s,B,i.reportAllChanges),h&&(h.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(l(h.takeRecords()),r(!0))})),t((()=>{a.v(),s=o("INP"),r=n(e,s,B,i.reportAllChanges)})))}))};class N{m;h(e){this.m?.(e)}}const R=[2500,4e3],q=(e,r={})=>{f((()=>{const a=T();let l,u=o("LCP");const m=d(r,N),p=e=>{r.reportAllChanges||(e=e.slice(-1));for(const t of e)m.h(t),t.startTime<a.firstHiddenTime&&(u.value=Math.max(t.startTime-s(),0),u.entries=[t],l())},v=c("largest-contentful-paint",p);if(v){l=n(e,u,R,r.reportAllChanges);const s=h((()=>{p(v.takeRecords()),v.disconnect(),l(!0)}));for(const e of["keydown","click","visibilitychange"])addEventListener(e,(()=>k(s)),{capture:!0,once:!0});t((t=>{u=o("LCP"),l=n(e,u,R,r.reportAllChanges),i((()=>{u.value=performance.now()-t.timeStamp,l(!0)}))}))}}))},H=[800,1800],D=e=>{document.prerendering?f((()=>D(e))):"complete"!==document.readyState?addEventListener("load",(()=>D(e)),!0):setTimeout(e)},O=(e,i={})=>{let a=o("TTFB"),d=n(e,a,H,i.reportAllChanges);D((()=>{const l=r();l&&(a.value=Math.max(l.responseStart-s(),0),a.entries=[l],d(!0),t((()=>{a=o("TTFB",0),d=n(e,a,H,i.reportAllChanges),d(!0)})))}))};export{b as CLSThresholds,y as FCPThresholds,B as INPThresholds,R as LCPThresholds,H as TTFBThresholds,L as onCLS,C as onFCP,x as onINP,q as onLCP,O as onTTFB};
function t(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function e(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}var o=function(){return"function"==typeof Symbol},i=function(t){return o()&&Boolean(Symbol[t])},u=function(t){return i(t)?Symbol[t]:"@@"+t};o()&&!i("observable")&&(Symbol.observable=Symbol("observable"));var c=u("iterator"),f=u("observable"),s=u("species");function a(t,r){var e=t[r];if(null!=e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}function l(t){var r=t.constructor;return void 0!==r&&null===(r=r[s])&&(r=void 0),void 0!==r?r:g}function b(t){return t instanceof g}function p(t){p.log?p.log(t):setTimeout((function(){throw t}))}function h(t){Promise.resolve().then((function(){try{t()}catch(t){p(t)}}))}function v(t){var r=t._cleanup;if(void 0!==r&&(t._cleanup=void 0,r))try{if("function"==typeof r)r();else{var e=a(r,"unsubscribe");e&&e.call(r)}}catch(t){p(t)}}function y(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function d(t,r,e){t._state="running";var n=t._observer;try{var o=a(n,r);switch(r){case"next":o&&o.call(n,e);break;case"error":if(y(t),!o)throw e;o.call(n,e);break;case"complete":y(t),o&&o.call(n)}}catch(t){p(t)}"closed"===t._state?v(t):"running"===t._state&&(t._state="ready")}function m(t,r,e){if("closed"!==t._state){if("buffering"!==t._state)return"ready"!==t._state?(t._state="buffering",t._queue=[{type:r,value:e}],void h((function(){return function(t){var r=t._queue;if(r){t._queue=void 0,t._state="ready";for(var e=0;e<r.length&&(d(t,r[e].type,r[e].value),"closed"!==t._state);++e);}}(t)}))):void d(t,r,e);t._queue.push({type:r,value:e})}}var w=function(){function t(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var e=new _(this);try{this._cleanup=r.call(void 0,e)}catch(t){e.error(t)}"initializing"===this._state&&(this._state="ready")}return t.prototype.unsubscribe=function(){"closed"!==this._state&&(y(this),v(this))},n(t,[{key:"closed",get:function(){return"closed"===this._state}}]),t}(),_=function(){function t(t){this._subscription=t}var r=t.prototype;return r.next=function(t){m(this._subscription,"next",t)},r.error=function(t){m(this._subscription,"error",t)},r.complete=function(){m(this._subscription,"complete")},n(t,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),t}(),g=function(){function r(t){if(!(this instanceof r))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var e=r.prototype;return e.subscribe=function(t){return"object"==typeof t&&null!==t||(t={next:t,error:arguments[1],complete:arguments[2]}),new w(t,this._subscriber)},e.forEach=function(t){var r=this;return new Promise((function(e,n){if("function"==typeof t)var o=r.subscribe({next:function(r){try{t(r,i)}catch(t){n(t),o.unsubscribe()}},error:n,complete:e});else n(new TypeError(t+" is not a function"));function i(){o.unsubscribe(),e()}}))},e.map=function(t){var r=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return r.subscribe({next:function(r){try{r=t(r)}catch(t){return e.error(t)}e.next(r)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))},e.filter=function(t){var r=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(e){return r.subscribe({next:function(r){try{if(!t(r))return}catch(t){return e.error(t)}e.next(r)},error:function(t){e.error(t)},complete:function(){e.complete()}})}))},e.reduce=function(t){var r=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this),n=arguments.length>1,o=!1,i=arguments[1];return new e((function(e){return r.subscribe({next:function(r){var u=!o;if(o=!0,!u||n)try{i=t(i,r)}catch(t){return e.error(t)}else i=r},error:function(t){e.error(t)},complete:function(){if(!o&&!n)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(i),e.complete()}})}))},e.concat=function(){for(var t=this,r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];var o=l(this);return new o((function(r){var n,i=0;return function t(u){n=u.subscribe({next:function(t){r.next(t)},error:function(t){r.error(t)},complete:function(){i===e.length?(n=void 0,r.complete()):t(o.from(e[i++]))}})}(t),function(){n&&(n.unsubscribe(),n=void 0)}}))},e.flatMap=function(t){var r=this;if("function"!=typeof t)throw new TypeError(t+" is not a function");var e=l(this);return new e((function(n){var o=[],i=r.subscribe({next:function(r){if(t)try{r=t(r)}catch(t){return n.error(t)}var i=e.from(r).subscribe({next:function(t){n.next(t)},error:function(t){n.error(t)},complete:function(){var t=o.indexOf(i);t>=0&&o.splice(t,1),u()}});o.push(i)},error:function(t){n.error(t)},complete:function(){u()}});function u(){i.closed&&0===o.length&&n.complete()}return function(){o.forEach((function(t){return t.unsubscribe()})),i.unsubscribe()}}))},e[f]=function(){return this},r.from=function(e){var n="function"==typeof this?this:r;if(null==e)throw new TypeError(e+" is not an object");var o=a(e,f);if(o){var u=o.call(e);if(Object(u)!==u)throw new TypeError(u+" is not an object");return b(u)&&u.constructor===n?u:new n((function(t){return u.subscribe(t)}))}if(i("iterator")&&(o=a(e,c)))return new n((function(r){h((function(){if(!r.closed){for(var n,i=t(o.call(e));!(n=i()).done;){var u=n.value;if(r.next(u),r.closed)return}r.complete()}}))}));if(Array.isArray(e))return new n((function(t){h((function(){if(!t.closed){for(var r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}));throw new TypeError(e+" is not observable")},r.of=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new("function"==typeof this?this:r)((function(t){h((function(){if(!t.closed){for(var r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}}))}))},n(r,null,[{key:s,get:function(){return this}}]),r}();o()&&Object.defineProperty(g,Symbol("extensions"),{value:{symbol:f,hostReportError:p},configurable:!0});export{g as Observable};
import{request as r}from"./server/auth-links.server.js";const e={request:r};export{e as authLinks};
import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as a}from"../../common/auth/auth.validate.js";import{requestAuthLink as t}from"../shared/auth-links.api.js";import{serializeAuthLink as o}from"../shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as s}from"../shared/auth-links.validate.js";async function i({requestSettings:i,operationSettings:n}){s(i);const{accessToken:r,stagingToken:e}=n||{},c=r||a(),m=await t({accessToken:c,stagingToken:e,action:i.action,callbackUrl:i.callbackUrl});return o(m)}export{i as request};
import{untrustBeneficiaries as e,updateBeneficiary as i,addBeneficiary as r,getBeneficiary as a,getBeneficiaries as n}from"./server/beneficiaries.server.js";const s={getBeneficiaries:n,getBeneficiary:a,addBeneficiary:r,updateBeneficiary:i,untrustBeneficiaries:e};export{s as beneficiaries};
import{serializePaginationResponse as e}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as i}from"../../common/auth/auth.validate.js";import{untrustBeneficiaries as n,updateBeneficiary as a,addBeneficiary as t,getBeneficiary as s,getBeneficiaries as o}from"../shared/beneficiaries.api.js";import{serializeBeneficiary as c}from"../shared/beneficiaries.serializer.js";import{validateTrustBeneficiariesParams as r,validateUpdateBeneficiaryParams as g,validateAddBeneficiaryParams as f,validateGetBeneficiaryParams as m}from"../shared/beneficiaries.validate.js";async function p(n){const{accessToken:a,stagingToken:t,paginationSettings:s}=n?.operationSettings||{},r=a||i(),g=await o({accessToken:r,stagingToken:t,paginationSettings:s}),f=g.beneficiaries.map((e=>c(e))),m=e(g.meta);return{beneficiaries:f,...m?{meta:m}:{}}}async function y({beneficiarySettings:e,operationSettings:n}){const a=m(e?.beneficiaryId),{accessToken:t,stagingToken:o}=n||{},r=t||i(),g=await s({beneficiaryId:a,accessToken:r,stagingToken:o});return c(g)}async function k({beneficiarySettings:e,operationSettings:n}){const a=f(e),{accessToken:s,stagingToken:o,idempotencyKey:r}=n||{},g=s||i(),m=await t({beneficiary:a,accessToken:g,stagingToken:o,idempotencyKey:r});return c(m)}async function T({beneficiarySettings:e,operationSettings:n}){const t=g(e),{accessToken:s,stagingToken:o,idempotencyKey:r,mfaPreference:f}=n||{},m={beneficiaryParamsBeingEdited:t,accessToken:s||i(),stagingToken:o,idempotencyKey:r,mfaPreference:f},p=await a(m);return c(p)}async function d({beneficiarySettings:e,operationSettings:a}){const t=r(e?.beneficiaryIds),{accessToken:s,stagingToken:o}=a||{},g=s||i();return(await n({beneficiaryIds:t,accessToken:g,stagingToken:o})).map(c)}export{k as addBeneficiary,p as getBeneficiaries,y as getBeneficiary,d as untrustBeneficiaries,T as updateBeneficiary};
import{getCard as r,getCards as e}from"./server/cards.server.js";const s={getCards:e,getCard:r};export{s as cards};
import{tracker as a}from"../../common/analytics/analytics-tracker.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as r}from"../../common/auth/auth.validate.js";import{InvalidParametersError as s}from"../../errors/InvalidParametersError.js";import{getCard as t,getCards as e}from"../shared/cards.api.js";import{serializeCard as o}from"../shared/cards.serializer.js";import{validateGetCardParams as n}from"../shared/cards.validate.js";async function i(t){a.cardsList();const n=t?.cardSettings?.membershipId;if(n&&"string"!=typeof n)throw new s("membershipId must be a string");const{accessToken:i,stagingToken:c}=t?.operationSettings||{},m=i||r();return(await e({membershipId:n,accessToken:m,stagingToken:c})).map((a=>o(a)))}async function c({cardSettings:a,operationSettings:s}){n(a);const e=a.cardId,{accessToken:i,stagingToken:c}=s||{},m=i||r(),d=await t({cardId:e,accessToken:m,stagingToken:c});return o(d)}export{c as getCard,i as getCards};
import{makeNetworkCall as n}from"../../common/network/network.js";function e({membershipId:n,accessToken:e,stagingToken:s}){return{path:n?`/v2/cards?holder_ids[]=${n}`:"/v2/cards",options:{method:"GET",headers:{accessToken:e,stagingToken:s}}}}async function s({membershipId:s,accessToken:o,stagingToken:a}){const c=e({membershipId:s,accessToken:o,stagingToken:a}),{cards:t}=await n(c);return t}function o({cardId:n,accessToken:e,stagingToken:s}){return{path:`/v2/cards?ids[]=${n}`,options:{method:"GET",headers:{accessToken:e,stagingToken:s}}}}async function a({cardId:e,accessToken:s,stagingToken:a}){const c=o({cardId:e,accessToken:s,stagingToken:a}),{cards:t}=await n(c);return t[0]}export{a as getCard,s as getCards,o as prepareGetCardCall,e as prepareGetCardsCall};
import"../../common/environment/environment-manager.js";import"../../common/locale/locale-manager.js";import"../../common/auth/auth.js";import"../../common/operation-settings/operation-settings.js";import"./cards.types.js";function t(t){return{id:t.id,nickname:t.nickname,embossedName:t.embossed_name,status:t.status,maskPan:t.mask_pan,expMonth:parseInt(t.exp_month,10),expYear:parseInt(t.exp_year,10),lastActivityAt:new Date(t.last_activity_at),lastDigits:t.last_digits,shipToBusiness:t.ship_to_business,atmOption:t.atm_option,atmDailyLimitOption:t.atm_daily_limit_option,nfcOption:t.nfc_option,onlineOption:t.online_option,foreignOption:t.foreign_option,atmMonthlyLimit:t.atm_monthly_limit,atmMonthlySpent:t.atm_monthly_spent,atmDailyLimit:t.atm_daily_limit,atmDailySpent:t.atm_daily_spent,paymentMonthlyLimit:t.payment_monthly_limit,paymentMonthlySpent:t.payment_monthly_spent,paymentDailyLimit:t.payment_daily_limit,paymentDailySpent:t.payment_daily_spent,paymentDailyLimitOption:t.payment_daily_limit_option,paymentTransactionLimit:t.payment_transaction_limit,paymentTransactionLimitOption:t.payment_transaction_limit_option,activeDays:t.active_days,holderId:t.holder_id,bankAccountId:t.bank_account_id,organizationId:t.organization_id,updatedAt:new Date(t.updated_at),createdAt:new Date(t.created_at),shippedAt:new Date(t.shipped_at),cardType:t.card_type,cardLevel:t.card_level,paymentLifespanLimit:t.payment_lifespan_limit,paymentLifespanSpent:t.payment_lifespan_spent,preExpiresAt:new Date(t.pre_expires_at),categories:t.categories,renewed:t.renewed,renewal:t.renewal,...t.parent_card_summary&&{parentCardSummary:{id:t.parent_card_summary.id,lastDigits:t.parent_card_summary.last_digits}},hadOperation:t.had_operation,hadPinOperation:t.had_pin_operation,cardDesign:t.card_design,typeOfPrint:t.type_of_print,upsold:t.upsold,upsell:t.upsell,discardOn:new Date(t.discard_on),reordered:t.reordered}}export{t as serializeCard};
var e;!function(e){e.PENDING="pending",e.ONHOLD="onhold",e.ORDER_CANCELED="order_canceled",e.LIVE="live",e.PAUSED="paused",e.STOLEN="stolen",e.LOST="lost",e.PIN_BLOCKED="pin_blocked",e.DELETED="deleted",e.PRE_EXPIRED="pre_expired",e.EXPIRED="expired",e.DISCARDED="discarded",e.SHIPPED_LOST="shipped_lost",e.ABUSIVE="abusive"}(e||(e={}));export{e as CardStatus};
import"../../common/environment/environment-manager.js";import"../../common/locale/locale-manager.js";import"../../common/auth/auth.js";import"../../common/operation-settings/operation-settings.js";import{validateExpectedStringValues as r}from"../../validation/input-param-validation.js";import{InvalidParametersError as o}from"../../errors/InvalidParametersError.js";function t(t){if(!t)throw new o("cardSettings parameter is required for the called function");if(!t.cardId)throw new o("cardId parameter is required for the called function");const e=r({cardId:t.cardId});if(e.length>0)throw new o(e);return t}export{t as validateGetCardParams};
import*as i from"../../../node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/index.js";import{init as e,track as t,reset as n}from"../../../node_modules/.pnpm/@amplitude_analytics-browser@2.32.2/node_modules/@amplitude/analytics-browser/lib/esm/index.js";import{ENVIRONMENTS as o}from"../constants.js";import{environmentManager as s}from"../environment/environment-manager.js";import{info as a}from"../logger/logger.js";import{isRunningInServer as r}from"../runtime/runtime.validation.js";import{ANALYTICS_EVENTS as l}from"./analytics.constants.js";import{LogLevel as c}from"../../../node_modules/.pnpm/@amplitude_analytics-core@2.34.1/node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js";class m{constructor(){this.isInitialized=!1}static getInstance(){return m.instance||(m.instance=new m),m.instance}initialize(){if(this.isInitialized||r())return;const t=s.getEnvironment()||"production",n=t===o.PRODUCTION?"52c120d2f5c89ca646fae6649a1ce7ad":"373aa80c38e5bc2a55895a96c8447fef";if(n)try{if(!i||"function"!=typeof e)throw new Error("Analytics SDK module not available");const s={defaultTracking:{sessions:!1,pageViews:!1,formInteractions:!1,fileDownloads:!1},logLevel:t!==o.PRODUCTION?c.Debug:c.None};e(n,void 0,s),this.isInitialized=!0,this.track(l.SDK_INITIALIZED)}catch(i){console.error("Failed to initialize analytics tracking:",i)}else a("No tracking client will be initialized due to missing API key")}isEnabled(){return this.isInitialized}track(i,e){if(this.isInitialized)try{t(i,e)}catch(i){console.error("Failed to track analytics event:",i)}}reset(){if(this.isInitialized)try{n()}catch(i){console.error("Failed to reset analytics:",i)}}}const d=m.getInstance();export{m as AmplitudeManager,d as amplitudeManager};
import{amplitudeManager as e}from"./amplitude-manager.js";import{ANALYTICS_EVENTS as E}from"./analytics.constants.js";function a(E,a){e.track(E,a)}const s={cardsList:e=>{a(E.CARDS_LIST,e)},cardsGet:e=>{a(E.CARDS_GET,e)},cardsOrder:e=>{a(E.CARDS_ORDER,e)},cardsUnlock:e=>{a(E.CARDS_UNLOCK,e)},cardsDisplay:e=>{a(E.CARDS_DISPLAY,e)},beneficiariesList:e=>{a(E.BENEFICIARIES_LIST,e)},beneficiariesGet:e=>{a(E.BENEFICIARIES_GET,e)},beneficiariesAdd:e=>{a(E.BENEFICIARIES_ADD,e)},beneficiariesUpdate:e=>{a(E.BENEFICIARIES_UPDATE,e)},beneficiariesTrust:e=>{a(E.BENEFICIARIES_TRUST,e)},beneficiariesUntrust:e=>{a(E.BENEFICIARIES_UNTRUST,e)},sepaTransferList:e=>{a(E.SEPA_TRANSFER_LIST,e)},sepaTransferGet:e=>{a(E.SEPA_TRANSFER_GET,e)},sepaTransferCreate:e=>{a(E.SEPA_TRANSFER_CREATE,e)},sepaTransferCancel:e=>{a(E.SEPA_TRANSFER_CANCEL,e)},sepaTransferCreationFlowLink:e=>{a(E.SEPA_TRANSFER_CREATION_FLOW_LINK,e)},sepaTransferBulkList:e=>{a(E.SEPA_TRANSFER_BULK_LIST,e)},sepaTransferBulkGet:e=>{a(E.SEPA_TRANSFER_BULK_GET,e)},sepaTransferBulkCreate:e=>{a(E.SEPA_TRANSFER_BULK_CREATE,e)},transactionsList:e=>{a(E.TRANSACTIONS_LIST,e)},transactionsGet:e=>{a(E.TRANSACTIONS_GET,e)},organizationsList:e=>{a(E.ORGANIZATIONS_LIST,e)},organizationsBankAccounts:e=>{a(E.ORGANIZATIONS_BANK_ACCOUNTS,e)},paymentLinksCreate:e=>{a(E.PAYMENT_LINKS_CREATE,e)},paymentLinksRedirect:e=>{a(E.PAYMENT_LINKS_REDIRECT,e)},authLinksRequest:e=>{a(E.AUTH_LINKS_REQUEST,e)},uiElementCreated:(e,s)=>{a(E.UI_ELEMENT_CREATED,{uiElementType:e,...s})}};export{a as trackEvent,s as tracker};
const E={SDK_INITIALIZED:"SDK Initialized",CARDS_LIST:"Cards List",CARDS_GET:"Cards Get",CARDS_ORDER:"Cards Order Virtual",CARDS_UNLOCK:"Cards Unlock",CARDS_DISPLAY:"Cards Display",BENEFICIARIES_LIST:"Beneficiaries List",BENEFICIARIES_GET:"Beneficiaries Get",BENEFICIARIES_ADD:"Beneficiaries Add",BENEFICIARIES_UPDATE:"Beneficiaries Update",BENEFICIARIES_TRUST:"Beneficiaries Trust",BENEFICIARIES_UNTRUST:"Beneficiaries Untrust",SEPA_TRANSFER_LIST:"SEPA Transfer List",SEPA_TRANSFER_GET:"SEPA Transfer Get",SEPA_TRANSFER_CREATE:"SEPA Transfer Create",SEPA_TRANSFER_CANCEL:"SEPA Transfer Cancel",SEPA_TRANSFER_CREATION_FLOW_LINK:"SEPA Transfer Creation Flow Link",SEPA_TRANSFER_BULK_LIST:"SEPA Transfer Bulk List",SEPA_TRANSFER_BULK_GET:"SEPA Transfer Bulk Get",SEPA_TRANSFER_BULK_CREATE:"SEPA Transfer Bulk Create",TRANSACTIONS_LIST:"Transactions List",TRANSACTIONS_GET:"Transactions Get",ORGANIZATIONS_LIST:"Organizations List",ORGANIZATIONS_BANK_ACCOUNTS:"Organizations Bank Accounts",PAYMENT_LINKS_CREATE:"Payment Links Create",PAYMENT_LINKS_REDIRECT:"Payment Links Redirect",AUTH_LINKS_REQUEST:"Auth Links Request",UI_ELEMENT_CREATED:"UI Element Created"};export{E as ANALYTICS_EVENTS};
import{operationSettingsManager as o}from"../operation-settings/operation-settings.js";const t="[Qonto Embed SDK]";function e(e,n){if(!o.getDebugMode())return;const s=[t,e];console.log(...s)}export{t as SDK_PREFIX,e as info};
import{getBankAccounts as r,getOrganization as o}from"./server/organizations.server.js";const t={getOrganization:o,getBankAccounts:r};export{t as organizations};
import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as a}from"../../common/auth/auth.validate.js";import{getBankAccounts as n,getOrganization as o}from"../shared/organizations.api.js";import{serializeBankAccount as t,serializeOrganization as s}from"../shared/organizations.serializer.js";const e=async({operationSettings:n}={})=>{const{accessToken:t,stagingToken:e}=n||{},i=t||a(),r=await o({accessToken:i,stagingToken:e});return s(r.organization)},i=async({operationSettings:o}={})=>{const{accessToken:s,stagingToken:e}=o||{},i=s||a();return(await n({accessToken:i,stagingToken:e})).bank_accounts.map(t)};export{i as getBankAccounts,e as getOrganization};
import{makeNetworkCall as n}from"../../common/network/network.js";const e=({accessToken:n,stagingToken:e})=>({path:"/v2/organization/",options:{method:"GET",headers:{accessToken:n,stagingToken:e}}}),o=async({accessToken:o,stagingToken:s})=>{const a=e({accessToken:o,stagingToken:s});return await n(a)},s=({accessToken:n,stagingToken:e})=>({path:"/v2/bank_accounts/",options:{method:"GET",headers:{accessToken:n,stagingToken:e}}}),a=async({accessToken:e,stagingToken:o})=>{const a=s({accessToken:e,stagingToken:o});return await n(a)};export{a as getBankAccounts,o as getOrganization,s as prepareGetBankAccounts,e as prepareGetOrganization};
const a=a=>({id:a.id,slug:a.slug,legalName:a.legal_name,legalNumber:a.legal_number,legalSector:a.legal_sector,legalRegistrationDate:a.legal_registration_date,legalAddress:a.legal_address,legalForm:a.legal_form,legalCountry:a.legal_country,legalShareCapital:a.legal_share_capital,locale:a.locale,contractSignedAt:a.contract_signed_at,bankAccounts:a.bank_accounts.map(e)}),e=a=>({id:a?.id,slug:a.slug,iban:a.iban,bic:a.bic,currency:a.currency,balance:parseFloat(a.balance),balanceCents:a.balance_cents,authorizedBalance:a.authorized_balance,authorizedBalanceCents:a.authorized_balance_cents,name:a.name,updatedAt:new Date(a.updated_at),status:a.status,main:a.main});export{e as serializeBankAccount,a as serializeOrganization};
import{getPaymentLinkCreationFlowUrl as e}from"./server/payment-links.server.js";const r={getPaymentLinkCreationFlowUrl:e};export{r as paymentLinks};
import{request as t}from"../../auth-links/server/auth-links.server.js";import{AUTH_LINK_ACTIONS as n}from"../../common/constants.js";import{validateItems as r,validatePaymentLinkCreationFlowParams as s}from"../shared/payment-links.validate.js";const e=async({paymentLinkSettings:e,operationSettings:i})=>{const{items:o}=e;r(o);const a=s(e),m=await t({requestSettings:{action:n.PAYMENT_LINK_CREATE,callbackUrl:a},operationSettings:i}),c=new URLSearchParams({...o?{items:JSON.stringify(o)}:{}});return c.toString()?`${m.url}?${c.toString()}`:m.url};export{e as getPaymentLinkCreationFlowUrl};
import{InvalidParametersError as D}from"../../errors/InvalidParametersError.js";const N={AED:"AED",AUD:"AUD",BGN:"BGN",CAD:"CAD",CHF:"CHF",CNY:"CNY",CZK:"CZK",DKK:"DKK",EUR:"EUR",GBP:"GBP",GHS:"GHS",HKD:"HKD",HUF:"HUF",ILS:"ILS",INR:"INR",MXN:"MXN",NOK:"NOK",NZD:"NZD",PEN:"PEN",PLN:"PLN",RON:"RON",RSD:"RSD",SAR:"SAR",SEK:"SEK",SGD:"SGD",TRY:"TRY",USD:"USD",ZAR:"ZAR",ZMW:"ZMW"},r=r=>{if(!(D=>Object.values(N).includes(D))(r))throw new D(`currency ${r} is not valid, valid currencies are ${Object.values(N).join(", ")}`)};export{r as validateCurrency};
const o={GOOD:"good",SERVICE:"service"};export{o as LINK_TYPES};
import{validatePresenceOfRequiredParams as t,validateExpectedStringValues as e,validateExpectedNumericValues as r}from"../../validation/input-param-validation.js";import{validateCurrency as i}from"./currency.validation.js";import{LINK_TYPES as a}from"./payment-links.types.js";import{validateUnit as n}from"./unit.validation.js";import{InvalidParametersError as c}from"../../errors/InvalidParametersError.js";const l=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],o=[{name:"currency"},{name:"value"}];function m(a){if(!a||!Array.isArray(a))return[];a.forEach((a=>{t(a,l),t(a.unitPrice,o);const m=[...e({id:a.id,title:a.title,vatRate:a.vatRate,currency:a.unitPrice.currency,measureUnit:a.measureUnit,unitPrice:a.unitPrice.value,...a.description?{description:a.description}:{}}),...r({quantity:a.quantity})].flat();if(m.length>0)throw new c(m);u(a.type),i(a.unitPrice.currency),n(a.measureUnit)}))}const u=t=>{if(!Object.values(a).includes(t))throw new c(`type ${t} is not valid, valid types are ${Object.values(a).join(", ")}`)};function s(t){if(!t?.callbackUrl)throw new c("callbackUrl parameter is required for the payment link creation flow");if("string"!=typeof t.callbackUrl)throw new c("callbackUrl must be a string");if(""===t.callbackUrl.trim())throw new c("callbackUrl cannot be empty");return t.callbackUrl}export{m as validateItems,s as validatePaymentLinkCreationFlowParams,u as validateType};
import{InvalidParametersError as e}from"../../errors/InvalidParametersError.js";const r={UNIT:"unit",HOUR:"hour",DAY:"day",MONTH:"month",GRAM:"gram",KILOGRAM:"kilogram",LITER:"liter",METER:"meter",SQUARE_METER:"square_meter",CUBIC_METER:"cubic_meter",AMPERE:"ampere",NUMBER_OF_ARTICLES:"number_of_articles",CENTIMETER:"centimeter",CUBIC_METER_PER_HOUR:"cubic_meter_per_hour",GIGAJOULE:"gigajoule",GIGAWATT:"gigawatt",GIGAWATT_HOUR:"gigawatt_hour",HALF_YEAR:"half_year",JOULE:"joule",KILOJOULE:"kilojoule",KILOVAR:"kilovar",KILOWATT:"kilowatt",KILOWATT_HOUR:"kilowatt_hour",MEGAJOULE:"megajoule",MEGAWATT:"megawatt",MEGAWATT_HOUR:"megawatt_hour",MILLIGRAM:"milligram",MILLILITER:"milliliter",MILLIMETER:"millimeter",MINUTE:"minute",PAIR:"pair",QUARTER:"quarter",SECOND:"second",SET:"set",TON:"ton",TWO_WEEK:"two_week",WATT_HOUR:"watt_hour",WEEK:"week",YEAR:"year"},t=t=>{if(!(e=>Object.values(r).includes(e))(t))throw new e(`unit ${t} is not valid, valid units are ${Object.values(r).join(", ")}`)};export{t as validateUnit};
import{getTransaction as r,getTransactions as s}from"./server/transactions.server.js";const t={getTransactions:s,getTransaction:r};export{t as transactions};
import{serializePaginationResponse as t}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as a}from"../../common/auth/auth.validate.js";import{getTransaction as n,getTransactions as s}from"../shared/transactions.api.js";import{serializeTransaction as o}from"../shared/transactions.serializer.js";import{validateGetTransactionParams as i}from"../shared/transactions.validation.js";async function r(n){const{accessToken:i,stagingToken:r,paginationSettings:e}=n?.operationSettings||{},c={...n?.transactionSettings||{},paginationSettings:e},g=i||a(),m=await s({...c,accessToken:g,stagingToken:r});return{transactions:m.transactions.map(o),meta:t(m.meta)}}async function e({transactionSettings:t,operationSettings:s}){const{accessToken:r,stagingToken:e}=s||{},{transactionId:c}=i(t),g=r||a(),m=await n({transactionId:c,accessToken:g,stagingToken:e});return o(m)}export{e as getTransaction,r as getTransactions};
import{buildPaginationParams as t}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";const a="/v2/transactions";function e({bankAccountId:n,iban:e,status:o,updatedAtFrom:s,updatedAtTo:p,emittedAtFrom:i,emittedAtTo:d,settledAtFrom:c,settledAtTo:r,side:m,operationType:u,withAttachments:_,paginationSettings:g,accessToken:T,stagingToken:k}){const f={method:"GET",headers:{accessToken:T,stagingToken:k}},h=new URLSearchParams;n&&h.append("bank_account_id",n),e&&h.append("iban",e),o&&h.append("status",o),s&&h.append("updated_at_from",s),p&&h.append("updated_at_to",p),i&&h.append("emitted_at_from",i),d&&h.append("emitted_at_to",d),c&&h.append("settled_at_from",c),r&&h.append("settled_at_to",r),m&&h.append("side",m),u&&h.append("operation_type",u),void 0!==_&&h.append("with_attachments",String(_));const A=t(g);for(const[t,n]of A)h.append(t,n);const w=h.toString();return{path:`${a}${w?`?${w}`:""}`,options:f}}async function o(t){const a=e(t),{transactions:o,meta:s}=await n(a);return{transactions:o,meta:s}}function s({transactionId:t,accessToken:n,stagingToken:e}){return{path:`${a}/${t}`,options:{method:"GET",headers:{accessToken:n,stagingToken:e}}}}async function p(t){const a=s(t),{transaction:e}=await n(a);return e}export{p as getTransaction,o as getTransactions,s as prepareGetTransactionCall,e as prepareGetTransactionsCall};
function t(t){return{transactionId:t.transaction_id,amount:t.amount,amountCents:t.amount_cents,settledBalance:t.settled_balance,settledBalanceCents:t.settled_balance_cents,attachmentIds:t.attachment_ids,localAmount:t.local_amount,localAmountCents:t.local_amount_cents,side:t.side,operationType:t.operation_type,currency:t.currency,localCurrency:t.local_currency,label:t.label,settledAt:new Date(t.settled_at),emittedAt:new Date(t.emitted_at),updatedAt:new Date(t.updated_at),status:t.status,note:t.note,reference:t.reference,vatAmount:t.vat_amount,vatAmountCents:t.vat_amount_cents,vatRate:t.vat_rate,initiatorId:t.initiator_id,labelIds:t.label_ids,attachmentLost:t.attachment_lost,attachmentRequired:t.attachment_required,cardLastDigits:t.card_last_digits,category:t.category,cashflowCategory:{name:t.cashflow_category?.name||""},cashflowSubcategory:{name:t.cashflow_subcategory?.name||""},id:t.id,subjectType:t.subject_type,...t.transfer?{transfer:{counterpartyAccountNumber:t.transfer.counterparty_account_number,counterpartyName:t.transfer.counterparty_name,counterpartyBic:t.transfer.counterparty_bic,counterpartyIban:t.transfer.counterparty_iban}}:{}}}export{t as serializeTransaction};
import{InvalidParametersError as t}from"../../errors/InvalidParametersError.js";function r(r){if(!r)throw new t("transactionSettings parameter is required for the called function");if(!r.transactionId)throw new t("transactionSettings.transactionId parameter is required for the called function");if(r.transactionId&&"string"!=typeof r.transactionId)throw new t("transactionSettings.transactionId must be a string.");return r}export{r as validateGetTransactionParams};
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"auth-links.client.d.ts","sourceRoot":"","sources":["../../../src/auth-links/client/auth-links.client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAKzF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwBvD"}
{"version":3,"file":"auth-links.client.d.ts","sourceRoot":"","sources":["../../../src/auth-links/client/auth-links.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAKzF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyBvD"}

@@ -1,1 +0,1 @@

{"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAuB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA+B/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAwB1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAuBA"}
{"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAwB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA0BhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAgC/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyB1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAwBA"}

@@ -1,1 +0,1 @@

{"version":3,"file":"cards.client.d.ts","sourceRoot":"","sources":["../../../src/cards/client/cards.client.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAE9B,MAAM,2CAA2C,CAAC;AAgBnD,OAAO,KAAK,EACV,IAAI,EAEJ,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAW/B;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC;IAChB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC,IAAI,EAAE,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC,CAoCf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,GACtD,OAAO,CAAC,uBAAuB,CAAC,CAwDlC"}
{"version":3,"file":"cards.client.d.ts","sourceRoot":"","sources":["../../../src/cards/client/cards.client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAE9B,MAAM,2CAA2C,CAAC;AAgBnD,OAAO,KAAK,EACV,IAAI,EAEJ,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAW/B;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC;IAChB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC,IAAI,EAAE,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,GACtD,OAAO,CAAC,uBAAuB,CAAC,CAyDlC"}

@@ -21,10 +21,26 @@ import { type AnalyticsEventProperties } from './analytics.constants';

cardsList: (properties?: AnalyticsEventProperties) => void;
cardsOrderVirtual: (properties?: AnalyticsEventProperties) => void;
cardsOrderPhysical: (properties?: AnalyticsEventProperties) => void;
cardsGet: (properties?: AnalyticsEventProperties) => void;
cardsOrder: (properties?: AnalyticsEventProperties) => void;
cardsUnlock: (properties?: AnalyticsEventProperties) => void;
cardsDisplay: (properties?: AnalyticsEventProperties) => void;
beneficiariesList: (properties?: AnalyticsEventProperties) => void;
beneficiariesGet: (properties?: AnalyticsEventProperties) => void;
beneficiariesAdd: (properties?: AnalyticsEventProperties) => void;
beneficiariesUpdate: (properties?: AnalyticsEventProperties) => void;
beneficiariesTrust: (properties?: AnalyticsEventProperties) => void;
beneficiariesUntrust: (properties?: AnalyticsEventProperties) => void;
sepaTransferList: (properties?: AnalyticsEventProperties) => void;
sepaTransferGet: (properties?: AnalyticsEventProperties) => void;
sepaTransferCreate: (properties?: AnalyticsEventProperties) => void;
sepaTransferCancel: (properties?: AnalyticsEventProperties) => void;
sepaTransferCreationFlowLink: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkList: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkGet: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkCreate: (properties?: AnalyticsEventProperties) => void;
transactionsList: (properties?: AnalyticsEventProperties) => void;
transactionsGet: (properties?: AnalyticsEventProperties) => void;
organizationsList: (properties?: AnalyticsEventProperties) => void;
organizationsBankAccounts: (properties?: AnalyticsEventProperties) => void;
paymentLinksCreate: (properties?: AnalyticsEventProperties) => void;
paymentLinksRedirect: (properties?: AnalyticsEventProperties) => void;
authLinksRequest: (properties?: AnalyticsEventProperties) => void;

@@ -31,0 +47,0 @@ uiElementCreated: (uiElementType: string, properties?: AnalyticsEventProperties) => void;

@@ -1,1 +0,1 @@

{"version":3,"file":"analytics-tracker.d.ts","sourceRoot":"","sources":["../../../src/common/analytics/analytics-tracker.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,wBAAwB,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;6BACO,wBAAwB;qCAIhB,wBAAwB;sCAIvB,wBAAwB;qCAIzB,wBAAwB;sCAIvB,wBAAwB;0CAIpB,wBAAwB;oCAI9B,wBAAwB;qCAIvB,wBAAwB;sCAIvB,wBAAwB;oCAI1B,wBAAwB;sCAKvC,MAAM,eACR,wBAAwB;CAOxC,CAAC"}
{"version":3,"file":"analytics-tracker.d.ts","sourceRoot":"","sources":["../../../src/common/analytics/analytics-tracker.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,wBAAwB,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;6BACO,wBAAwB;4BAIzB,wBAAwB;8BAItB,wBAAwB;+BAIvB,wBAAwB;gCAIvB,wBAAwB;qCAInB,wBAAwB;oCAIzB,wBAAwB;oCAIxB,wBAAwB;uCAIrB,wBAAwB;sCAIzB,wBAAwB;wCAItB,wBAAwB;oCAI5B,wBAAwB;mCAIzB,wBAAwB;sCAIrB,wBAAwB;sCAIxB,wBAAwB;gDAId,wBAAwB;wCAIhC,wBAAwB;uCAIzB,wBAAwB;0CAIrB,wBAAwB;oCAI9B,wBAAwB;mCAIzB,wBAAwB;qCAItB,wBAAwB;6CAIhB,wBAAwB;sCAI/B,wBAAwB;wCAItB,wBAAwB;oCAI5B,wBAAwB;sCAKvC,MAAM,eACR,wBAAwB;CAOxC,CAAC"}

@@ -7,10 +7,26 @@ /**

readonly CARDS_LIST: "Cards List";
readonly CARDS_ORDER_VIRTUAL: "Cards Order Virtual";
readonly CARDS_ORDER_PHYSICAL: "Cards Order Physical";
readonly CARDS_GET: "Cards Get";
readonly CARDS_ORDER: "Cards Order Virtual";
readonly CARDS_UNLOCK: "Cards Unlock";
readonly CARDS_DISPLAY: "Cards Display";
readonly BENEFICIARIES_LIST: "Beneficiaries List";
readonly BENEFICIARIES_GET: "Beneficiaries Get";
readonly BENEFICIARIES_ADD: "Beneficiaries Add";
readonly BENEFICIARIES_UPDATE: "Beneficiaries Update";
readonly BENEFICIARIES_TRUST: "Beneficiaries Trust";
readonly BENEFICIARIES_UNTRUST: "Beneficiaries Untrust";
readonly SEPA_TRANSFER_LIST: "SEPA Transfer List";
readonly SEPA_TRANSFER_GET: "SEPA Transfer Get";
readonly SEPA_TRANSFER_CREATE: "SEPA Transfer Create";
readonly SEPA_TRANSFER_CANCEL: "SEPA Transfer Cancel";
readonly SEPA_TRANSFER_CREATION_FLOW_LINK: "SEPA Transfer Creation Flow Link";
readonly SEPA_TRANSFER_BULK_LIST: "SEPA Transfer Bulk List";
readonly SEPA_TRANSFER_BULK_GET: "SEPA Transfer Bulk Get";
readonly SEPA_TRANSFER_BULK_CREATE: "SEPA Transfer Bulk Create";
readonly TRANSACTIONS_LIST: "Transactions List";
readonly TRANSACTIONS_GET: "Transactions Get";
readonly ORGANIZATIONS_LIST: "Organizations List";
readonly ORGANIZATIONS_BANK_ACCOUNTS: "Organizations Bank Accounts";
readonly PAYMENT_LINKS_CREATE: "Payment Links Create";
readonly PAYMENT_LINKS_REDIRECT: "Payment Links Redirect";
readonly AUTH_LINKS_REQUEST: "Auth Links Request";

@@ -17,0 +33,0 @@ readonly UI_ELEMENT_CREATED: "UI Element Created";

@@ -1,1 +0,1 @@

{"version":3,"file":"analytics.constants.d.ts","sourceRoot":"","sources":["../../../src/common/analytics/analytics.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAanB,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD"}
{"version":3,"file":"analytics.constants.d.ts","sourceRoot":"","sources":["../../../src/common/analytics/analytics.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BnB,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD"}
import type { AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, Beneficiary, Card, CardOrderSettings, CreatePaymentLinkSettings, Item, PaymentLinkParams, PhysicalCardOrderSettings, PostAuthAction, SepaTransfer, Transaction, VirtualCardOrderSettings } from '@types';
import { authLinks } from '@auth-links/index.server.ts';
import { beneficiaries } from '@beneficiaries/index.server.ts';
import { cards } from '@cards/index.server.ts';
import { organizations } from '@organizations/index.server.ts';
import { paymentLinks } from '@payment-links/index.server.ts';
import { sepaTransfers } from '@sepa-transfers/index.server';
export { sepaTransfers };
import { transactions } from '@transactions/index.server.ts';
export { authLinks, beneficiaries, cards, organizations, paymentLinks, sepaTransfers, transactions, };
export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, SepaTransfer, Transaction, Item, CreatePaymentLinkSettings, PaymentLinkParams, AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, PostAuthAction, };
//# sourceMappingURL=index.server.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,wBAAwB,EACzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,wBAAwB,EACzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,CAAC;AACF,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}

@@ -1,1 +0,1 @@

{"version":3,"file":"organizations.client.d.ts","sourceRoot":"","sources":["../../../src/organizations/client/organizations.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAUnD,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,YAAY,CAkBvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,WAAW,EAAE,CAgBxB,CAAC"}
{"version":3,"file":"organizations.client.d.ts","sourceRoot":"","sources":["../../../src/organizations/client/organizations.client.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAUnD,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,YAAY,CAmBvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,WAAW,EAAE,CAiBxB,CAAC"}

@@ -26,6 +26,6 @@ /**

operationSettings: import("@validation/operation-settings-validation").ClientOperationSettings;
}) => Promise<import(".").Organization>;
}) => Promise<import("./index.server").Organization>;
getBankAccounts: ({ operationSettings, }: {
operationSettings: import("@validation/operation-settings-validation").ClientOperationSettings;
}) => Promise<import(".").BankAccount[]>;
}) => Promise<import("./index.server").BankAccount[]>;
};

@@ -32,0 +32,0 @@ export type * from './shared/organizations.types';

@@ -25,6 +25,6 @@ /**

operationSettings?: import("@validation/operation-settings-validation").ServerOperationSettings;
}) => Promise<import(".").Organization>;
}) => Promise<import("./index.server").Organization>;
getBankAccounts: ({ operationSettings, }?: {
operationSettings?: import("@validation/operation-settings-validation").ServerOperationSettings;
}) => Promise<import(".").BankAccount[]>;
}) => Promise<import("./index.server").BankAccount[]>;
};

@@ -31,0 +31,0 @@ export type * from './shared/organizations.types';

@@ -1,1 +0,1 @@

{"version":3,"file":"payment-links.client.d.ts","sourceRoot":"","sources":["../../../src/payment-links/client/payment-links.client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CA6BjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,IAAI,CAMf,CAAC"}
{"version":3,"file":"payment-links.client.d.ts","sourceRoot":"","sources":["../../../src/payment-links/client/payment-links.client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CA8BjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,IAAI,CAOf,CAAC"}

@@ -29,4 +29,4 @@ /**

export declare const paymentLinks: {
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<string>;
redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<void>;
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<string>;
redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<void>;
};

@@ -33,0 +33,0 @@ export type * from './shared/payment-links.types';

@@ -31,3 +31,3 @@ /**

export declare const paymentLinks: {
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ServerOperationSettings>) => Promise<string>;
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ServerOperationSettings>) => Promise<string>;
};

@@ -34,0 +34,0 @@ export type * from './shared/payment-links.types';

@@ -1,1 +0,1 @@

{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAiBzF,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAEhC,MAAM,gCAAgC,CAAC;AAMxC;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBnE;AAwBD;;GAEG;AACH,UAAU,8BAA8B;IACtC,oBAAoB,EAAE,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,8BAA8B,GAAG,cAAc,CAChD,+BAA+B,EAAE,EACjC,0BAA0B,GAAG,SAAS,CACvC,CAoEA"}
{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAiBzF,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAEhC,MAAM,gCAAgC,CAAC;AAMxC;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAuBnE;AAwBD;;GAEG;AACH,UAAU,8BAA8B;IACtC,oBAAoB,EAAE,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,8BAA8B,GAAG,cAAc,CAChD,+BAA+B,EAAE,EACjC,0BAA0B,GAAG,SAAS,CACvC,CAqEA"}

@@ -1,1 +0,1 @@

{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAajF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBnE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CACzB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAChB,qBAAqB,EACrB,0BAA0B,GAAG,SAAS,CACvC,CAsIA;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBpE;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2B5F"}
{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAcjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAuBnE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CACzB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAChB,qBAAqB,EACrB,0BAA0B,GAAG,SAAS,CACvC,CAuIA;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpE;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4B5F"}

@@ -1,1 +0,1 @@

{"version":3,"file":"auth-links.client.d.ts","sourceRoot":"","sources":["../../../../src/auth-links/client/auth-links.client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAKzF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwBvD"}
{"version":3,"file":"auth-links.client.d.ts","sourceRoot":"","sources":["../../../../src/auth-links/client/auth-links.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAKzF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAsB,OAAO,CAAC,EAC5B,eAAe,EACf,iBAAiB,GAClB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyBvD"}

@@ -1,1 +0,1 @@

{"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAuB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA+B/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAwB1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAuBA"}
{"version":3,"file":"beneficiaries.client.d.ts","sourceRoot":"","sources":["../../../../src/beneficiaries/client/beneficiaries.client.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAGnC,MAAM,2CAA2C,CAAC;AAWnD,OAAO,KAAK,EACV,WAAW,EAEX,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;CACnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,GACtD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAwB3E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA0BhE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAgC/E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,6BAA6B,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAyB1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,uBAAuB,CAAC;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,OAAO,CAChE,WAAW,EAAE,CACd,CAwBA"}

@@ -1,1 +0,1 @@

{"version":3,"file":"cards.client.d.ts","sourceRoot":"","sources":["../../../../src/cards/client/cards.client.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAE9B,MAAM,2CAA2C,CAAC;AAgBnD,OAAO,KAAK,EACV,IAAI,EAEJ,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAW/B;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC;IAChB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC,IAAI,EAAE,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC,CAoCf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,GACtD,OAAO,CAAC,uBAAuB,CAAC,CAwDlC"}
{"version":3,"file":"cards.client.d.ts","sourceRoot":"","sources":["../../../../src/cards/client/cards.client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAE9B,MAAM,2CAA2C,CAAC;AAgBnD,OAAO,KAAK,EACV,IAAI,EAEJ,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAW/B;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC;IAChB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC,IAAI,EAAE,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAC,EAC5B,YAAY,EACZ,iBAAiB,GAClB,EAAE;IACD,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,GACtD,OAAO,CAAC,uBAAuB,CAAC,CAyDlC"}

@@ -21,10 +21,26 @@ import { type AnalyticsEventProperties } from './analytics.constants';

cardsList: (properties?: AnalyticsEventProperties) => void;
cardsOrderVirtual: (properties?: AnalyticsEventProperties) => void;
cardsOrderPhysical: (properties?: AnalyticsEventProperties) => void;
cardsGet: (properties?: AnalyticsEventProperties) => void;
cardsOrder: (properties?: AnalyticsEventProperties) => void;
cardsUnlock: (properties?: AnalyticsEventProperties) => void;
cardsDisplay: (properties?: AnalyticsEventProperties) => void;
beneficiariesList: (properties?: AnalyticsEventProperties) => void;
beneficiariesGet: (properties?: AnalyticsEventProperties) => void;
beneficiariesAdd: (properties?: AnalyticsEventProperties) => void;
beneficiariesUpdate: (properties?: AnalyticsEventProperties) => void;
beneficiariesTrust: (properties?: AnalyticsEventProperties) => void;
beneficiariesUntrust: (properties?: AnalyticsEventProperties) => void;
sepaTransferList: (properties?: AnalyticsEventProperties) => void;
sepaTransferGet: (properties?: AnalyticsEventProperties) => void;
sepaTransferCreate: (properties?: AnalyticsEventProperties) => void;
sepaTransferCancel: (properties?: AnalyticsEventProperties) => void;
sepaTransferCreationFlowLink: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkList: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkGet: (properties?: AnalyticsEventProperties) => void;
sepaTransferBulkCreate: (properties?: AnalyticsEventProperties) => void;
transactionsList: (properties?: AnalyticsEventProperties) => void;
transactionsGet: (properties?: AnalyticsEventProperties) => void;
organizationsList: (properties?: AnalyticsEventProperties) => void;
organizationsBankAccounts: (properties?: AnalyticsEventProperties) => void;
paymentLinksCreate: (properties?: AnalyticsEventProperties) => void;
paymentLinksRedirect: (properties?: AnalyticsEventProperties) => void;
authLinksRequest: (properties?: AnalyticsEventProperties) => void;

@@ -31,0 +47,0 @@ uiElementCreated: (uiElementType: string, properties?: AnalyticsEventProperties) => void;

@@ -1,1 +0,1 @@

{"version":3,"file":"analytics-tracker.d.ts","sourceRoot":"","sources":["../../../../src/common/analytics/analytics-tracker.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,wBAAwB,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;6BACO,wBAAwB;qCAIhB,wBAAwB;sCAIvB,wBAAwB;qCAIzB,wBAAwB;sCAIvB,wBAAwB;0CAIpB,wBAAwB;oCAI9B,wBAAwB;qCAIvB,wBAAwB;sCAIvB,wBAAwB;oCAI1B,wBAAwB;sCAKvC,MAAM,eACR,wBAAwB;CAOxC,CAAC"}
{"version":3,"file":"analytics-tracker.d.ts","sourceRoot":"","sources":["../../../../src/common/analytics/analytics-tracker.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,wBAAwB,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;6BACO,wBAAwB;4BAIzB,wBAAwB;8BAItB,wBAAwB;+BAIvB,wBAAwB;gCAIvB,wBAAwB;qCAInB,wBAAwB;oCAIzB,wBAAwB;oCAIxB,wBAAwB;uCAIrB,wBAAwB;sCAIzB,wBAAwB;wCAItB,wBAAwB;oCAI5B,wBAAwB;mCAIzB,wBAAwB;sCAIrB,wBAAwB;sCAIxB,wBAAwB;gDAId,wBAAwB;wCAIhC,wBAAwB;uCAIzB,wBAAwB;0CAIrB,wBAAwB;oCAI9B,wBAAwB;mCAIzB,wBAAwB;qCAItB,wBAAwB;6CAIhB,wBAAwB;sCAI/B,wBAAwB;wCAItB,wBAAwB;oCAI5B,wBAAwB;sCAKvC,MAAM,eACR,wBAAwB;CAOxC,CAAC"}

@@ -7,10 +7,26 @@ /**

readonly CARDS_LIST: "Cards List";
readonly CARDS_ORDER_VIRTUAL: "Cards Order Virtual";
readonly CARDS_ORDER_PHYSICAL: "Cards Order Physical";
readonly CARDS_GET: "Cards Get";
readonly CARDS_ORDER: "Cards Order Virtual";
readonly CARDS_UNLOCK: "Cards Unlock";
readonly CARDS_DISPLAY: "Cards Display";
readonly BENEFICIARIES_LIST: "Beneficiaries List";
readonly BENEFICIARIES_GET: "Beneficiaries Get";
readonly BENEFICIARIES_ADD: "Beneficiaries Add";
readonly BENEFICIARIES_UPDATE: "Beneficiaries Update";
readonly BENEFICIARIES_TRUST: "Beneficiaries Trust";
readonly BENEFICIARIES_UNTRUST: "Beneficiaries Untrust";
readonly SEPA_TRANSFER_LIST: "SEPA Transfer List";
readonly SEPA_TRANSFER_GET: "SEPA Transfer Get";
readonly SEPA_TRANSFER_CREATE: "SEPA Transfer Create";
readonly SEPA_TRANSFER_CANCEL: "SEPA Transfer Cancel";
readonly SEPA_TRANSFER_CREATION_FLOW_LINK: "SEPA Transfer Creation Flow Link";
readonly SEPA_TRANSFER_BULK_LIST: "SEPA Transfer Bulk List";
readonly SEPA_TRANSFER_BULK_GET: "SEPA Transfer Bulk Get";
readonly SEPA_TRANSFER_BULK_CREATE: "SEPA Transfer Bulk Create";
readonly TRANSACTIONS_LIST: "Transactions List";
readonly TRANSACTIONS_GET: "Transactions Get";
readonly ORGANIZATIONS_LIST: "Organizations List";
readonly ORGANIZATIONS_BANK_ACCOUNTS: "Organizations Bank Accounts";
readonly PAYMENT_LINKS_CREATE: "Payment Links Create";
readonly PAYMENT_LINKS_REDIRECT: "Payment Links Redirect";
readonly AUTH_LINKS_REQUEST: "Auth Links Request";

@@ -17,0 +33,0 @@ readonly UI_ELEMENT_CREATED: "UI Element Created";

@@ -1,1 +0,1 @@

{"version":3,"file":"analytics.constants.d.ts","sourceRoot":"","sources":["../../../../src/common/analytics/analytics.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAanB,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD"}
{"version":3,"file":"analytics.constants.d.ts","sourceRoot":"","sources":["../../../../src/common/analytics/analytics.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BnB,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD"}
import type { AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, Beneficiary, Card, CardOrderSettings, CreatePaymentLinkSettings, Item, PaymentLinkParams, PhysicalCardOrderSettings, PostAuthAction, SepaTransfer, Transaction, VirtualCardOrderSettings } from '@types';
import { authLinks } from '@auth-links/index.server.ts';
import { beneficiaries } from '@beneficiaries/index.server.ts';
import { cards } from '@cards/index.server.ts';
import { organizations } from '@organizations/index.server.ts';
import { paymentLinks } from '@payment-links/index.server.ts';
import { sepaTransfers } from '@sepa-transfers/index.server';
export { sepaTransfers };
import { transactions } from '@transactions/index.server.ts';
export { authLinks, beneficiaries, cards, organizations, paymentLinks, sepaTransfers, transactions, };
export type { Card, VirtualCardOrderSettings, PhysicalCardOrderSettings, CardOrderSettings, Beneficiary, SepaTransfer, Transaction, Item, CreatePaymentLinkSettings, PaymentLinkParams, AuthLinkRequestParams, AuthLinkRequestResult, AuthLinkRequestSettings, PostAuthAction, };
//# sourceMappingURL=index.server.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,wBAAwB,EACzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,wBAAwB,EACzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,GACb,CAAC;AACF,YAAY,EACV,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,GACf,CAAC"}

@@ -1,1 +0,1 @@

{"version":3,"file":"organizations.client.d.ts","sourceRoot":"","sources":["../../../../src/organizations/client/organizations.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAUnD,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,YAAY,CAkBvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,WAAW,EAAE,CAgBxB,CAAC"}
{"version":3,"file":"organizations.client.d.ts","sourceRoot":"","sources":["../../../../src/organizations/client/organizations.client.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAUnD,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,YAAY,CAmBvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,GAAU,wBAEnC;IACD,iBAAiB,EAAE,uBAAuB,CAAC;CAC5C,KAAG,OAAO,CAAC,WAAW,EAAE,CAiBxB,CAAC"}

@@ -26,6 +26,6 @@ /**

operationSettings: import("@validation/operation-settings-validation").ClientOperationSettings;
}) => Promise<import(".").Organization>;
}) => Promise<import("./index.server").Organization>;
getBankAccounts: ({ operationSettings, }: {
operationSettings: import("@validation/operation-settings-validation").ClientOperationSettings;
}) => Promise<import(".").BankAccount[]>;
}) => Promise<import("./index.server").BankAccount[]>;
};

@@ -32,0 +32,0 @@ export type * from './shared/organizations.types';

@@ -25,6 +25,6 @@ /**

operationSettings?: import("@validation/operation-settings-validation").ServerOperationSettings;
}) => Promise<import(".").Organization>;
}) => Promise<import("./index.server").Organization>;
getBankAccounts: ({ operationSettings, }?: {
operationSettings?: import("@validation/operation-settings-validation").ServerOperationSettings;
}) => Promise<import(".").BankAccount[]>;
}) => Promise<import("./index.server").BankAccount[]>;
};

@@ -31,0 +31,0 @@ export type * from './shared/organizations.types';

@@ -1,1 +0,1 @@

{"version":3,"file":"payment-links.client.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/client/payment-links.client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CA6BjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,IAAI,CAMf,CAAC"}
{"version":3,"file":"payment-links.client.d.ts","sourceRoot":"","sources":["../../../../src/payment-links/client/payment-links.client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAMvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,6BAA6B,GAAU,6CAGjD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,MAAM,CA8BjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAAU,6CAGrD,iBAAiB,CAClB,yBAAyB,EACzB,uBAAuB,CACxB,KAAG,OAAO,CAAC,IAAI,CAOf,CAAC"}

@@ -29,4 +29,4 @@ /**

export declare const paymentLinks: {
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<string>;
redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<void>;
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<string>;
redirectToPaymentLinkCreationFlow: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ClientOperationSettings>) => Promise<void>;
};

@@ -33,0 +33,0 @@ export type * from './shared/payment-links.types';

@@ -31,3 +31,3 @@ /**

export declare const paymentLinks: {
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import(".").PaymentLinkParams<import(".").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ServerOperationSettings>) => Promise<string>;
getPaymentLinkCreationFlowUrl: ({ paymentLinkSettings, operationSettings, }: import("./index.server").PaymentLinkParams<import("./index.server").CreatePaymentLinkSettings, import("@validation/operation-settings-validation").ServerOperationSettings>) => Promise<string>;
};

@@ -34,0 +34,0 @@ export type * from './shared/payment-links.types';

@@ -1,1 +0,1 @@

{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAiBzF,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAEhC,MAAM,gCAAgC,CAAC;AAMxC;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBnE;AAwBD;;GAEG;AACH,UAAU,8BAA8B;IACtC,oBAAoB,EAAE,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,8BAA8B,GAAG,cAAc,CAChD,+BAA+B,EAAE,EACjC,0BAA0B,GAAG,SAAS,CACvC,CAoEA"}
{"version":3,"file":"bulk-transfers.client.d.ts","sourceRoot":"","sources":["../../../../../src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAiBzF,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAEhC,MAAM,gCAAgC,CAAC;AAMxC;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAuBnE;AAwBD;;GAEG;AACH,UAAU,8BAA8B;IACtC,oBAAoB,EAAE,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IAC3E,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;GASG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,8BAA8B,GAAG,cAAc,CAChD,+BAA+B,EAAE,EACjC,0BAA0B,GAAG,SAAS,CACvC,CAqEA"}

@@ -1,1 +0,1 @@

{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAajF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAkCnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAsBnE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CACzB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAChB,qBAAqB,EACrB,0BAA0B,GAAG,SAAS,CACvC,CAsIA;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBpE;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA2B5F"}
{"version":3,"file":"sepa-transfers.client.d.ts","sourceRoot":"","sources":["../../../../src/sepa-transfers/client/sepa-transfers.client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAcjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAuBzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,eAAe,EAEf,YAAY,EACZ,+BAA+B,EAI/B,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAexC,OAAO,+DAA+D,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,sBAAsB,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvD,OAAO,CAAC,wBAAwB,CAAC,CAmCnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,EACpC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAuBnE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAuB,kBAAkB,CAAC,EACxC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CACzB,eAAe,GAAG,4BAA4B,CAC/C,GAAG,cAAc,CAChB,qBAAqB,EACrB,0BAA0B,GAAG,SAAS,CACvC,CAuIA;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpE;AA6BD;;;;;;;;;;;;GAYG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,wBAAwB,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4B5F"}

@@ -1,1 +0,1 @@

import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{callProxyFunction as t}from"../common/common.utils.js";import{validateOperationSettingsParams as a}from"../validation/operation-settings-validation.js";import{requestAuthLink as i,prepareAuthLinkRequest as n}from"./shared/auth-links.api.js";import{serializeAuthLink as r}from"./shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as s}from"./shared/auth-links.validate.js";async function c({requestSettings:c,operationSettings:e}){s(c);const{proxyRequestFunction:l,proxyEndpointDescriptor:m,stagingToken:p}=a(e||{});if(l||m){const o=n({stagingToken:p,action:c.action,callbackUrl:c.callbackUrl}),a=await t({proxyFunction:l,proxyEndpointDescriptor:m,networkCallDescriptor:o});return r(a.body)}{const t=e?.accessToken||o(),a=await i({accessToken:t,stagingToken:p,action:c.action,callbackUrl:c.callbackUrl});return r(a)}}export{c as request};
import"../common/auth/auth.js";import{validatePresenceOfAuthToken as o}from"../common/auth/auth.validate.js";import{callProxyFunction as t}from"../common/common.utils.js";import{validateOperationSettingsParams as a}from"../validation/operation-settings-validation.js";import{prepareAuthLinkRequest as i,requestAuthLink as n}from"./shared/auth-links.api.js";import{serializeAuthLink as r}from"./shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as s}from"./shared/auth-links.validate.js";async function c({requestSettings:c,operationSettings:e}){s(c);const{proxyRequestFunction:l,proxyEndpointDescriptor:m,stagingToken:p}=a(e||{});if(l||m){const o=i({stagingToken:p,action:c.action,callbackUrl:c.callbackUrl}),a=await t({proxyFunction:l,proxyEndpointDescriptor:m,networkCallDescriptor:o});return r(a.body)}{const t=e?.accessToken||o(),a=await n({accessToken:t,stagingToken:p,action:c.action,callbackUrl:c.callbackUrl});return r(a)}}export{c as request};

@@ -1,1 +0,1 @@

import{makeNetworkCall as e}from"../../common/network/network.js";function n({beneficiaryId:e,accessToken:n,stagingToken:o}){return{path:`/v2/sepa/beneficiaries/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:o}}}}async function o({accessToken:o,stagingToken:i,beneficiaryId:a}){const s=n({beneficiaryId:a,accessToken:o,stagingToken:i}),{beneficiary:c}=await e(s);return c}export{o as getBeneficiary,n as prepareGetBeneficiaryCall};
import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";import{serializeToNewBeneficiaryDataObject as i}from"./beneficiaries.serializer.js";import a from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";const s="/v2/sepa/beneficiaries";function o({paginationSettings:n,accessToken:i,stagingToken:a}){const o={method:"GET",headers:{accessToken:i,stagingToken:a}},t=e(n),c=t.size?`?${t.toString()}`:"";return{path:`${s}${c}`,options:o}}async function t({paginationSettings:e,accessToken:i,stagingToken:a}){const s=o({paginationSettings:e,accessToken:i,stagingToken:a}),{beneficiaries:t,meta:c}=await n(s);return{beneficiaries:t,meta:c}}function c({beneficiaryId:e,accessToken:n,stagingToken:i}){return{path:`${s}/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:i}}}}async function r({accessToken:e,stagingToken:i,beneficiaryId:a}){const s=c({beneficiaryId:a,accessToken:e,stagingToken:i}),{beneficiary:o}=await n(s);return o}function g({beneficiary:e,accessToken:n,stagingToken:o,idempotencyKey:t=a()}){return{path:s,options:{method:"POST",headers:{accessToken:n,stagingToken:o,idempotencyKey:t},body:{beneficiary:i(e)}}}}async function T({beneficiary:e,accessToken:i,stagingToken:s,idempotencyKey:o=a()}){const t=g({beneficiary:e,accessToken:i,stagingToken:s,idempotencyKey:o}),{beneficiary:c}=await n(t);return c}function f({beneficiaryIds:e,accessToken:n,stagingToken:i}){return{path:`${s}/untrust`,options:{method:"PATCH",headers:{accessToken:n,stagingToken:i},body:{ids:e}}}}async function y({beneficiaryIds:e,accessToken:i,stagingToken:a}){const s=f({beneficiaryIds:e,accessToken:i,stagingToken:a}),{beneficiaries:o}=await n(s);return o}function d({beneficiaryParamsBeingEdited:e,accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:o}){const{name:t,email:c,activityTag:r}=e,g={method:"PATCH",headers:{accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:o},body:{beneficiary:{name:t,email:c,activity_tag:r}}};return{path:`${s}/${e.id}`,options:g}}async function k({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:s,mfaPreference:o}){const t=d({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:s,mfaPreference:o}),{beneficiary:c}=await n(t);return c}export{T as addBeneficiary,t as getBeneficiaries,r as getBeneficiary,g as prepareAddBeneficiaryCall,o as prepareGetBeneficiariesCall,c as prepareGetBeneficiaryCall,f as prepareUntrustBeneficiaryCall,d as prepareUpdateBeneficiaryCall,y as untrustBeneficiaries,k as updateBeneficiary};

@@ -1,1 +0,1 @@

function t(t){return{id:t.id,name:t.name,email:t.email,activityTag:t.activity_tag,iban:t.iban,bic:t.bic,currency:t.currency,status:t.status,trusted:t.trusted,createdAt:new Date(t.created_at),updatedAt:new Date(t.updated_at)}}export{t as serializeBeneficiary};
function t(t){return{id:t.id,name:t.name,email:t.email,activityTag:t.activity_tag,iban:t.iban,bic:t.bic,currency:t.currency,status:t.status,trusted:t.trusted,createdAt:new Date(t.created_at),updatedAt:new Date(t.updated_at)}}function a(t){return{name:t.name,...t.email&&{email:t.email},...t.activityTag&&{activity_tag:t.activityTag},iban:t.iban,...t.bic&&{bic:t.bic}}}export{t as serializeBeneficiary,a as serializeToNewBeneficiaryDataObject};

@@ -1,1 +0,1 @@

import{InvalidParametersError as r}from"../../errors/InvalidParametersError.js";function e(e){if(!e)throw new r("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new r("beneficiaryId must be a string");return e}export{e as validateGetBeneficiaryParams};
import{validateExpectedStringValues as e,validatePresenceOfRequiredParams as i}from"../../validation/input-param-validation.js";import{InvalidParametersError as t}from"../../errors/InvalidParametersError.js";const r=[{name:"name"},{name:"iban"}];function n(e){if(!e)throw new t("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new t("beneficiaryId must be a string");return e}function a(n){if(!n)throw new t("beneficiary parameter is required for the called function");if("object"!=typeof n)throw new t("beneficiary must be an object");i(n,r);const a=e({name:n.name,iban:n.iban,email:n.email,activityTag:n.activityTag,bic:n.bic});if(a.length>0)throw new t(a);return n}function o(i){const{id:r,name:n,email:a,activityTag:o}=i||{};if(!r)throw new t("Invalid parameters were passed to the function:\nA beneficiary ID is required for the called function");if(!n&&!a&&!o)throw new t("Invalid parameters were passed to the function:\nAt least one of the following properties must be provided: name, email, activityTag");const f=e({name:n,email:a,activityTag:o});if(f.length>0)throw new t(f);return{id:r,name:n,email:a,activityTag:o}}function f(e){if(!e)throw new t("beneficiaryIds parameter is required for the called function");if(!Array.isArray(e)||!e.every((e=>"string"==typeof e)))throw new t("beneficiaryIds must be an array of strings");return e}export{a as validateAddBeneficiaryParams,n as validateGetBeneficiaryParams,f as validateTrustBeneficiariesParams,o as validateUpdateBeneficiaryParams};

@@ -1,1 +0,1 @@

export{sepaTransfers}from"./sepa-transfers/index.server.js";
export{authLinks}from"./auth-links/index.server.js";export{beneficiaries}from"./beneficiaries/index.server.js";export{cards}from"./cards/index.server.js";export{organizations}from"./organizations/index.server.js";export{paymentLinks}from"./payment-links/index.server.js";export{sepaTransfers}from"./sepa-transfers/index.server.js";export{transactions}from"./transactions/index.server.js";

@@ -1,1 +0,1 @@

{"version":3,"file":"transactions.client.d.ts","sourceRoot":"","sources":["../../../../src/transactions/client/transactions.client.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAOnD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GACjE,OAAO,CAAC,uBAAuB,CAAC,CA6BlC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAwBlE"}
{"version":3,"file":"transactions.client.d.ts","sourceRoot":"","sources":["../../../../src/transactions/client/transactions.client.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAOnD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GACjE,OAAO,CAAC,uBAAuB,CAAC,CA8BlC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBlE"}

@@ -1,1 +0,1 @@

import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as e}from"../../validation/operation-settings-validation.js";import{prepareAuthLinkRequest as r}from"../shared/auth-links.api.js";import{serializeAuthLink as t}from"../shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as i}from"../shared/auth-links.validate.js";async function n({requestSettings:n,operationSettings:s}){i(n);const{proxyRequestFunction:a,proxyEndpointDescriptor:p,stagingToken:c}=e(s,'Client-side auth-links operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/auth-links/server" only in server-side/backend environments.'),l=r({stagingToken:c,action:n.action,callbackUrl:n.callbackUrl}),m=await o({proxyFunction:a,proxyEndpointDescriptor:p,networkCallDescriptor:l});return t(m.body)}export{n as request};
import{tracker as o}from"../../common/analytics/analytics-tracker.js";import{callProxyFunction as t}from"../../common/common.utils.js";import{validateClientOperationSettings as r}from"../../validation/operation-settings-validation.js";import{prepareAuthLinkRequest as e}from"../shared/auth-links.api.js";import{serializeAuthLink as i}from"../shared/auth-links.serializer.js";import{validateAuthLinkRequestSettings as n}from"../shared/auth-links.validate.js";async function s({requestSettings:s,operationSettings:a}){o.authLinksRequest(),n(s);const{proxyRequestFunction:c,proxyEndpointDescriptor:p,stagingToken:l}=r(a,'Client-side auth-links operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/auth-links/server" only in server-side/backend environments.'),m=e({stagingToken:l,action:s.action,callbackUrl:s.callbackUrl}),u=await t({proxyFunction:c,proxyEndpointDescriptor:p,networkCallDescriptor:m});return i(u.body)}export{s as request};

@@ -1,1 +0,1 @@

import{serializePaginationResponse as e}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as i}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{ACTIONS as r}from"../../common/constants.js";import{buildRequestHeaders as o}from"../../common/network/network.js";import{validateClientOperationSettings as t,validateOperationSettingsParams as s}from"../../validation/operation-settings-validation.js";import{buildIframeUrl as a,createIframe as c}from"../../iframe/iframe-manager.js";import{prepareUntrustBeneficiaryCall as p,prepareUpdateBeneficiaryCall as y,prepareAddBeneficiaryCall as d,prepareGetBeneficiaryCall as m,prepareGetBeneficiariesCall as b}from"../shared/beneficiaries.api.js";import{serializeBeneficiary as f}from"../shared/beneficiaries.serializer.js";import{validateTrustBeneficiariesParams as u,validateUpdateBeneficiaryParams as x,validateAddBeneficiaryParams as l,validateGetBeneficiaryParams as k}from"../shared/beneficiaries.validate.js";async function v(i){const{proxyRequestFunction:r,proxyEndpointDescriptor:o,paginationSettings:s}=t(i?.operationSettings,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=b({paginationSettings:s}),c=await n({proxyFunction:r,proxyEndpointDescriptor:o,networkCallDescriptor:a}),p=c.body.beneficiaries.map((e=>f(e))),y=e(c.body.meta);return{beneficiaries:p,...y?{meta:y}:{}}}async function g({beneficiarySettings:e,operationSettings:i}){const r=k(e?.beneficiaryId),{proxyRequestFunction:o,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=m({beneficiaryId:r}),c=await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:a});return f(c.body.beneficiary)}async function q({beneficiarySettings:e,operationSettings:i}){const r=l(e),{proxyRequestFunction:s,proxyEndpointDescriptor:a,idempotencyKey:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),p=d({beneficiary:r,idempotencyKey:c});p.options.headers=o({...p.options.headers});const y=await n({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return f(y.body.beneficiary)}async function D({beneficiarySettings:e,operationSettings:i}){const r=x(e),{proxyRequestFunction:o,proxyEndpointDescriptor:s,idempotencyKey:a,mfaPreference:c}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),p=y({beneficiaryParamsBeingEdited:r,idempotencyKey:a,mfaPreference:c}),d=await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:p});return f(d.body.beneficiary)}async function E({beneficiarySettings:e,operationSettings:n}){const{accessToken:o,uiParentElementId:t,debugMode:p}=s(n,{requiresUI:!0}),y=o||i(),d=u(e?.beneficiaryIds),m=a({accessToken:y,debugMode:p}),b=await c({parentElementId:t,iframeUrl:m});return(await b.postMessage({actionId:r.BENEFICIARIES_TRUST,actionData:{body:{beneficiaryIds:d}}})).beneficiaries}async function F({beneficiarySettings:e,operationSettings:i}){const r=u(e?.beneficiaryIds),{proxyRequestFunction:o,proxyEndpointDescriptor:s}=t(i,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),a=p({beneficiaryIds:r});return(await n({proxyFunction:o,proxyEndpointDescriptor:s,networkCallDescriptor:a})).body.beneficiaries.map(f)}export{q as addBeneficiary,v as getBeneficiaries,g as getBeneficiary,E as trustBeneficiaries,F as untrustBeneficiaries,D as updateBeneficiary};
import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as i}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../../common/auth/auth.validate.js";import{callProxyFunction as r}from"../../common/common.utils.js";import{ACTIONS as o}from"../../common/constants.js";import{buildRequestHeaders as t}from"../../common/network/network.js";import{validateClientOperationSettings as s,validateOperationSettingsParams as a}from"../../validation/operation-settings-validation.js";import{buildIframeUrl as c,createIframe as p}from"../../iframe/iframe-manager.js";import{prepareUntrustBeneficiaryCall as y,prepareUpdateBeneficiaryCall as d,prepareAddBeneficiaryCall as m,prepareGetBeneficiaryCall as b,prepareGetBeneficiariesCall as f}from"../shared/beneficiaries.api.js";import{serializeBeneficiary as u}from"../shared/beneficiaries.serializer.js";import{validateTrustBeneficiariesParams as x,validateUpdateBeneficiaryParams as l,validateAddBeneficiaryParams as k,validateGetBeneficiaryParams as v}from"../shared/beneficiaries.validate.js";async function g(n){e.beneficiariesList();const{proxyRequestFunction:o,proxyEndpointDescriptor:t,paginationSettings:a}=s(n?.operationSettings,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),c=f({paginationSettings:a}),p=await r({proxyFunction:o,proxyEndpointDescriptor:t,networkCallDescriptor:c}),y=p.body.beneficiaries.map((e=>u(e))),d=i(p.body.meta);return{beneficiaries:y,...d?{meta:d}:{}}}async function q({beneficiarySettings:i,operationSettings:n}){e.beneficiariesGet();const o=v(i?.beneficiaryId),{proxyRequestFunction:t,proxyEndpointDescriptor:a}=s(n,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),c=b({beneficiaryId:o}),p=await r({proxyFunction:t,proxyEndpointDescriptor:a,networkCallDescriptor:c});return u(p.body.beneficiary)}async function D({beneficiarySettings:i,operationSettings:n}){e.beneficiariesAdd();const o=k(i),{proxyRequestFunction:a,proxyEndpointDescriptor:c,idempotencyKey:p}=s(n,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),y=m({beneficiary:o,idempotencyKey:p});y.options.headers=t({...y.options.headers});const d=await r({proxyFunction:a,proxyEndpointDescriptor:c,networkCallDescriptor:y});return u(d.body.beneficiary)}async function E({beneficiarySettings:i,operationSettings:n}){e.beneficiariesUpdate();const o=l(i),{proxyRequestFunction:t,proxyEndpointDescriptor:a,idempotencyKey:c,mfaPreference:p}=s(n,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),y=d({beneficiaryParamsBeingEdited:o,idempotencyKey:c,mfaPreference:p}),m=await r({proxyFunction:t,proxyEndpointDescriptor:a,networkCallDescriptor:y});return u(m.body.beneficiary)}async function F({beneficiarySettings:i,operationSettings:r}){e.beneficiariesTrust();const{accessToken:t,uiParentElementId:s,debugMode:y}=a(r,{requiresUI:!0}),d=t||n(),m=x(i?.beneficiaryIds),b=c({accessToken:d,debugMode:y}),f=await p({parentElementId:s,iframeUrl:b});return(await f.postMessage({actionId:o.BENEFICIARIES_TRUST,actionData:{body:{beneficiaryIds:m}}})).beneficiaries}async function h({beneficiarySettings:i,operationSettings:n}){e.beneficiariesUntrust();const o=x(i?.beneficiaryIds),{proxyRequestFunction:t,proxyEndpointDescriptor:a}=s(n,'Client-side beneficiary operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/beneficiaries/server" only in server-side/backend environments.'),c=y({beneficiaryIds:o});return(await r({proxyFunction:t,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.beneficiaries.map(u)}export{D as addBeneficiary,g as getBeneficiaries,q as getBeneficiary,F as trustBeneficiaries,h as untrustBeneficiaries,E as updateBeneficiary};

@@ -1,1 +0,1 @@

import{VIRTUAL_CARD_LEVEL as e}from"../shared/cards.constants.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{authManager as t}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as n}from"../../common/auth/auth.validate.js";import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as s}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as a,createIframe as d}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as c,prepareGetCardCall as p,prepareGetCardsCall as m}from"../shared/cards.api.js";import{createEmbedUI as g}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as u,serializeCard as l,serializeOrderCardPayload as y}from"../shared/cards.serializer.js";import{validateDisplayCardParams as f,validateUnlockCardParams as h,validateOrderCardParams as k,validateGetCardParams as w}from"../shared/cards.validate.js";async function b(e){r.cardsList();const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new s("membershipId must be a string");const{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(e?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=m({membershipId:t,stagingToken:d});return(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>l(e)))}async function I({cardSettings:e,operationSettings:r}){w(e);const t=e.cardId,{proxyRequestFunction:n,proxyEndpointDescriptor:a,stagingToken:d}=i(r,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=p({cardId:t,stagingToken:d}),m=(await o({proxyFunction:n,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards;if(Array.isArray(m)&&m.length>0)return l(m[0]);throw new s("Unable to retrieve card data")}async function x(o){const i=n(),{uiParentElementId:c,debugMode:p}=o.operationSettings;if(!c)throw new s("uiParentElementId is required");k(o.cardSettings);const m=o.cardSettings.cardLevel===e.VIRTUAL,g=a({accessToken:i,stagingToken:t.getStagingToken()||void 0,debugMode:p}),u=await d({iframeUrl:g,parentElementId:c}),f=y(o.cardSettings),h=await u.postMessage(f);return u.destroy(),m?r.cardsOrderVirtual():r.cardsOrderPhysical(),l(h)}async function E(e){const r=n(),{uiParentElementId:o,debugMode:i}=e.operationSettings;if(!o)throw new s("uiParentElementId is required");h(e.cardSettings);const c=a({accessToken:r,stagingToken:t.getStagingToken()||void 0,debugMode:i}),p=await d({iframeUrl:c,parentElementId:o}),m=u(e),g=await p.postMessage(m);return p.destroy(),l(g)}async function S(e){const{uiParentElementId:r,accessToken:t,stagingToken:i,debugMode:a,mfaPreference:d,proxyRequestFunction:p,proxyEndpointDescriptor:m}=e.operationSettings;if(!r)throw new s("uiParentElementId is required");if(f(e.cardSettings),p||m){const t=c({stagingToken:i}),n=(await o({proxyFunction:p,proxyEndpointDescriptor:m,networkCallDescriptor:t})).body.embed_auth_link;return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:n.url})}{const o=t||n(),{getCardIframeURL:s}=await import("../shared/cards.api.js"),d=await s({...e.cardSettings,accessToken:o,stagingToken:i});return g({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:r,debugMode:a},cardIframeUrl:d.url})}}export{S as displayCard,I as getCard,b as getCards,x as orderCard,E as unlockCard};
import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{authManager as r}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{validateClientOperationSettings as o}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as i}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as s,createIframe as a}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as d,prepareGetCardCall as c,prepareGetCardsCall as p}from"../shared/cards.api.js";import{createEmbedUI as m}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as g,serializeCard as u,serializeOrderCardPayload as l}from"../shared/cards.serializer.js";import{validateDisplayCardParams as y,validateUnlockCardParams as f,validateOrderCardParams as k,validateGetCardParams as h}from"../shared/cards.validate.js";async function w(r){e.cardsList();const t=r?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new i("membershipId must be a string");const{proxyRequestFunction:s,proxyEndpointDescriptor:a,stagingToken:d}=o(r?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=p({membershipId:t,stagingToken:d});return(await n({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>u(e)))}async function b({cardSettings:r,operationSettings:t}){e.cardsGet(),h(r);const s=r.cardId,{proxyRequestFunction:a,proxyEndpointDescriptor:d,stagingToken:p}=o(t,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),m=c({cardId:s,stagingToken:p}),g=(await n({proxyFunction:a,proxyEndpointDescriptor:d,networkCallDescriptor:m})).body.cards;if(Array.isArray(g)&&g.length>0)return u(g[0]);throw new i("Unable to retrieve card data")}async function x(n){e.cardsOrder();const o=t(),{uiParentElementId:d,debugMode:c}=n.operationSettings;if(!d)throw new i("uiParentElementId is required");k(n.cardSettings);const p=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await a({iframeUrl:p,parentElementId:d}),g=l(n.cardSettings),y=await m.postMessage(g);return m.destroy(),u(y)}async function E(n){e.cardsUnlock();const o=t(),{uiParentElementId:d,debugMode:c}=n.operationSettings;if(!d)throw new i("uiParentElementId is required");f(n.cardSettings);const p=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await a({iframeUrl:p,parentElementId:d}),l=g(n),y=await m.postMessage(l);return m.destroy(),u(y)}async function I(r){e.cardsDisplay();const{uiParentElementId:o,accessToken:s,stagingToken:a,debugMode:c,mfaPreference:p,proxyRequestFunction:g,proxyEndpointDescriptor:u}=r.operationSettings;if(!o)throw new i("uiParentElementId is required");if(y(r.cardSettings),g||u){const e=d({stagingToken:a}),t=(await n({proxyFunction:g,proxyEndpointDescriptor:u,networkCallDescriptor:e})).body.embed_auth_link;return m({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c},cardIframeUrl:t.url})}{const e=s||t(),{getCardIframeURL:n}=await import("../shared/cards.api.js"),i=await n({...r.cardSettings,accessToken:e,stagingToken:a});return m({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c},cardIframeUrl:i.url})}}export{I as displayCard,b as getCard,w as getCards,x as orderCard,E as unlockCard};

@@ -1,1 +0,1 @@

import{amplitudeManager as e}from"./amplitude-manager.js";import{ANALYTICS_EVENTS as t}from"./analytics.constants.js";function a(){e.initialize()}function i(){e.reset()}function r(t,a){e.track(t,a)}const s={cardsList:e=>{r(t.CARDS_LIST,e)},cardsOrderVirtual:e=>{r(t.CARDS_ORDER_VIRTUAL,e)},cardsOrderPhysical:e=>{r(t.CARDS_ORDER_PHYSICAL,e)},beneficiariesList:e=>{r(t.BENEFICIARIES_LIST,e)},sepaTransferCreate:e=>{r(t.SEPA_TRANSFER_CREATE,e)},sepaTransferBulkCreate:e=>{r(t.SEPA_TRANSFER_BULK_CREATE,e)},transactionsList:e=>{r(t.TRANSACTIONS_LIST,e)},organizationsList:e=>{r(t.ORGANIZATIONS_LIST,e)},paymentLinksCreate:e=>{r(t.PAYMENT_LINKS_CREATE,e)},authLinksRequest:e=>{r(t.AUTH_LINKS_REQUEST,e)},uiElementCreated:(e,a)=>{r(t.UI_ELEMENT_CREATED,{uiElementType:e,...a})}};export{a as initialize,i as reset,r as trackEvent,s as tracker};
import{amplitudeManager as e}from"./amplitude-manager.js";import{ANALYTICS_EVENTS as E}from"./analytics.constants.js";function a(){e.initialize()}function s(){e.reset()}function T(E,a){e.track(E,a)}const A={cardsList:e=>{T(E.CARDS_LIST,e)},cardsGet:e=>{T(E.CARDS_GET,e)},cardsOrder:e=>{T(E.CARDS_ORDER,e)},cardsUnlock:e=>{T(E.CARDS_UNLOCK,e)},cardsDisplay:e=>{T(E.CARDS_DISPLAY,e)},beneficiariesList:e=>{T(E.BENEFICIARIES_LIST,e)},beneficiariesGet:e=>{T(E.BENEFICIARIES_GET,e)},beneficiariesAdd:e=>{T(E.BENEFICIARIES_ADD,e)},beneficiariesUpdate:e=>{T(E.BENEFICIARIES_UPDATE,e)},beneficiariesTrust:e=>{T(E.BENEFICIARIES_TRUST,e)},beneficiariesUntrust:e=>{T(E.BENEFICIARIES_UNTRUST,e)},sepaTransferList:e=>{T(E.SEPA_TRANSFER_LIST,e)},sepaTransferGet:e=>{T(E.SEPA_TRANSFER_GET,e)},sepaTransferCreate:e=>{T(E.SEPA_TRANSFER_CREATE,e)},sepaTransferCancel:e=>{T(E.SEPA_TRANSFER_CANCEL,e)},sepaTransferCreationFlowLink:e=>{T(E.SEPA_TRANSFER_CREATION_FLOW_LINK,e)},sepaTransferBulkList:e=>{T(E.SEPA_TRANSFER_BULK_LIST,e)},sepaTransferBulkGet:e=>{T(E.SEPA_TRANSFER_BULK_GET,e)},sepaTransferBulkCreate:e=>{T(E.SEPA_TRANSFER_BULK_CREATE,e)},transactionsList:e=>{T(E.TRANSACTIONS_LIST,e)},transactionsGet:e=>{T(E.TRANSACTIONS_GET,e)},organizationsList:e=>{T(E.ORGANIZATIONS_LIST,e)},organizationsBankAccounts:e=>{T(E.ORGANIZATIONS_BANK_ACCOUNTS,e)},paymentLinksCreate:e=>{T(E.PAYMENT_LINKS_CREATE,e)},paymentLinksRedirect:e=>{T(E.PAYMENT_LINKS_REDIRECT,e)},authLinksRequest:e=>{T(E.AUTH_LINKS_REQUEST,e)},uiElementCreated:(e,a)=>{T(E.UI_ELEMENT_CREATED,{uiElementType:e,...a})}};export{a as initialize,s as reset,T as trackEvent,A as tracker};

@@ -1,1 +0,1 @@

const E={SDK_INITIALIZED:"SDK Initialized",CARDS_LIST:"Cards List",CARDS_ORDER_VIRTUAL:"Cards Order Virtual",CARDS_ORDER_PHYSICAL:"Cards Order Physical",BENEFICIARIES_LIST:"Beneficiaries List",SEPA_TRANSFER_CREATE:"SEPA Transfer Create",SEPA_TRANSFER_BULK_CREATE:"SEPA Transfer Bulk Create",TRANSACTIONS_LIST:"Transactions List",ORGANIZATIONS_LIST:"Organizations List",PAYMENT_LINKS_CREATE:"Payment Links Create",AUTH_LINKS_REQUEST:"Auth Links Request",UI_ELEMENT_CREATED:"UI Element Created"};export{E as ANALYTICS_EVENTS};
const E={SDK_INITIALIZED:"SDK Initialized",CARDS_LIST:"Cards List",CARDS_GET:"Cards Get",CARDS_ORDER:"Cards Order Virtual",CARDS_UNLOCK:"Cards Unlock",CARDS_DISPLAY:"Cards Display",BENEFICIARIES_LIST:"Beneficiaries List",BENEFICIARIES_GET:"Beneficiaries Get",BENEFICIARIES_ADD:"Beneficiaries Add",BENEFICIARIES_UPDATE:"Beneficiaries Update",BENEFICIARIES_TRUST:"Beneficiaries Trust",BENEFICIARIES_UNTRUST:"Beneficiaries Untrust",SEPA_TRANSFER_LIST:"SEPA Transfer List",SEPA_TRANSFER_GET:"SEPA Transfer Get",SEPA_TRANSFER_CREATE:"SEPA Transfer Create",SEPA_TRANSFER_CANCEL:"SEPA Transfer Cancel",SEPA_TRANSFER_CREATION_FLOW_LINK:"SEPA Transfer Creation Flow Link",SEPA_TRANSFER_BULK_LIST:"SEPA Transfer Bulk List",SEPA_TRANSFER_BULK_GET:"SEPA Transfer Bulk Get",SEPA_TRANSFER_BULK_CREATE:"SEPA Transfer Bulk Create",TRANSACTIONS_LIST:"Transactions List",TRANSACTIONS_GET:"Transactions Get",ORGANIZATIONS_LIST:"Organizations List",ORGANIZATIONS_BANK_ACCOUNTS:"Organizations Bank Accounts",PAYMENT_LINKS_CREATE:"Payment Links Create",PAYMENT_LINKS_REDIRECT:"Payment Links Redirect",AUTH_LINKS_REQUEST:"Auth Links Request",UI_ELEMENT_CREATED:"UI Element Created"};export{E as ANALYTICS_EVENTS};

@@ -1,1 +0,1 @@

import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as n}from"../../validation/operation-settings-validation.js";import{prepareGetBankAccounts as t,prepareGetOrganization as r}from"../shared/organizations.api.js";import{serializeBankAccount as i,serializeOrganization as e}from"../shared/organizations.serializer.js";const s=async({operationSettings:t})=>{const{stagingToken:i,proxyRequestFunction:s,proxyEndpointDescriptor:a}=n(t,"Client-side organizations operations require either proxyEndpointDescriptor or proxyRequestFunction."),p=r({stagingToken:i}),c=await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return e(c.body.organization)},a=async({operationSettings:r})=>{const{stagingToken:e,proxyRequestFunction:s,proxyEndpointDescriptor:a}=n(r,"Client-side organizations operations require either proxyEndpointDescriptor or proxyRequestFunction."),p=t({stagingToken:e});return(await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p})).body.bank_accounts.map(i)};export{a as getBankAccounts,s as getOrganization};
import{tracker as o}from"../../common/analytics/analytics-tracker.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{validateClientOperationSettings as t}from"../../validation/operation-settings-validation.js";import{prepareGetBankAccounts as i,prepareGetOrganization as r}from"../shared/organizations.api.js";import{serializeBankAccount as e,serializeOrganization as s}from"../shared/organizations.serializer.js";const a=async({operationSettings:i})=>{o.organizationsList();const{stagingToken:e,proxyRequestFunction:a,proxyEndpointDescriptor:p}=t(i,"Client-side organizations operations require either proxyEndpointDescriptor or proxyRequestFunction."),c=r({stagingToken:e}),g=await n({proxyFunction:a,proxyEndpointDescriptor:p,networkCallDescriptor:c});return s(g.body.organization)},p=async({operationSettings:r})=>{o.organizationsBankAccounts();const{stagingToken:s,proxyRequestFunction:a,proxyEndpointDescriptor:p}=t(r,"Client-side organizations operations require either proxyEndpointDescriptor or proxyRequestFunction."),c=i({stagingToken:s});return(await n({proxyFunction:a,proxyEndpointDescriptor:p,networkCallDescriptor:c})).body.bank_accounts.map(e)};export{p as getBankAccounts,a as getOrganization};

@@ -1,1 +0,1 @@

import{authLinks as t}from"../../auth-links/index.js";import{AUTH_LINK_ACTIONS as e}from"../../common/constants.js";import{validateClientOperationSettings as n}from"../../validation/operation-settings-validation.js";import{validateItems as i,validatePaymentLinkCreationFlowParams as o}from"../shared/payment-links.validate.js";const s=async({paymentLinkSettings:s,operationSettings:r})=>{n(r,'Client-side payment link operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/payment-links/server" only in server-side/backend environments.');const{items:a}=s;i(a);const p=o(s),m=await t.request({requestSettings:{action:e.PAYMENT_LINK_CREATE,callbackUrl:p},operationSettings:r}),c=new URLSearchParams({...a?{items:JSON.stringify(a)}:{}});return c.toString()?`${m.url}?${c.toString()}`:m.url},r=async({paymentLinkSettings:t,operationSettings:e})=>{const n=await s({paymentLinkSettings:t,operationSettings:e});window.location.href=n};export{s as getPaymentLinkCreationFlowUrl,r as redirectToPaymentLinkCreationFlow};
import{authLinks as t}from"../../auth-links/index.js";import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{AUTH_LINK_ACTIONS as n}from"../../common/constants.js";import{validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{validateItems as o,validatePaymentLinkCreationFlowParams as r}from"../shared/payment-links.validate.js";const s=async({paymentLinkSettings:s,operationSettings:a})=>{e.paymentLinksCreate(),i(a,'Client-side payment link operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/payment-links/server" only in server-side/backend environments.');const{items:m}=s;o(m);const p=r(s),c=await t.request({requestSettings:{action:n.PAYMENT_LINK_CREATE,callbackUrl:p},operationSettings:a}),l=new URLSearchParams({...m?{items:JSON.stringify(m)}:{}});return l.toString()?`${c.url}?${l.toString()}`:c.url},a=async({paymentLinkSettings:t,operationSettings:n})=>{e.paymentLinksRedirect();const i=await s({paymentLinkSettings:t,operationSettings:n});window.location.href=i};export{s as getPaymentLinkCreationFlowUrl,a as redirectToPaymentLinkCreationFlow};

@@ -1,1 +0,1 @@

import{serializePaginationResponse as e}from"../../../common/api-pagination/api-pagination.js";import{authManager as r}from"../../../common/auth/auth.js";import{callProxyFunction as n}from"../../../common/common.utils.js";import{VOP_DECISIONS as o}from"../../../common/constants.js";import{isRunningInBrowser as t}from"../../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as s}from"../../../validation/operation-settings-validation.js";import{InvalidRuntimeError as i,RUNTIME_ENVIRONMENT as a}from"../../../errors/InvalidRuntimeError.js";import{prepareCreateBulkTransferCall as p,prepareGetBulkTransferCall as c,prepareGetBulkTransfersCall as u,prepareVerifySepaPayeesCall as m}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as d,serializeBulkTransfer as y}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as f,validateBulkTransferParams as l}from"../shared/bulk-transfers.validate.js";import b from"../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function k(r){const{proxyRequestFunction:o,proxyEndpointDescriptor:t,paginationSettings:i}=s(r?.operationSettings,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),a=u({paginationSettings:i}),p=await n({proxyFunction:o,proxyEndpointDescriptor:t,networkCallDescriptor:a}),c=p.body.bulk_transfers.map(y),m=e(p.body.meta);return{bulkTransfers:c,...m?{meta:m}:{}}}async function x({bulkTransferSettings:e,operationSettings:r}){const o=l(e?.bulkTransferId),{proxyRequestFunction:t,proxyEndpointDescriptor:i}=s(r,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),a=c({bulkTransferId:o}),p=await n({proxyFunction:t,proxyEndpointDescriptor:i,networkCallDescriptor:a});return y(p.body.bulk_transfer)}async function*v({bulkTransferSettings:e,operationSettings:c}){const{proxyRequestFunction:u,proxyEndpointDescriptor:l}=s(c,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.');if(!t())throw new i(a.BROWSER);const k=r.getStagingToken(),x=c?.idempotencyKey||b();f(e);const v=new Map;for(const r of e.bulkTransfers){const e=r.beneficiary.iban;e&&!v.has(e)&&v.set(e,{name:r.beneficiary.name,iban:e})}const g=Array.from(v.values()),w=await async function({sepaPayees:e,proxyRequestFunction:r,proxyEndpointDescriptor:o}){const t=m({sepaPayees:e});return(await n({proxyFunction:r,proxyEndpointDescriptor:o,networkCallDescriptor:t})).body}({sepaPayees:g,proxyRequestFunction:u,proxyEndpointDescriptor:l});if((yield w.requests.map(d))===o.REJECT)return;const D=p({bulkTransfers:e.bulkTransfers,bankAccountId:e.bankAccountId,stagingToken:k||void 0,idempotencyKey:x}),E=(await n({proxyFunction:u,proxyEndpointDescriptor:l,networkCallDescriptor:D})).body.bulk_transfer;return{bulkTransfer:y(E),meta:{idempotencyKey:x}}}export{v as createBulkTransfer,x as getBulkTransfer,k as getBulkTransfers};
import{tracker as e}from"../../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as r}from"../../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../../common/auth/auth.js";import{callProxyFunction as o}from"../../../common/common.utils.js";import{VOP_DECISIONS as t}from"../../../common/constants.js";import{isRunningInBrowser as s}from"../../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as i}from"../../../validation/operation-settings-validation.js";import{InvalidRuntimeError as a,RUNTIME_ENVIRONMENT as p}from"../../../errors/InvalidRuntimeError.js";import{prepareCreateBulkTransferCall as c,prepareGetBulkTransferCall as u,prepareGetBulkTransfersCall as m,prepareVerifySepaPayeesCall as d}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as y,serializeBulkTransfer as l}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as f,validateBulkTransferParams as b}from"../shared/bulk-transfers.validate.js";import k from"../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function x(n){e.sepaTransferBulkList();const{proxyRequestFunction:t,proxyEndpointDescriptor:s,paginationSettings:a}=i(n?.operationSettings,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=m({paginationSettings:a}),c=await o({proxyFunction:t,proxyEndpointDescriptor:s,networkCallDescriptor:p}),u=c.body.bulk_transfers.map(l),d=r(c.body.meta);return{bulkTransfers:u,...d?{meta:d}:{}}}async function v({bulkTransferSettings:r,operationSettings:n}){e.sepaTransferBulkGet();const t=b(r?.bulkTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:a}=i(n,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=u({bulkTransferId:t}),c=await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return l(c.body.bulk_transfer)}async function*g({bulkTransferSettings:r,operationSettings:u}){e.sepaTransferBulkCreate();const{proxyRequestFunction:m,proxyEndpointDescriptor:b}=i(u,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.');if(!s())throw new a(p.BROWSER);const x=n.getStagingToken(),v=u?.idempotencyKey||k();f(r);const g=new Map;for(const e of r.bulkTransfers){const r=e.beneficiary.iban;r&&!g.has(r)&&g.set(r,{name:e.beneficiary.name,iban:r})}const w=Array.from(g.values()),D=await async function({sepaPayees:e,proxyRequestFunction:r,proxyEndpointDescriptor:n}){const t=d({sepaPayees:e});return(await o({proxyFunction:r,proxyEndpointDescriptor:n,networkCallDescriptor:t})).body}({sepaPayees:w,proxyRequestFunction:m,proxyEndpointDescriptor:b});if((yield D.requests.map(y))===t.REJECT)return;const E=c({bulkTransfers:r.bulkTransfers,bankAccountId:r.bankAccountId,stagingToken:x||void 0,idempotencyKey:v}),q=(await o({proxyFunction:m,proxyEndpointDescriptor:b,networkCallDescriptor:E})).body.bulk_transfer;return{bulkTransfer:l(q),meta:{idempotencyKey:v}}}export{g as createBulkTransfer,v as getBulkTransfer,x as getBulkTransfers};

@@ -1,1 +0,1 @@

import{authLinks as e}from"../../auth-links/index.js";import{serializePaginationResponse as r}from"../../common/api-pagination/api-pagination.js";import{authManager as o}from"../../common/auth/auth.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{VOP_DECISIONS as t,HTTP_CODES as s,AUTH_LINK_ACTIONS as i}from"../../common/constants.js";import{isRunningInBrowser as a}from"../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as p}from"../../validation/operation-settings-validation.js";import{EmbedApiError as c}from"../../errors/EmbedApiError.js";import{InvalidParametersError as d}from"../../errors/InvalidParametersError.js";import{InvalidRuntimeError as u,RUNTIME_ENVIRONMENT as y}from"../../errors/InvalidRuntimeError.js";import{serializePreconditionRequiredResponse as m}from"../../sca/sca.serializer.js";import{prepareCreateSepaTransferCall as f,prepareCancelSepaTransferCall as l,prepareGetSepaTransferCall as x,prepareGetSepaTransfersCall as E,prepareVerifySepaPayeeCall as k}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as g,serializeSepaTransfer as v}from"../shared/sepa-transfers.serializer.js";import{findBeneficiary as b,createSepaTransferScaElement as w,waitForSepaTransferScaResult as q,decorateUrlWithExtraParams as D}from"../shared/sepa-transfers.utils.js";import{validateTransferBeneficiaryParams as S,validateCreateSepaTransferParams as F,validateGetSepaTransferCreationFlowLinkParams as R,validateCancelSepaTransferParams as h,validateGetSepaTransferParams as T}from"../shared/sepa-transfers.validate.js";import"../../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js";import j from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function C(e){const{proxyRequestFunction:o,proxyEndpointDescriptor:t,paginationSettings:s}=p(e?.operationSettings,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),i=E({paginationSettings:s}),a=await n({proxyFunction:o,proxyEndpointDescriptor:t,networkCallDescriptor:i}),c=a.body.transfers.map(v),d=r(a.body.meta);return{transfers:c,...d?{meta:d}:{}}}async function I({sepaTransferSettings:e,operationSettings:r}){const o=T(e?.sepaTransferId),{proxyRequestFunction:t,proxyEndpointDescriptor:s}=p(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),i=x({sepaTransferId:o}),a=await n({proxyFunction:t,proxyEndpointDescriptor:s,networkCallDescriptor:i});return v(a.body.transfer)}async function*P({sepaTransferSettings:e,operationSettings:r}){const{proxyRequestFunction:i,proxyEndpointDescriptor:l,uiParentElementId:x,locale:E}=p(r),D=o.getStagingToken(),R=r?.idempotencyKey||j();let h;S(e);const T=await b({sepaTransferSettings:e,operationSettings:r}),C={name:T.name,iban:T.iban},I=await async function({sepaPayee:e,operationSettings:r}){const{proxyRequestFunction:o,proxyEndpointDescriptor:t}=p(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),s=k({sepaPayee:e}),i=await n({proxyFunction:o,proxyEndpointDescriptor:t,networkCallDescriptor:s});return i.body}({sepaPayee:C,operationSettings:r}),P=yield g(I);let U;if("string"==typeof P){if(P===t.REJECT)return}else{if(P.vopDecision===t.REJECT)return;U=P.sepaTransferSettings}const _={...e,...U};F(_);const A={..._,beneficiary:T};if(A.beneficiary?.trusted){const e=f({transfer:A,vopProofToken:I.proof_token.token,idempotencyKey:R});h=(await n({proxyFunction:i,proxyEndpointDescriptor:l,networkCallDescriptor:e})).body.transfer}else{if(!a())throw new u(y.BROWSER);if(!x)throw new d("operationSettings.uiParentElementId is required for creating transfers to untrusted beneficiaries. This operation requires UI interaction for SCA.");const e=f({transfer:A,vopProofToken:I.proof_token.token,stagingToken:D||void 0,idempotencyKey:R});let r;try{h=(await n({proxyFunction:i,proxyEndpointDescriptor:l,networkCallDescriptor:e})).body.transfer}catch(e){if(!(e instanceof c&&e.code===s.PRECONDITION_REQUIRED))throw e;r=m(e.data.body).scaSessionToken}const o=w({networkCallDescriptor:e,scaSessionToken:r,operationSettings:{uiParentElementId:x,proxyRequestFunction:i,locale:E}});try{h=await q(o)}finally{o.remove()}}return{transfer:v(h),meta:{idempotencyKey:R}}}async function U({sepaTransferSettings:e,operationSettings:r}){const o=h(e?.sepaTransferId),{proxyRequestFunction:t,proxyEndpointDescriptor:s}=p(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),i=l({sepaTransferId:o});await n({proxyFunction:t,proxyEndpointDescriptor:s,networkCallDescriptor:i})}async function _({sepaTransferSettings:r,operationSettings:o}){const n=R(r),{proxyRequestFunction:t,proxyEndpointDescriptor:s}=p(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=await e.request({requestSettings:{action:i.SEPA_TRANSFER_CREATE,callbackUrl:n},operationSettings:{proxyRequestFunction:t,proxyEndpointDescriptor:s}});return{...a,url:D(a.url,o)}}export{U as cancelSepaTransfer,P as createSepaTransfer,I as getSepaTransfer,_ as getSepaTransferCreationFlowLink,C as getSepaTransfers};
import{authLinks as e}from"../../auth-links/index.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as o}from"../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../common/auth/auth.js";import{callProxyFunction as t}from"../../common/common.utils.js";import{VOP_DECISIONS as s,HTTP_CODES as i,AUTH_LINK_ACTIONS as a}from"../../common/constants.js";import{isRunningInBrowser as p}from"../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as c}from"../../validation/operation-settings-validation.js";import{EmbedApiError as d}from"../../errors/EmbedApiError.js";import{InvalidParametersError as m}from"../../errors/InvalidParametersError.js";import{InvalidRuntimeError as u,RUNTIME_ENVIRONMENT as y}from"../../errors/InvalidRuntimeError.js";import{serializePreconditionRequiredResponse as f}from"../../sca/sca.serializer.js";import{prepareCreateSepaTransferCall as l,prepareCancelSepaTransferCall as x,prepareGetSepaTransferCall as k,prepareGetSepaTransfersCall as E,prepareVerifySepaPayeeCall as g}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as v,serializeSepaTransfer as b}from"../shared/sepa-transfers.serializer.js";import{findBeneficiary as w,createSepaTransferScaElement as q,waitForSepaTransferScaResult as D,decorateUrlWithExtraParams as S}from"../shared/sepa-transfers.utils.js";import{validateTransferBeneficiaryParams as T,validateCreateSepaTransferParams as F,validateGetSepaTransferCreationFlowLinkParams as R,validateCancelSepaTransferParams as h,validateGetSepaTransferParams as C}from"../shared/sepa-transfers.validate.js";import"../../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js";import j from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function I(e){r.sepaTransferList();const{proxyRequestFunction:n,proxyEndpointDescriptor:s,paginationSettings:i}=c(e?.operationSettings,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=E({paginationSettings:i}),p=await t({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:a}),d=p.body.transfers.map(b),m=o(p.body.meta);return{transfers:d,...m?{meta:m}:{}}}async function P({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferGet();const n=C(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=k({sepaTransferId:n}),p=await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a});return b(p.body.transfer)}async function*U({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCreate();const{proxyRequestFunction:a,proxyEndpointDescriptor:x,uiParentElementId:k,locale:E}=c(o),S=n.getStagingToken(),R=o?.idempotencyKey||j();let h;T(e);const C=await w({sepaTransferSettings:e,operationSettings:o}),I={name:C.name,iban:C.iban},P=await async function({sepaPayee:e,operationSettings:r}){const{proxyRequestFunction:o,proxyEndpointDescriptor:n}=c(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),s=g({sepaPayee:e}),i=await t({proxyFunction:o,proxyEndpointDescriptor:n,networkCallDescriptor:s});return i.body}({sepaPayee:I,operationSettings:o}),U=yield v(P);let _;if("string"==typeof U){if(U===s.REJECT)return}else{if(U.vopDecision===s.REJECT)return;_=U.sepaTransferSettings}const A={...e,..._};F(A);const K={...A,beneficiary:C};if(K.beneficiary?.trusted){const e=l({transfer:K,vopProofToken:P.proof_token.token,idempotencyKey:R});h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}else{if(!p())throw new u(y.BROWSER);if(!k)throw new m("operationSettings.uiParentElementId is required for creating transfers to untrusted beneficiaries. This operation requires UI interaction for SCA.");const e=l({transfer:K,vopProofToken:P.proof_token.token,stagingToken:S||void 0,idempotencyKey:R});let r;try{h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}catch(e){if(!(e instanceof d&&e.code===i.PRECONDITION_REQUIRED))throw e;r=f(e.data.body).scaSessionToken}const o=q({networkCallDescriptor:e,scaSessionToken:r,operationSettings:{uiParentElementId:k,proxyRequestFunction:a,locale:E}});try{h=await D(o)}finally{o.remove()}}return{transfer:b(h),meta:{idempotencyKey:R}}}async function _({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCancel();const n=h(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=x({sepaTransferId:n});await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a})}async function A({sepaTransferSettings:o,operationSettings:n}){r.sepaTransferCreationFlowLink();const t=R(o),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(n,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),p=await e.request({requestSettings:{action:a.SEPA_TRANSFER_CREATE,callbackUrl:t},operationSettings:{proxyRequestFunction:s,proxyEndpointDescriptor:i}});return{...p,url:S(p.url,n)}}export{_ as cancelSepaTransfer,U as createSepaTransfer,P as getSepaTransfer,A as getSepaTransferCreationFlowLink,I as getSepaTransfers};

@@ -1,1 +0,1 @@

import{serializePaginationResponse as n}from"../../common/api-pagination/api-pagination.js";import{callProxyFunction as t}from"../../common/common.utils.js";import{validateClientOperationSettings as o}from"../../validation/operation-settings-validation.js";import{prepareGetTransactionsCall as r,prepareGetTransactionCall as i}from"../shared/transactions.api.js";import{serializeTransaction as e}from"../shared/transactions.serializer.js";import{validateGetTransactionParams as s}from"../shared/transactions.validation.js";async function a(i){const{proxyRequestFunction:s,proxyEndpointDescriptor:a,paginationSettings:p}=o(i?.operationSettings||{},'Client-side transaction operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/transactions/server" only in server-side/backend environments.'),c={...i?.transactionSettings||{},paginationSettings:p},d=r(c),m=await t({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:d});return{transactions:m.body.transactions.map(e),meta:n(m.body.meta)}}async function p({transactionSettings:n,operationSettings:r}){const{proxyRequestFunction:a,proxyEndpointDescriptor:p}=o(r||{},'Client-side transaction operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/transactions/server" only in server-side/backend environments.'),{transactionId:c}=s(n),d=i({transactionId:c}),m=await t({proxyFunction:a,proxyEndpointDescriptor:p,networkCallDescriptor:d});return e(m.body.transaction)}export{p as getTransaction,a as getTransactions};
import{tracker as t}from"../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as n}from"../../common/api-pagination/api-pagination.js";import{callProxyFunction as o}from"../../common/common.utils.js";import{validateClientOperationSettings as r}from"../../validation/operation-settings-validation.js";import{prepareGetTransactionsCall as i,prepareGetTransactionCall as e}from"../shared/transactions.api.js";import{serializeTransaction as s}from"../shared/transactions.serializer.js";import{validateGetTransactionParams as a}from"../shared/transactions.validation.js";async function c(e){t.transactionsList();const{proxyRequestFunction:a,proxyEndpointDescriptor:c,paginationSettings:p}=r(e?.operationSettings||{},'Client-side transaction operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/transactions/server" only in server-side/backend environments.'),m={...e?.transactionSettings||{},paginationSettings:p},d=i(m),y=await o({proxyFunction:a,proxyEndpointDescriptor:c,networkCallDescriptor:d});return{transactions:y.body.transactions.map(s),meta:n(y.body.meta)}}async function p({transactionSettings:n,operationSettings:i}){t.transactionsGet();const{proxyRequestFunction:c,proxyEndpointDescriptor:p}=r(i||{},'Client-side transaction operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/transactions/server" only in server-side/backend environments.'),{transactionId:m}=a(n),d=e({transactionId:m}),y=await o({proxyFunction:c,proxyEndpointDescriptor:p,networkCallDescriptor:d});return s(y.body.transaction)}export{p as getTransaction,c as getTransactions};

@@ -1,1 +0,1 @@

{"version":3,"file":"transactions.client.d.ts","sourceRoot":"","sources":["../../../src/transactions/client/transactions.client.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAOnD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GACjE,OAAO,CAAC,uBAAuB,CAAC,CA6BlC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAwBlE"}
{"version":3,"file":"transactions.client.d.ts","sourceRoot":"","sources":["../../../src/transactions/client/transactions.client.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,2CAA2C,CAAC;AAOnD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EAEZ,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,uBAAuB,CAAC,GACjE,OAAO,CAAC,uBAAuB,CAAC,CA8BlC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,cAAc,CAAC,EACnC,mBAAmB,EACnB,iBAAiB,GAClB,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBlE"}
{
"name": "@qonto/embed-sdk",
"version": "0.64.0",
"version": "0.64.1",
"description": "Library to embed Qonto features in your application",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display