@epigraph/epigraph-std-lib 5.0.0-alpha.1 → 5.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,3 +3,9 @@ export declare enum ENVIRONMENT_TYPE {
3
3
  STAGING = "staging",
4
4
  PRODUCTION = "production"
5
5
  }
6
+ export declare enum NexusEndpoints {
7
+ PRODUCTION = "https://api.myepigraph.com/api/",
8
+ STAGING = "https://nexus.epigraph.dev/api/",
9
+ STAGING_CANARY = "https://staging-canary.epigraph.dev/api/",
10
+ LOCAL = "https://nexus.test/api/"
11
+ }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");var n=(r=>(r.DEVELOPMENT="development",r.STAGING="staging",r.PRODUCTION="production",r))(n||{});class a{constructor(e){if(this._loggerContext="EPIGRAPH",this._isReady=!1,this._logger=new s.EpigraphLogger("EPIGRAPH LOGGER"),this._environment=n.DEVELOPMENT,this._activeComponentsInSession=new Map,this._staleComponentsInSession=new Map,this._isSessionWebGL2Compatible=!1,window.epigraph)return window.epigraph.registerActiveComponent(e),window.epigraph;this._isSessionWebGL2Compatible=this._checkIfWebGL2IsAvailable(),window.epigraph=this,window.epigraph.registerActiveComponent(e),this.logBranding(),this._initializer=e,this._environment=this._initializer.environment;const t=this.getLoggerModeNameFromEnvironment();this._logger.setCurrentMode(t),this._urlProcessor=new p.EpigraphUrlProcessor,this.id=a.safeGenerateUuid();const i=this._urlProcessor.getParameterInUrl(p.QUERY_PARAMETER_NAMES.epigraphSessionId);this._epigraphSessionId=i??a.safeGenerateUuid(),this._logger.info({title:"Epigraph Object Ready!!",details:this,contextOverride:this._loggerContext}),this._isReady=!0}get isReady(){return this._isReady}get logger(){return this._logger}get urlProcessor(){return this._urlProcessor}get epigraphSessionId(){return this._epigraphSessionId}get environment(){return this._environment}get initializer(){return this._initializer}get activeComponentsInSession(){return this._activeComponentsInSession}get staleComponentsInSession(){return this._staleComponentsInSession}isSessionWebGL2Compatible(){return this._isSessionWebGL2Compatible}logBranding(){console.group("Powered by: "),console.log("%cEPIGRAPH","font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"),console.log("Visit for more details: www.epigraph.us"),console.groupEnd()}_checkIfWebGL2IsAvailable(){try{const e=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&e.getContext("webgl2"))}catch{return!1}}registerActiveComponent(e){this._activeComponentsInSession.set(e.uuid,e),this._logger.info({title:"Registered a new Active Component",details:e,contextOverride:this._loggerContext})}deregisterActiveComponent(e){const t=this._activeComponentsInSession.get(e.uuid);t&&(this._staleComponentsInSession.set(t.uuid,t),this._activeComponentsInSession.delete(t.uuid),this._logger.info({title:"Deregistered a new Active Component",details:e,contextOverride:this._loggerContext}))}getLoggerModeNameFromEnvironment(){let e=s.LoggerModeNames.Dev;return this._environment===n.STAGING?e=s.LoggerModeNames.Staging:this._environment===n.PRODUCTION&&(e=s.LoggerModeNames.Release),e}static safeGenerateUuid(){let e="";try{e=crypto.randomUUID()}catch{console.error("crypto not available. Not generating a UUID")}return e}static generateXPath(e){let t="",i=e;for(;i;){let g=1,o=i.previousSibling;for(;o;)o.nodeName===i.nodeName&&g++,o=o.previousSibling;t=`/${i.nodeName.toLowerCase()+(g>1?`[${g}]`:"")}${t}`,i=i.parentNode}return t}}exports.ENVIRONMENT_TYPE=n;exports.Epigraph=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),s=require("../enums-1vqWxJ0i.cjs"),g=require("../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");class o{constructor(e){if(this._loggerContext="EPIGRAPH",this._isReady=!1,this._logger=new r.EpigraphLogger("EPIGRAPH LOGGER"),this._environment=s.ENVIRONMENT_TYPE.DEVELOPMENT,this._activeComponentsInSession=new Map,this._staleComponentsInSession=new Map,this._isSessionWebGL2Compatible=!1,window.epigraph)return window.epigraph.registerActiveComponent(e),window.epigraph;this._isSessionWebGL2Compatible=this._checkIfWebGL2IsAvailable(),window.epigraph=this,window.epigraph.registerActiveComponent(e),this.logBranding(),this._initializer=e,this._environment=this._initializer.environment;const t=this.getLoggerModeNameFromEnvironment();this._logger.setCurrentMode(t),this._urlProcessor=new g.EpigraphUrlProcessor,this.id=o.safeGenerateUuid();const i=this._urlProcessor.getParameterInUrl(g.QUERY_PARAMETER_NAMES.epigraphSessionId);this._epigraphSessionId=i??o.safeGenerateUuid(),this._logger.info({title:"Epigraph Object Ready!!",details:this,contextOverride:this._loggerContext}),this._isReady=!0}get isReady(){return this._isReady}get logger(){return this._logger}get urlProcessor(){return this._urlProcessor}get epigraphSessionId(){return this._epigraphSessionId}get environment(){return this._environment}get initializer(){return this._initializer}get activeComponentsInSession(){return this._activeComponentsInSession}get staleComponentsInSession(){return this._staleComponentsInSession}isSessionWebGL2Compatible(){return this._isSessionWebGL2Compatible}logBranding(){console.group("Powered by: "),console.log("%cEPIGRAPH","font-weight: bold; font-size: 50px; text-shadow: 3px 3px 0 rgb(100,100,100)"),console.log("Visit for more details: www.epigraph.us"),console.groupEnd()}_checkIfWebGL2IsAvailable(){try{const e=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&e.getContext("webgl2"))}catch{return!1}}registerActiveComponent(e){this._activeComponentsInSession.set(e.uuid,e),this._logger.info({title:"Registered a new Active Component",details:e,contextOverride:this._loggerContext})}deregisterActiveComponent(e){const t=this._activeComponentsInSession.get(e.uuid);t&&(this._staleComponentsInSession.set(t.uuid,t),this._activeComponentsInSession.delete(t.uuid),this._logger.info({title:"Deregistered a new Active Component",details:e,contextOverride:this._loggerContext}))}getLoggerModeNameFromEnvironment(){let e=r.LoggerModeNames.Dev;return this._environment===s.ENVIRONMENT_TYPE.STAGING?e=r.LoggerModeNames.Staging:this._environment===s.ENVIRONMENT_TYPE.PRODUCTION&&(e=r.LoggerModeNames.Release),e}static safeGenerateUuid(){let e="";try{e=crypto.randomUUID()}catch{console.error("crypto not available. Not generating a UUID")}return e}static generateXPath(e){let t="",i=e;for(;i;){let a=1,n=i.previousSibling;for(;n;)n.nodeName===i.nodeName&&a++,n=n.previousSibling;t=`/${i.nodeName.toLowerCase()+(a>1?`[${a}]`:"")}${t}`,i=i.parentNode}return t}}exports.ENVIRONMENT_TYPE=s.ENVIRONMENT_TYPE;exports.Epigraph=o;
@@ -1,15 +1,15 @@
1
- import { EpigraphLogger as l, LoggerModeNames as a } from "../EpigraphLibs/EpigraphLogger/epigraphLogger.js";
2
- import { EpigraphUrlProcessor as h, QUERY_PARAMETER_NAMES as p } from "../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
3
- var s = /* @__PURE__ */ ((i) => (i.DEVELOPMENT = "development", i.STAGING = "staging", i.PRODUCTION = "production", i))(s || {});
4
- class g {
1
+ import { EpigraphLogger as g, LoggerModeNames as s } from "../EpigraphLibs/EpigraphLogger/epigraphLogger.js";
2
+ import { E as r } from "../enums-CvOTKyNu.js";
3
+ import { EpigraphUrlProcessor as l, QUERY_PARAMETER_NAMES as h } from "../EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
4
+ class a {
5
5
  constructor(e) {
6
- if (this._loggerContext = "EPIGRAPH", this._isReady = !1, this._logger = new l("EPIGRAPH LOGGER"), this._environment = s.DEVELOPMENT, this._activeComponentsInSession = /* @__PURE__ */ new Map(), this._staleComponentsInSession = /* @__PURE__ */ new Map(), this._isSessionWebGL2Compatible = !1, window.epigraph)
6
+ if (this._loggerContext = "EPIGRAPH", this._isReady = !1, this._logger = new g("EPIGRAPH LOGGER"), this._environment = r.DEVELOPMENT, this._activeComponentsInSession = /* @__PURE__ */ new Map(), this._staleComponentsInSession = /* @__PURE__ */ new Map(), this._isSessionWebGL2Compatible = !1, window.epigraph)
7
7
  return window.epigraph.registerActiveComponent(e), window.epigraph;
8
8
  this._isSessionWebGL2Compatible = this._checkIfWebGL2IsAvailable(), window.epigraph = this, window.epigraph.registerActiveComponent(e), this.logBranding(), this._initializer = e, this._environment = this._initializer.environment;
9
9
  const t = this.getLoggerModeNameFromEnvironment();
10
- this._logger.setCurrentMode(t), this._urlProcessor = new h(), this.id = g.safeGenerateUuid();
11
- const n = this._urlProcessor.getParameterInUrl(p.epigraphSessionId);
12
- this._epigraphSessionId = n ?? g.safeGenerateUuid(), this._logger.info({ title: "Epigraph Object Ready!!", details: this, contextOverride: this._loggerContext }), this._isReady = !0;
10
+ this._logger.setCurrentMode(t), this._urlProcessor = new l(), this.id = a.safeGenerateUuid();
11
+ const i = this._urlProcessor.getParameterInUrl(h.epigraphSessionId);
12
+ this._epigraphSessionId = i ?? a.safeGenerateUuid(), this._logger.info({ title: "Epigraph Object Ready!!", details: this, contextOverride: this._loggerContext }), this._isReady = !0;
13
13
  }
14
14
  get isReady() {
15
15
  return this._isReady;
@@ -86,8 +86,8 @@ class g {
86
86
  * @returns {LoggerModeNames} A valid logger mode name.
87
87
  */
88
88
  getLoggerModeNameFromEnvironment() {
89
- let e = a.Dev;
90
- return this._environment === s.STAGING ? e = a.Staging : this._environment === s.PRODUCTION && (e = a.Release), e;
89
+ let e = s.Dev;
90
+ return this._environment === r.STAGING ? e = s.Staging : this._environment === r.PRODUCTION && (e = s.Release), e;
91
91
  }
92
92
  /**
93
93
  * Generates a random UUID using crypto.randomUUID with a fallback on custom generator,
@@ -111,17 +111,17 @@ class g {
111
111
  * @returns {string} The generated XPath.
112
112
  */
113
113
  static generateXPath(e) {
114
- let t = "", n = e;
115
- for (; n; ) {
116
- let r = 1, o = n.previousSibling;
117
- for (; o; )
118
- o.nodeName === n.nodeName && r++, o = o.previousSibling;
119
- t = `/${n.nodeName.toLowerCase() + (r > 1 ? `[${r}]` : "")}${t}`, n = n.parentNode;
114
+ let t = "", i = e;
115
+ for (; i; ) {
116
+ let o = 1, n = i.previousSibling;
117
+ for (; n; )
118
+ n.nodeName === i.nodeName && o++, n = n.previousSibling;
119
+ t = `/${i.nodeName.toLowerCase() + (o > 1 ? `[${o}]` : "")}${t}`, i = i.parentNode;
120
120
  }
121
121
  return t;
122
122
  }
123
123
  }
124
124
  export {
125
- s as ENVIRONMENT_TYPE,
126
- g as Epigraph
125
+ r as ENVIRONMENT_TYPE,
126
+ a as Epigraph
127
127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../lit-element-CYaaFRfk.cjs"),e=require("./epigraph.cjs");class s extends HTMLElement{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-html",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this.attachShadow({mode:"open"}),this._environment=i,this._solutionVersion=t,this._xPath=e.Epigraph.generateXPath(this),this._uuid=e.Epigraph.safeGenerateUuid()??this._xPath,new e.Epigraph(this),window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}class o extends r.i{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-lit",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this._environment=i,this._solutionVersion=t,this._xPath=e.Epigraph.generateXPath(this),this._uuid=e.Epigraph.safeGenerateUuid()??this._xPath,new e.Epigraph(this),this._isReady=!0,window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}exports.EpigraphBaseSolutionHtmlElement=s;exports.EpigraphBaseSolutionLitElement=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../lit-element-CYaaFRfk.cjs"),e=require("./epigraph.cjs");class s extends HTMLElement{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-html",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this.attachShadow({mode:"open"}),this.__environment=i,this._solutionVersion=t,this.__xPath=e.Epigraph.generateXPath(this),this.__uuid=e.Epigraph.safeGenerateUuid()??this.__xPath,new e.Epigraph(this),window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this.__environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this.__uuid}get xPath(){return this.__xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}class o extends r.i{constructor(t,i){super(),this._isReady=!1,this._elementName="epigraph-base-solution-lit",this._solutionVersion="",this._loggerContextOverride="[EPIGRAPH BASE SOLUTION]",this._environment=i,this._solutionVersion=t,this._xPath=e.Epigraph.generateXPath(this),this._uuid=e.Epigraph.safeGenerateUuid()??this._xPath,new e.Epigraph(this),this._isReady=!0,window.epigraph.logger.info({title:"Epigraph Base Solution Ready",contextOverride:this._loggerContextOverride})}get isReady(){return this._isReady}get environment(){return this._environment}get elementName(){return this._elementName}get solutionVersion(){return this._solutionVersion}get uuid(){return this._uuid}get xPath(){return this._xPath}disconnectedCallback(){window.epigraph.deregisterActiveComponent(this)}}exports.EpigraphBaseSolutionHtmlElement=s;exports.EpigraphBaseSolutionLitElement=o;
@@ -1,10 +1,10 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { ENVIRONMENT_TYPE } from './constants/enums';
3
3
  export declare class EpigraphBaseSolutionHtmlElement extends HTMLElement {
4
- private _xPath;
5
- private _uuid;
6
- private _isReady;
7
- private _environment;
4
+ private __xPath;
5
+ private __uuid;
6
+ private __environment;
7
+ protected _isReady: boolean;
8
8
  protected _elementName: string;
9
9
  protected _solutionVersion: string;
10
10
  protected _loggerContextOverride: string;
@@ -23,8 +23,8 @@ export declare class EpigraphBaseSolutionHtmlElement extends HTMLElement {
23
23
  export declare class EpigraphBaseSolutionLitElement extends LitElement {
24
24
  private _xPath;
25
25
  private _uuid;
26
- private _isReady;
27
26
  private _environment;
27
+ protected _isReady: boolean;
28
28
  protected _elementName: string;
29
29
  protected _solutionVersion: string;
30
30
  protected _loggerContextOverride: string;
@@ -2,7 +2,7 @@ import { i as s } from "../lit-element-C3moVMGu.js";
2
2
  import { Epigraph as e } from "./epigraph.js";
3
3
  class h extends HTMLElement {
4
4
  constructor(t, i) {
5
- super(), this._isReady = !1, this._elementName = "epigraph-base-solution-html", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this.attachShadow({ mode: "open" }), this._environment = i, this._solutionVersion = t, this._xPath = e.generateXPath(this), this._uuid = e.safeGenerateUuid() ?? this._xPath, new e(this), window.epigraph.logger.info({
5
+ super(), this._isReady = !1, this._elementName = "epigraph-base-solution-html", this._solutionVersion = "", this._loggerContextOverride = "[EPIGRAPH BASE SOLUTION]", this.attachShadow({ mode: "open" }), this.__environment = i, this._solutionVersion = t, this.__xPath = e.generateXPath(this), this.__uuid = e.safeGenerateUuid() ?? this.__xPath, new e(this), window.epigraph.logger.info({
6
6
  title: "Epigraph Base Solution Ready",
7
7
  contextOverride: this._loggerContextOverride
8
8
  });
@@ -11,7 +11,7 @@ class h extends HTMLElement {
11
11
  return this._isReady;
12
12
  }
13
13
  get environment() {
14
- return this._environment;
14
+ return this.__environment;
15
15
  }
16
16
  get elementName() {
17
17
  return this._elementName;
@@ -23,10 +23,10 @@ class h extends HTMLElement {
23
23
  return this._solutionVersion;
24
24
  }
25
25
  get uuid() {
26
- return this._uuid;
26
+ return this.__uuid;
27
27
  }
28
28
  get xPath() {
29
- return this._xPath;
29
+ return this.__xPath;
30
30
  }
31
31
  disconnectedCallback() {
32
32
  window.epigraph.deregisterActiveComponent(this);
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var c=(e=>(e.UNAVAILABLE="unavailable",e.AVAILABLE="available",e.RESTRICTED="restricted",e))(c||{});const O=Symbol("data"),v=Symbol("next"),D=class L{constructor(t){this[O]=t,this[v]=null}get data(){return this[O]}set next(t){if(!(t instanceof L)&&t!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[v]=t}get next(){return this[v]}};let S=D;const E=Symbol("head");class G{constructor(){this[E]=null}set head(t){this[E]=t}get head(){return this[E]}addToTail(t){let i=this.head;if(i){for(;i.next!==null;)i=i?.next;return i.next=new S(t)}return this.head=new S(t)}removeHead(){const t=this.head;if(t)return this.head=t.next,t.data}}const T=Symbol("queue"),l=Symbol("size");class w{constructor(){this[T]=new G,this[l]=0}get queue(){return this[T]}get size(){return this[l]}enqueue(t){this.queue.addToTail(t),this[l]++}dequeue(){const t=this.queue.removeHead();return this[l]--,t}}class u{static{this.NOTIFICATION_NAME="epg-notification"}static{this.ACTION_SEND_EVENT="send-event"}static{this.ACTION_INITIALIZED="initialized"}static{this.ACTION_FAILED_INITIALIZATION="initialization-failed"}constructor(t,i,n,s,r,o){this._pluginName=t,this._trackingId=i,this._experienceId=n,this._solution=s,this._initializer=r,this._status=o}updateStatus(t){this._status=t}updateInitializer(t){this._initializer=t}notify(t,i){console.log("Notifying",t,i);const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:t,eventDetails:i};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}}class z{constructor({trackingID:t,experienceID:i,solution:n,verboseLogging:s=!1}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod="NONE",this.__nexusFailureReported=!1,this.name=this.pluginName="GA4-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=s,this.__queue=new w,this.__epigraphNotifier=new u(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(u.ACTION_FAILED_INITIALIZATION,{}));return}const t=performance.now();if(this.__initializationAttempts>0&&t-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=t,this.__initializationAttempts++;const i=this.detectAndSetupAnalytics();i.success?(this.__isInitialized=!0,this.__status=c.AVAILABLE,this.__initializationMethod=i.method,this.dataLayerName=i.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${i.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${i.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){const t=this.detectGTM();if(t)return this.logger(`GTM detected with container ID: ${t.containerId}`),this.__epigraphNotifier.updateInitializer("GTM"),{success:!0,method:"GTM",dataLayerName:t.dataLayerName};const i=this.findGA4Info(this.trackingID);if(i){const n=i.l||"dataLayer";return this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.__epigraphNotifier.updateInitializer("GA4"),{success:!0,method:"GA4",dataLayerName:n}}return{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const t=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const i of Array.from(t)){const n=i.getAttribute("src");if(n){const s=n.match(/gtm\.js\?id=([^&]+)/);if(s&&s.length>0){const r=n.match(/&l=([^&]+)/),o=r?r[1]:"dataLayer";return{containerId:s[1],dataLayerName:o}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let t=this.__queue.size;for(let i=0;i<t;i++){const n=this.__queue.dequeue();try{this.__initializationMethod==="GTM"?(this.sendGTMEvent(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__initializationMethod==="GA4"?(this.sendGA4Event(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__queue.enqueue(n)}catch(s){this.logger(`Error sending event ${n.eventName}: ${s}`),this.__queue.enqueue(n)}}}async sendGTMEvent(t){let i=t.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGTMParametersToEpgEventTag(t.eventName,i)),this.dataLayer&&(this.dataLayer.push(i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(t){let i=t.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGA4ParametersToEpgEventTag(i)),window.gtag("event",t.eventName,i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n)}isValidPayload(t){if(Object.keys(t).length>=25)return!1;for(const[s,r]of Object.entries(t))if(s!=="items"&&(s.length>40||String(r).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(t,i){try{let n=await this.sendGA4LongParameters(i);return{event:t,epg_event_tag:n,send_to:this.trackingID}}catch{return i}}async convertGA4ParametersToEpgEventTag(t){try{return{epg_event_tag:await this.sendGA4LongParameters(t),send_to:this.trackingID}}catch{return t}}logger(t){this.verboseLogging&&console.warn(t)}async sendGA4LongParameters(t){const i="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:t};try{const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return s.ok?(await s.json())?.id??"":""}catch{return""}}async reportFailureToNexus(t,i){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:t,errorMessage:i,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4Info(t){if(window.google_tag_manager&&window.google_tag_manager[t]){const n=window.google_tag_manager[t];if(n&&n.dataLayerName)return{fullSrc:"",id:t,l:n.dataLayerName}}const i=document.querySelectorAll("script[src]");for(const n of i){const s=n.getAttribute("src");if(s&&s.includes(t)){const r=new URL(s,location.href),o=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:o.id||void 0,l:o.l||void 0}}}return null}}class M{constructor({trackingID:t,experienceID:i,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:x=!1}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=o,this.__queue=new w,this.url=x?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=c.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,this.experienceID,this.solution,"NEXUS",this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+"-"+this.trackingID}setupPlugin(){}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let t=0;t<this.__queue.size;t++){const i=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:i.eventName,parameters:i.getNexusParameters()};try{return(await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<"u"?window.location.origin:""},body:JSON.stringify(n)})).ok&&this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n),""}catch{return""}this.__sentEventCount++}return""}}class P{constructor(t){this.consentSet=!1,this.consent=!1,this.pluginName="OneTrustConsentPlugin",this.consentIdentifier=t,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let t=window.OnetrustActiveGroups;t!==void 0&&t.split(",").forEach(n=>{n===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener("load",()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust=="object"&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}}var m=(e=>(e.OneTrust="onetrust",e))(m||{});class a{constructor({eventName:t,interactiveEvent:i,customParameters:n}){this.eventName=t,this.interactiveEvent=i,this.customParameters=n}getGa4Parameters(t,i,n){let s={solution:t,experience_id:i,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getGTMParameters(t,i,n){let s={solution:t,experience_id:i,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getNexusParameters(){let t={interactive_event:this.interactiveEvent};return t=Object.assign(t,JSON.parse(JSON.stringify(this.customParameters))),t}}var f=(e=>(e.VARIANT="variant",e.CATEGORY_VARIANT="category_variant",e.GEOMETRY="geometry",e.CATEGORY_GEOMETRY="category_geometry",e.GLOBAL="global",e))(f||{}),d=(e=>(e.AR="ar",e.QR="qr",e.INFO="info",e.DOWNLOAD="download",e.PREVIEW_CART="preview_cart",e.HOTSPOT_PANEL="hotspot_panel",e.SHARE_MODAL="share_modal",e.RESTART_MODAL="restart_modal",e.REMOVE_MODAL="remove_modal",e.LOAD_PRECONFIG_MODAL="load_preconfig_modal",e.MOVE_MODAL="move_modal",e.OUT_OF_STOCK_MODAL="out_of_stock_modal",e))(d||{}),I=(e=>(e.NETWORK="network",e.EXPERIENCE_CONFIG_ERROR="experience-config-error",e.SCENE_LOAD_ERROR="scene-load-error",e.INITIAL_SCENE_LOAD_ERROR="initial-scene-load-error",e.AUTHENTICATION_FAILED="authentication-failed",e))(I||{}),_=(e=>(e.AUTO="auto",e.BUTTON="button",e.HOTSPOT="hotspot",e.GESTURE="gesture",e))(_||{}),h=(e=>(e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.CAD="CAD",e))(h||{}),N=(e=>(e.AR="ar",e.QR="qr",e.AR_WEBGL2="ar-webgl2",e.QR_WEBGL2="qr-webgl2",e))(N||{}),y=(e=>(e.AR_VIEW="ar_view",e.DIMENSION_TOGGLE="dimension_toggle",e.HOTSPOTS_TOGGLE="hotspots_toggle",e.HELP_TOGGLE="help_toggle",e.UTILITY_MENU_TOGGLE="utility_menu_toggle",e.HOTSPOT_ENTER="hotspot_enter",e.HOTSPOT_EXIT="hotspot_exit",e.SHARE="share",e.PDF_DOWNLOAD="pdf_download",e.COPY="copy",e.RESTART="restart",e.INSTRUCTIONS_SHOW="show_instructions",e.REVIEW_CART="review_cart",e.SHOP_NOW="shop_now",e.SUB_CATEGORY="sub_category",e.NEXT_STEP="next_step",e.PREVIOUS_STEP="previous_step",e))(y||{}),g=(e=>(e.ZOOM="zoom",e.ROTATE="rotate",e.PAN="pan",e))(g||{}),A=(e=>(e.CONFIGURATION="configuration",e.SCENE="scene",e.PRODUCT="product",e))(A||{}),C=(e=>(e.FACEBOOK="facebook",e.TWITTER="twitter",e.EMAIL="email",e.COPY_LINK="copy_link",e.WHATSAPP="whatsapp",e.LINKEDIN="linkedin",e))(C||{});class q extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class b extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class k extends a{constructor(t,i){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i}})}}class V extends a{static{this.MODULE_FAILED_ERRORS=I}constructor(t,i,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i,error_type:n}})}}class F extends a{constructor(t){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:t}})}}class $ extends a{static{this.SUPPORT_TYPE=N}constructor(t){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:t}})}}class j extends a{static{this.BUTTON_TYPE=y}constructor(t,i){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:t,button_name:i}})}}class U extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class W extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class H extends a{constructor(t){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:t}})}}class J extends a{static{this.ACTION_PERFORMED=g}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class K extends a{static{this.INTERACTION_TYPE=g}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class X extends a{static{this.CURRENCY=h}constructor(t,i,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:r,value:i,currency:n,quantity:s}})}}class Z extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class B extends a{static{this.CURRENCY=h}constructor(t,i,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:s,value:t,currency:i,quantity:n}})}}class Q extends a{static{this.VARIANT_CHANGE_TYPES=f}constructor(t,i){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:i,change_type:t}})}}class Y extends a{static{this.CONTENT_TYPES=A}static{this.SHARE_DESTINATIONS=C}constructor(t,i,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:t,share_destination:i}})}}class tt extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class et extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class it extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class nt extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class st extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class at extends a{constructor(t,i,n){super({eventName:t,interactiveEvent:i,customParameters:n})}}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../../enums-1vqWxJ0i.cjs");var c=(e=>(e.UNAVAILABLE="unavailable",e.AVAILABLE="available",e.RESTRICTED="restricted",e))(c||{});const O=Symbol("data"),v=Symbol("next"),G=class w{constructor(t){this[O]=t,this[v]=null}get data(){return this[O]}set next(t){if(!(t instanceof w)&&t!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[v]=t}get next(){return this[v]}};let S=G;const E=Symbol("head");class z{constructor(){this[E]=null}set head(t){this[E]=t}get head(){return this[E]}addToTail(t){let i=this.head;if(i){for(;i.next!==null;)i=i?.next;return i.next=new S(t)}return this.head=new S(t)}removeHead(){const t=this.head;if(t)return this.head=t.next,t.data}}const T=Symbol("queue"),p=Symbol("size");class L{constructor(){this[T]=new z,this[p]=0}get queue(){return this[T]}get size(){return this[p]}enqueue(t){this.queue.addToTail(t),this[p]++}dequeue(){const t=this.queue.removeHead();return this[p]--,t}}class u{static{this.NOTIFICATION_NAME="epg-notification"}static{this.ACTION_SEND_EVENT="send-event"}static{this.ACTION_INITIALIZED="initialized"}static{this.ACTION_FAILED_INITIALIZATION="initialization-failed"}constructor(t,i,n,s,r,o){this._pluginName=t,this._trackingId=i,this._experienceId=n,this._solution=s,this._initializer=r,this._status=o}updateStatus(t){this._status=t}updateInitializer(t){this._initializer=t}notify(t,i){const n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:t,eventDetails:i};window.dispatchEvent(new CustomEvent("epg-notification",{detail:n}))}}class M{constructor({trackingID:t,experienceID:i,solution:n,verboseLogging:s=!1}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod="NONE",this.__nexusFailureReported=!1,this.name=this.pluginName="GA4-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=s,this.__queue=new L,this.__epigraphNotifier=new u(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(u.ACTION_FAILED_INITIALIZATION,{}));return}const t=performance.now();if(this.__initializationAttempts>0&&t-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=t,this.__initializationAttempts++;const i=this.detectAndSetupAnalytics();i.success?(this.__isInitialized=!0,this.__status=c.AVAILABLE,this.__initializationMethod=i.method,this.dataLayerName=i.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${i.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${i.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){const t=this.detectGTM();if(t)return this.logger(`GTM detected with container ID: ${t.containerId}`),this.__epigraphNotifier.updateInitializer("GTM"),{success:!0,method:"GTM",dataLayerName:t.dataLayerName};const i=this.findGA4Info(this.trackingID);if(i){const n=i.l||"dataLayer";return this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.__epigraphNotifier.updateInitializer("GA4"),{success:!0,method:"GA4",dataLayerName:n}}return{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const t=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const i of Array.from(t)){const n=i.getAttribute("src");if(n){const s=n.match(/gtm\.js\?id=([^&]+)/);if(s&&s.length>0){const r=n.match(/&l=([^&]+)/),o=r?r[1]:"dataLayer";return{containerId:s[1],dataLayerName:o}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let t=this.__queue.size;for(let i=0;i<t;i++){const n=this.__queue.dequeue();try{this.__initializationMethod==="GTM"?(this.sendGTMEvent(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__initializationMethod==="GA4"?(this.sendGA4Event(n),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)):this.__queue.enqueue(n)}catch(s){this.logger(`Error sending event ${n.eventName}: ${s}`),this.__queue.enqueue(n)}}}async sendGTMEvent(t){let i=t.getGTMParameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGTMParametersToEpgEventTag(t.eventName,i)),this.dataLayer&&(this.dataLayer.push(i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(t){let i=t.getGa4Parameters(this.solution,this.experienceID,this.trackingID);const n=i;this.isValidPayload(i)||(i=await this.convertGA4ParametersToEpgEventTag(i)),window.gtag("event",t.eventName,i),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n)}isValidPayload(t){if(Object.keys(t).length>=25)return!1;for(const[s,r]of Object.entries(t))if(s!=="items"&&(s.length>40||String(r).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(t,i){try{let n=await this.sendGA4LongParameters(i);return{event:t,epg_event_tag:n,send_to:this.trackingID}}catch{return i}}async convertGA4ParametersToEpgEventTag(t){try{return{epg_event_tag:await this.sendGA4LongParameters(t),send_to:this.trackingID}}catch{return t}}logger(t){this.verboseLogging&&console.warn(t)}async sendGA4LongParameters(t){const i="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:t};try{const s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return s.ok?(await s.json())?.id??"":""}catch{return""}}async reportFailureToNexus(t,i){try{const n={plugin:"GA4",trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:t,errorMessage:i,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4Info(t){if(window.google_tag_manager&&window.google_tag_manager[t]){const n=window.google_tag_manager[t];if(n&&n.dataLayerName)return{fullSrc:"",id:t,l:n.dataLayerName}}const i=document.querySelectorAll("script[src]");for(const n of i){const s=n.getAttribute("src");if(s&&s.includes(t)){const r=new URL(s,location.href),o=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:o.id||void 0,l:o.l||void 0}}}return null}}class q{constructor({trackingID:t,experienceID:i,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,baseUrl:x=D.NexusEndpoints.PRODUCTION}){this.__status=c.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=t,this.experienceID=i,this.solution=n,this.verboseLogging=o,this.__queue=new L,this.url=`${x}/analytics/event`,this.__status=c.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,this.experienceID,this.solution,"NEXUS",this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(t){this.__status=t,this.__epigraphNotifier.updateStatus(t)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+"-"+this.trackingID}setupPlugin(){}async sendEvent(t,i){if(this.__queue.enqueue(t),!i){this.__status=c.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let t=0;t<this.__queue.size;t++){const i=this.__queue.dequeue(),n={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:i.eventName,parameters:i.getNexusParameters()};try{return(await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<"u"?window.location.origin:""},body:JSON.stringify(n)})).ok&&this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n),""}catch{return""}this.__sentEventCount++}return""}}class P{constructor(t){this.consentSet=!1,this.consent=!1,this.pluginName="OneTrustConsentPlugin",this.consentIdentifier=t,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let t=window.OnetrustActiveGroups;t!==void 0&&t.split(",").forEach(n=>{n===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener("load",()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust=="object"&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}}var m=(e=>(e.OneTrust="onetrust",e))(m||{});class a{constructor({eventName:t,interactiveEvent:i,customParameters:n}){this.eventName=t,this.interactiveEvent=i,this.customParameters=n}getGa4Parameters(t,i,n){let s={solution:t,experience_id:i,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getGTMParameters(t,i,n){let s={solution:t,experience_id:i,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return s=Object.assign(s,JSON.parse(JSON.stringify(this.customParameters))),s}getNexusParameters(){let t={interactive_event:this.interactiveEvent};return t=Object.assign(t,JSON.parse(JSON.stringify(this.customParameters))),t}}var f=(e=>(e.VARIANT="variant",e.CATEGORY_VARIANT="category_variant",e.GEOMETRY="geometry",e.CATEGORY_GEOMETRY="category_geometry",e.GLOBAL="global",e))(f||{}),d=(e=>(e.AR="ar",e.QR="qr",e.INFO="info",e.INSTRUCTIONS="instructions",e.DOWNLOAD="download",e.PREVIEW_CART="preview_cart",e.HOTSPOT_PANEL="hotspot_panel",e.SHARE_MODAL="share_modal",e.RESTART_MODAL="restart_modal",e.REMOVE_MODAL="remove_modal",e.LOAD_PRECONFIG_MODAL="load_preconfig_modal",e.MOVE_MODAL="move_modal",e.OUT_OF_STOCK_MODAL="out_of_stock_modal",e))(d||{}),I=(e=>(e.NETWORK="network",e.EXPERIENCE_CONFIG_ERROR="experience-config-error",e.SCENE_LOAD_ERROR="scene-load-error",e.INITIAL_SCENE_LOAD_ERROR="initial-scene-load-error",e.AUTHENTICATION_FAILED="authentication-failed",e))(I||{}),_=(e=>(e.AUTO="auto",e.BUTTON="button",e.HOTSPOT="hotspot",e.GESTURE="gesture",e))(_||{}),h=(e=>(e.USD="USD",e.EUR="EUR",e.GBP="GBP",e.CAD="CAD",e))(h||{}),N=(e=>(e.AR="ar",e.QR="qr",e.AR_WEBGL2="ar-webgl2",e.QR_WEBGL2="qr-webgl2",e))(N||{}),A=(e=>(e.AR_VIEW="ar_view",e.DIMENSION_TOGGLE="dimension_toggle",e.HOTSPOTS_TOGGLE="hotspots_toggle",e.HELP_TOGGLE="help_toggle",e.UTILITY_MENU_TOGGLE="utility_menu_toggle",e.HOTSPOT_ENTER="hotspot_enter",e.HOTSPOT_EXIT="hotspot_exit",e.SHARE="share",e.PDF_DOWNLOAD="pdf_download",e.COPY="copy",e.RESTART="restart",e.INSTRUCTIONS_SHOW="show_instructions",e.REVIEW_CART="review_cart",e.SHOP_NOW="shop_now",e.SUB_CATEGORY="sub_category",e.NEXT_STEP="next_step",e.PREVIOUS_STEP="previous_step",e))(A||{}),g=(e=>(e.ZOOM="zoom",e.ROTATE="rotate",e.PAN="pan",e))(g||{}),y=(e=>(e.CONFIGURATION="configuration",e.SCENE="scene",e.PRODUCT="product",e))(y||{}),C=(e=>(e.FACEBOOK="facebook",e.TWITTER="twitter",e.EMAIL="email",e.COPY_LINK="copy_link",e.WHATSAPP="whatsapp",e.LINKEDIN="linkedin",e))(C||{});class b extends a{constructor(t){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:t}})}}class k extends a{constructor(t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:t}})}}class V extends a{constructor(t,i){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i}})}}class $ extends a{static{this.MODULE_FAILED_ERRORS=I}constructor(t,i,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:t,load_time_ms:i,error_type:n}})}}class F extends a{constructor(t){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:t}})}}class U extends a{static{this.SUPPORT_TYPE=N}constructor(t){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:t}})}}class j extends a{static{this.BUTTON_TYPE=A}constructor(t,i){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:t,button_name:i}})}}class W extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class H extends a{static{this.PANEL_TYPE=d}static{this.TRIGGER_SOURCE=_}constructor(t,i,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:s,panel_type:i,trigger_source:n}})}}class J extends a{constructor(t){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:t}})}}class K extends a{static{this.ACTION_PERFORMED=g}constructor(t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:t}})}}class X extends a{static{this.INTERACTION_TYPE=g}constructor(t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:t}})}}class Z extends a{static{this.CURRENCY=h}constructor(t,i,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:r,value:i,currency:n,quantity:s}})}}class B extends a{constructor(t){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:t}})}}class Q extends a{static{this.CURRENCY=h}constructor(t,i,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:s,value:t,currency:i,quantity:n}})}}class Y extends a{static{this.VARIANT_CHANGE_TYPES=f}constructor(t,i){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:i,change_type:t}})}}class tt extends a{static{this.CONTENT_TYPES=y}static{this.SHARE_DESTINATIONS=C}constructor(t,i,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:n,content_type:t,share_destination:i}})}}class et extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class it extends a{static{this.CURRENCY=h}constructor(t,i,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:n,value:t,currency:i}})}}class nt extends a{constructor(t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:t}})}}class st extends a{constructor(t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:t}})}}class at extends a{constructor(t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:t}})}}class rt extends a{constructor(t,i,n){super({eventName:t,interactiveEvent:i,customParameters:n})}}/**
2
2
  * @license
3
3
  * Copyright (c) 2023 Epigraph LLC. All Rights Reserved.
4
4
  *
@@ -13,4 +13,4 @@
13
13
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
- */var R;const p=Symbol("analyticsPluginsMap");R=p;class rt{constructor(t,i){this[R]=new Map,this.__consentPlugin=null,t&&i&&(this.__consentPlugin=this.buildConsentPlugin(t,i)),window.addEventListener("epigraphAnalyticsConsentChange",this.__onConsentChangeFromEvent)}__onConsentChangeFromEvent(t){let i=t;this.__overrideConsent=i.detail.hasConsent;for(const n of this[p].values())this.__hasConsent()||n.setStatus(c.RESTRICTED)}addEventPlugin(t){this[p].has(t.getUniquePluginIdentifier())||(this[p].set(t.getUniquePluginIdentifier(),t),t.setupPlugin())}__hasConsent(){let t=!0;return this.__overrideConsent!==void 0?(t=this.__overrideConsent,t):(this.__consentPlugin&&(t=this.__consentPlugin.hasConsent()),t)}sendEvent(t){this[p].forEach(i=>{i.sendEvent(t,this.__hasConsent())})}buildConsentPlugin(t,i){return t.toLowerCase()===m.OneTrust.toLowerCase()?new P(i):null}}exports.ACTION_PERFORMED=g;exports.BUTTON_TYPE=y;exports.CONTENT_TYPES=A;exports.CURRENCY=h;exports.ConsentPluginNames=m;exports.EpigraphAddToFavouritesEvent=H;exports.EpigraphAnalytics=rt;exports.EpigraphArRequestedEvent=q;exports.EpigraphButtonClickEvent=j;exports.EpigraphChangeRateEvent=it;exports.EpigraphCheckoutEvent=tt;exports.EpigraphCompletionRateEvent=nt;exports.EpigraphContentSharedEvent=Y;exports.EpigraphConversionEvent=et;exports.EpigraphCustomEvent=at;exports.EpigraphEngagementRateEvent=st;exports.EpigraphItemAddedEvent=X;exports.EpigraphItemMovedEvent=Z;exports.EpigraphItemRemovedEvent=B;exports.EpigraphKeyboardInteractionEvent=J;exports.EpigraphModuleClosedEvent=F;exports.EpigraphModuleFailedEvent=V;exports.EpigraphModuleLoadingEvent=b;exports.EpigraphModuleReadyEvent=k;exports.EpigraphPanelClosedEvent=W;exports.EpigraphPanelOpenedEvent=U;exports.EpigraphSupportDetectedEvent=$;exports.EpigraphTouchInteractionEvent=K;exports.EpigraphVariantChangedEvent=Q;exports.GA4AnalyticsPlugin=z;exports.MODULE_FAILED_ERRORS=I;exports.NexusAnalyticsPlugin=M;exports.OneTrustConsentPlugin=P;exports.PANEL_TYPE=d;exports.SHARE_DESTINATIONS=C;exports.SUPPORT_TYPE=N;exports.TRIGGER_SOURCE=_;exports.VARIANT_CHANGE_TYPES=f;
16
+ */var R;const l=Symbol("analyticsPluginsMap");R=l;class ot{constructor(t,i){this[R]=new Map,this.__consentPlugin=null,t&&i&&(this.__consentPlugin=this.buildConsentPlugin(t,i)),window.addEventListener("epigraphAnalyticsConsentChange",this.__onConsentChangeFromEvent)}__onConsentChangeFromEvent(t){let i=t;this.__overrideConsent=i.detail.hasConsent;for(const n of this[l].values())this.__hasConsent()||n.setStatus(c.RESTRICTED)}addEventPlugin(t){this[l].has(t.getUniquePluginIdentifier())||(this[l].set(t.getUniquePluginIdentifier(),t),t.setupPlugin())}__hasConsent(){let t=!0;return this.__overrideConsent!==void 0?(t=this.__overrideConsent,t):(this.__consentPlugin&&(t=this.__consentPlugin.hasConsent()),t)}sendEvent(t){this[l].forEach(i=>{i.sendEvent(t,this.__hasConsent())})}buildConsentPlugin(t,i){return t.toLowerCase()===m.OneTrust.toLowerCase()?new P(i):null}}exports.ACTION_PERFORMED=g;exports.BUTTON_TYPE=A;exports.CONTENT_TYPES=y;exports.CURRENCY=h;exports.ConsentPluginNames=m;exports.EpigraphAddToFavouritesEvent=J;exports.EpigraphAnalytics=ot;exports.EpigraphArRequestedEvent=b;exports.EpigraphButtonClickEvent=j;exports.EpigraphChangeRateEvent=nt;exports.EpigraphCheckoutEvent=et;exports.EpigraphCompletionRateEvent=st;exports.EpigraphContentSharedEvent=tt;exports.EpigraphConversionEvent=it;exports.EpigraphCustomEvent=rt;exports.EpigraphEngagementRateEvent=at;exports.EpigraphItemAddedEvent=Z;exports.EpigraphItemMovedEvent=B;exports.EpigraphItemRemovedEvent=Q;exports.EpigraphKeyboardInteractionEvent=K;exports.EpigraphModuleClosedEvent=F;exports.EpigraphModuleFailedEvent=$;exports.EpigraphModuleLoadingEvent=k;exports.EpigraphModuleReadyEvent=V;exports.EpigraphPanelClosedEvent=H;exports.EpigraphPanelOpenedEvent=W;exports.EpigraphSupportDetectedEvent=U;exports.EpigraphTouchInteractionEvent=X;exports.EpigraphVariantChangedEvent=Y;exports.GA4AnalyticsPlugin=M;exports.MODULE_FAILED_ERRORS=I;exports.NexusAnalyticsPlugin=q;exports.OneTrustConsentPlugin=P;exports.PANEL_TYPE=d;exports.SHARE_DESTINATIONS=C;exports.SUPPORT_TYPE=N;exports.TRIGGER_SOURCE=_;exports.VARIANT_CHANGE_TYPES=f;
@@ -1,7 +1,8 @@
1
+ import { N as R } from "../../enums-CvOTKyNu.js";
1
2
  var c = /* @__PURE__ */ ((e) => (e.UNAVAILABLE = "unavailable", e.AVAILABLE = "available", e.RESTRICTED = "restricted", e))(c || {});
2
- const E = Symbol("data"), p = Symbol("next"), z = class N {
3
+ const E = Symbol("data"), _ = Symbol("next"), z = class N {
3
4
  constructor(t) {
4
- this[E] = t, this[p] = null;
5
+ this[E] = t, this[_] = null;
5
6
  }
6
7
  get data() {
7
8
  return this[E];
@@ -11,23 +12,23 @@ const E = Symbol("data"), p = Symbol("next"), z = class N {
11
12
  throw new Error(
12
13
  "This node is not an instance of the custom class 'Node'."
13
14
  );
14
- this[p] = t;
15
+ this[_] = t;
15
16
  }
16
17
  get next() {
17
- return this[p];
18
+ return this[_];
18
19
  }
19
20
  };
20
21
  let f = z;
21
- const _ = Symbol("head");
22
- class R {
22
+ const p = Symbol("head");
23
+ class D {
23
24
  constructor() {
24
- this[_] = null;
25
+ this[p] = null;
25
26
  }
26
27
  set head(t) {
27
- this[_] = t;
28
+ this[p] = t;
28
29
  }
29
30
  get head() {
30
- return this[_];
31
+ return this[p];
31
32
  }
32
33
  addToTail(t) {
33
34
  let i = this.head;
@@ -47,7 +48,7 @@ class R {
47
48
  const I = Symbol("queue"), d = Symbol("size");
48
49
  class y {
49
50
  constructor() {
50
- this[I] = new R(), this[d] = 0;
51
+ this[I] = new D(), this[d] = 0;
51
52
  }
52
53
  get queue() {
53
54
  return this[I];
@@ -86,7 +87,6 @@ class u {
86
87
  this._initializer = t;
87
88
  }
88
89
  notify(t, i) {
89
- console.log("Notifying", t, i);
90
90
  const n = {
91
91
  pluginName: this._pluginName,
92
92
  trackingId: this._trackingId,
@@ -100,7 +100,7 @@ class u {
100
100
  window.dispatchEvent(new CustomEvent("epg-notification", { detail: n }));
101
101
  }
102
102
  }
103
- class D {
103
+ class M {
104
104
  constructor({
105
105
  trackingID: t,
106
106
  experienceID: i,
@@ -374,7 +374,7 @@ class D {
374
374
  return null;
375
375
  }
376
376
  }
377
- class q {
377
+ class b {
378
378
  constructor({
379
379
  trackingID: t,
380
380
  experienceID: i,
@@ -382,9 +382,9 @@ class q {
382
382
  sessionId: s,
383
383
  xPath: r,
384
384
  verboseLogging: o = !1,
385
- sendToStaging: P = !1
385
+ baseUrl: P = R.PRODUCTION
386
386
  }) {
387
- this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = s, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = i, this.solution = n, this.verboseLogging = o, this.__queue = new y(), this.url = P ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = c.AVAILABLE, this.__epigraphNotifier = new u(
387
+ this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = s, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = i, this.solution = n, this.verboseLogging = o, this.__queue = new y(), this.url = `${P}/analytics/event`, this.__status = c.AVAILABLE, this.__epigraphNotifier = new u(
388
388
  this.pluginName,
389
389
  this.trackingID,
390
390
  this.experienceID,
@@ -511,8 +511,8 @@ class a {
511
511
  return t = Object.assign(t, JSON.parse(JSON.stringify(this.customParameters))), t;
512
512
  }
513
513
  }
514
- var C = /* @__PURE__ */ ((e) => (e.VARIANT = "variant", e.CATEGORY_VARIANT = "category_variant", e.GEOMETRY = "geometry", e.CATEGORY_GEOMETRY = "category_geometry", e.GLOBAL = "global", e))(C || {}), g = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.INFO = "info", e.DOWNLOAD = "download", e.PREVIEW_CART = "preview_cart", e.HOTSPOT_PANEL = "hotspot_panel", e.SHARE_MODAL = "share_modal", e.RESTART_MODAL = "restart_modal", e.REMOVE_MODAL = "remove_modal", e.LOAD_PRECONFIG_MODAL = "load_preconfig_modal", e.MOVE_MODAL = "move_modal", e.OUT_OF_STOCK_MODAL = "out_of_stock_modal", e))(g || {}), O = /* @__PURE__ */ ((e) => (e.NETWORK = "network", e.EXPERIENCE_CONFIG_ERROR = "experience-config-error", e.SCENE_LOAD_ERROR = "scene-load-error", e.INITIAL_SCENE_LOAD_ERROR = "initial-scene-load-error", e.AUTHENTICATION_FAILED = "authentication-failed", e))(O || {}), v = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e))(v || {}), l = /* @__PURE__ */ ((e) => (e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e))(l || {}), w = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e))(w || {}), L = /* @__PURE__ */ ((e) => (e.AR_VIEW = "ar_view", e.DIMENSION_TOGGLE = "dimension_toggle", e.HOTSPOTS_TOGGLE = "hotspots_toggle", e.HELP_TOGGLE = "help_toggle", e.UTILITY_MENU_TOGGLE = "utility_menu_toggle", e.HOTSPOT_ENTER = "hotspot_enter", e.HOTSPOT_EXIT = "hotspot_exit", e.SHARE = "share", e.PDF_DOWNLOAD = "pdf_download", e.COPY = "copy", e.RESTART = "restart", e.INSTRUCTIONS_SHOW = "show_instructions", e.REVIEW_CART = "review_cart", e.SHOP_NOW = "shop_now", e.SUB_CATEGORY = "sub_category", e.NEXT_STEP = "next_step", e.PREVIOUS_STEP = "previous_step", e))(L || {}), m = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e))(m || {}), S = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(S || {}), x = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(x || {});
515
- class M extends a {
514
+ var C = /* @__PURE__ */ ((e) => (e.VARIANT = "variant", e.CATEGORY_VARIANT = "category_variant", e.GEOMETRY = "geometry", e.CATEGORY_GEOMETRY = "category_geometry", e.GLOBAL = "global", e))(C || {}), g = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.INFO = "info", e.INSTRUCTIONS = "instructions", e.DOWNLOAD = "download", e.PREVIEW_CART = "preview_cart", e.HOTSPOT_PANEL = "hotspot_panel", e.SHARE_MODAL = "share_modal", e.RESTART_MODAL = "restart_modal", e.REMOVE_MODAL = "remove_modal", e.LOAD_PRECONFIG_MODAL = "load_preconfig_modal", e.MOVE_MODAL = "move_modal", e.OUT_OF_STOCK_MODAL = "out_of_stock_modal", e))(g || {}), O = /* @__PURE__ */ ((e) => (e.NETWORK = "network", e.EXPERIENCE_CONFIG_ERROR = "experience-config-error", e.SCENE_LOAD_ERROR = "scene-load-error", e.INITIAL_SCENE_LOAD_ERROR = "initial-scene-load-error", e.AUTHENTICATION_FAILED = "authentication-failed", e))(O || {}), v = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e))(v || {}), l = /* @__PURE__ */ ((e) => (e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e))(l || {}), w = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e))(w || {}), L = /* @__PURE__ */ ((e) => (e.AR_VIEW = "ar_view", e.DIMENSION_TOGGLE = "dimension_toggle", e.HOTSPOTS_TOGGLE = "hotspots_toggle", e.HELP_TOGGLE = "help_toggle", e.UTILITY_MENU_TOGGLE = "utility_menu_toggle", e.HOTSPOT_ENTER = "hotspot_enter", e.HOTSPOT_EXIT = "hotspot_exit", e.SHARE = "share", e.PDF_DOWNLOAD = "pdf_download", e.COPY = "copy", e.RESTART = "restart", e.INSTRUCTIONS_SHOW = "show_instructions", e.REVIEW_CART = "review_cart", e.SHOP_NOW = "shop_now", e.SUB_CATEGORY = "sub_category", e.NEXT_STEP = "next_step", e.PREVIOUS_STEP = "previous_step", e))(L || {}), m = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e))(m || {}), S = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(S || {}), x = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(x || {});
515
+ class k extends a {
516
516
  constructor(t) {
517
517
  super({
518
518
  eventName: "epigraph_ar_requested",
@@ -523,7 +523,7 @@ class M extends a {
523
523
  });
524
524
  }
525
525
  }
526
- class b extends a {
526
+ class $ extends a {
527
527
  constructor(t) {
528
528
  super({
529
529
  eventName: "epigraph_module_loading",
@@ -534,7 +534,7 @@ class b extends a {
534
534
  });
535
535
  }
536
536
  }
537
- class k extends a {
537
+ class V extends a {
538
538
  constructor(t, i) {
539
539
  super({
540
540
  eventName: "epigraph_module_ready",
@@ -546,7 +546,7 @@ class k extends a {
546
546
  });
547
547
  }
548
548
  }
549
- class $ extends a {
549
+ class F extends a {
550
550
  static {
551
551
  this.MODULE_FAILED_ERRORS = O;
552
552
  }
@@ -562,7 +562,7 @@ class $ extends a {
562
562
  });
563
563
  }
564
564
  }
565
- class V extends a {
565
+ class j extends a {
566
566
  constructor(t) {
567
567
  super({
568
568
  eventName: "epigraph_module_closed",
@@ -573,7 +573,7 @@ class V extends a {
573
573
  });
574
574
  }
575
575
  }
576
- class F extends a {
576
+ class W extends a {
577
577
  static {
578
578
  this.SUPPORT_TYPE = w;
579
579
  }
@@ -587,7 +587,7 @@ class F extends a {
587
587
  });
588
588
  }
589
589
  }
590
- class j extends a {
590
+ class U extends a {
591
591
  static {
592
592
  this.BUTTON_TYPE = L;
593
593
  }
@@ -602,7 +602,7 @@ class j extends a {
602
602
  });
603
603
  }
604
604
  }
605
- class W extends a {
605
+ class J extends a {
606
606
  static {
607
607
  this.PANEL_TYPE = g;
608
608
  }
@@ -621,7 +621,7 @@ class W extends a {
621
621
  });
622
622
  }
623
623
  }
624
- class J extends a {
624
+ class H extends a {
625
625
  static {
626
626
  this.PANEL_TYPE = g;
627
627
  }
@@ -640,7 +640,7 @@ class J extends a {
640
640
  });
641
641
  }
642
642
  }
643
- class U extends a {
643
+ class K extends a {
644
644
  constructor(t) {
645
645
  super({
646
646
  eventName: "epigraph_add_to_favourites",
@@ -651,7 +651,7 @@ class U extends a {
651
651
  });
652
652
  }
653
653
  }
654
- class H extends a {
654
+ class X extends a {
655
655
  static {
656
656
  this.ACTION_PERFORMED = m;
657
657
  }
@@ -665,7 +665,7 @@ class H extends a {
665
665
  });
666
666
  }
667
667
  }
668
- class K extends a {
668
+ class Z extends a {
669
669
  static {
670
670
  this.INTERACTION_TYPE = m;
671
671
  }
@@ -679,7 +679,7 @@ class K extends a {
679
679
  });
680
680
  }
681
681
  }
682
- class X extends a {
682
+ class Q extends a {
683
683
  static {
684
684
  this.CURRENCY = l;
685
685
  }
@@ -696,7 +696,7 @@ class X extends a {
696
696
  });
697
697
  }
698
698
  }
699
- class Z extends a {
699
+ class B extends a {
700
700
  constructor(t) {
701
701
  super({
702
702
  eventName: "epigraph_item_moved",
@@ -707,7 +707,7 @@ class Z extends a {
707
707
  });
708
708
  }
709
709
  }
710
- class Q extends a {
710
+ class Y extends a {
711
711
  static {
712
712
  this.CURRENCY = l;
713
713
  }
@@ -724,7 +724,7 @@ class Q extends a {
724
724
  });
725
725
  }
726
726
  }
727
- class B extends a {
727
+ class tt extends a {
728
728
  static {
729
729
  this.VARIANT_CHANGE_TYPES = C;
730
730
  }
@@ -739,7 +739,7 @@ class B extends a {
739
739
  });
740
740
  }
741
741
  }
742
- class Y extends a {
742
+ class et extends a {
743
743
  static {
744
744
  this.CONTENT_TYPES = S;
745
745
  }
@@ -758,7 +758,7 @@ class Y extends a {
758
758
  });
759
759
  }
760
760
  }
761
- class tt extends a {
761
+ class it extends a {
762
762
  static {
763
763
  this.CURRENCY = l;
764
764
  }
@@ -774,7 +774,7 @@ class tt extends a {
774
774
  });
775
775
  }
776
776
  }
777
- class et extends a {
777
+ class nt extends a {
778
778
  static {
779
779
  this.CURRENCY = l;
780
780
  }
@@ -790,7 +790,7 @@ class et extends a {
790
790
  });
791
791
  }
792
792
  }
793
- class it extends a {
793
+ class st extends a {
794
794
  constructor(t) {
795
795
  super({
796
796
  eventName: "epigraph_changeRate",
@@ -801,7 +801,7 @@ class it extends a {
801
801
  });
802
802
  }
803
803
  }
804
- class nt extends a {
804
+ class at extends a {
805
805
  constructor(t) {
806
806
  super({
807
807
  eventName: "epigraph_completionRate",
@@ -812,7 +812,7 @@ class nt extends a {
812
812
  });
813
813
  }
814
814
  }
815
- class st extends a {
815
+ class rt extends a {
816
816
  constructor(t) {
817
817
  super({
818
818
  eventName: "epigraph_engagementRate",
@@ -823,7 +823,7 @@ class st extends a {
823
823
  });
824
824
  }
825
825
  }
826
- class at extends a {
826
+ class ot extends a {
827
827
  constructor(t, i, n) {
828
828
  super({
829
829
  eventName: t,
@@ -851,7 +851,7 @@ class at extends a {
851
851
  var T;
852
852
  const h = Symbol("analyticsPluginsMap");
853
853
  T = h;
854
- class rt {
854
+ class ut {
855
855
  constructor(t, i) {
856
856
  this[T] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && i && (this.__consentPlugin = this.buildConsentPlugin(t, i)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
857
857
  }
@@ -910,33 +910,33 @@ export {
910
910
  S as CONTENT_TYPES,
911
911
  l as CURRENCY,
912
912
  A as ConsentPluginNames,
913
- U as EpigraphAddToFavouritesEvent,
914
- rt as EpigraphAnalytics,
915
- M as EpigraphArRequestedEvent,
916
- j as EpigraphButtonClickEvent,
917
- it as EpigraphChangeRateEvent,
918
- tt as EpigraphCheckoutEvent,
919
- nt as EpigraphCompletionRateEvent,
920
- Y as EpigraphContentSharedEvent,
921
- et as EpigraphConversionEvent,
922
- at as EpigraphCustomEvent,
923
- st as EpigraphEngagementRateEvent,
924
- X as EpigraphItemAddedEvent,
925
- Z as EpigraphItemMovedEvent,
926
- Q as EpigraphItemRemovedEvent,
927
- H as EpigraphKeyboardInteractionEvent,
928
- V as EpigraphModuleClosedEvent,
929
- $ as EpigraphModuleFailedEvent,
930
- b as EpigraphModuleLoadingEvent,
931
- k as EpigraphModuleReadyEvent,
932
- J as EpigraphPanelClosedEvent,
933
- W as EpigraphPanelOpenedEvent,
934
- F as EpigraphSupportDetectedEvent,
935
- K as EpigraphTouchInteractionEvent,
936
- B as EpigraphVariantChangedEvent,
937
- D as GA4AnalyticsPlugin,
913
+ K as EpigraphAddToFavouritesEvent,
914
+ ut as EpigraphAnalytics,
915
+ k as EpigraphArRequestedEvent,
916
+ U as EpigraphButtonClickEvent,
917
+ st as EpigraphChangeRateEvent,
918
+ it as EpigraphCheckoutEvent,
919
+ at as EpigraphCompletionRateEvent,
920
+ et as EpigraphContentSharedEvent,
921
+ nt as EpigraphConversionEvent,
922
+ ot as EpigraphCustomEvent,
923
+ rt as EpigraphEngagementRateEvent,
924
+ Q as EpigraphItemAddedEvent,
925
+ B as EpigraphItemMovedEvent,
926
+ Y as EpigraphItemRemovedEvent,
927
+ X as EpigraphKeyboardInteractionEvent,
928
+ j as EpigraphModuleClosedEvent,
929
+ F as EpigraphModuleFailedEvent,
930
+ $ as EpigraphModuleLoadingEvent,
931
+ V as EpigraphModuleReadyEvent,
932
+ H as EpigraphPanelClosedEvent,
933
+ J as EpigraphPanelOpenedEvent,
934
+ W as EpigraphSupportDetectedEvent,
935
+ Z as EpigraphTouchInteractionEvent,
936
+ tt as EpigraphVariantChangedEvent,
937
+ M as GA4AnalyticsPlugin,
938
938
  O as MODULE_FAILED_ERRORS,
939
- q as NexusAnalyticsPlugin,
939
+ b as NexusAnalyticsPlugin,
940
940
  G as OneTrustConsentPlugin,
941
941
  g as PANEL_TYPE,
942
942
  x as SHARE_DESTINATIONS,
@@ -36,6 +36,7 @@ export declare enum PANEL_TYPE {
36
36
  AR = "ar",
37
37
  QR = "qr",
38
38
  INFO = "info",
39
+ INSTRUCTIONS = "instructions",
39
40
  DOWNLOAD = "download",
40
41
  PREVIEW_CART = "preview_cart",
41
42
  HOTSPOT_PANEL = "hotspot_panel",
@@ -119,7 +120,7 @@ export declare class EpigraphModuleReadyEvent extends BaseAnalyticsEvent {
119
120
  }
120
121
  export declare class EpigraphModuleFailedEvent extends BaseAnalyticsEvent {
121
122
  static readonly MODULE_FAILED_ERRORS: typeof MODULE_FAILED_ERRORS;
122
- constructor(isPreConfig: boolean, loadTimeMs: number, errorType: string);
123
+ constructor(isPreConfig: boolean, loadTimeMs: number, errorType: MODULE_FAILED_ERRORS | string);
123
124
  }
124
125
  export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
125
126
  constructor(items: IAnalyticsParameterItems);
@@ -166,12 +167,12 @@ export declare class EpigraphItemRemovedEvent extends BaseAnalyticsEvent {
166
167
  }
167
168
  export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
168
169
  static readonly VARIANT_CHANGE_TYPES: typeof VARIANT_CHANGE_TYPES;
169
- constructor(changeType: string, items: IAnalyticsParameterItems);
170
+ constructor(changeType: VARIANT_CHANGE_TYPES, items: IAnalyticsParameterItems);
170
171
  }
171
172
  export declare class EpigraphContentSharedEvent extends BaseAnalyticsEvent {
172
173
  static readonly CONTENT_TYPES: typeof CONTENT_TYPES;
173
174
  static readonly SHARE_DESTINATIONS: typeof SHARE_DESTINATIONS;
174
- constructor(contentType: string, shareDestination: string, items: IAnalyticsParameterItems);
175
+ constructor(contentType: CONTENT_TYPES, shareDestination: SHARE_DESTINATIONS, items: IAnalyticsParameterItems);
175
176
  }
176
177
  export declare class EpigraphCheckoutEvent extends BaseAnalyticsEvent {
177
178
  static readonly CURRENCY: typeof CURRENCY;
@@ -1,5 +1,6 @@
1
1
  import { AnalyticsStatus, IAnalyticsPlugin } from '../analytics-plugin-interface';
2
2
  import { IAnalyticsEvent } from '../analytics-event-interface';
3
+ import { NexusEndpoints } from '../../../Epigraph/constants/enums.ts';
3
4
  export declare class NexusAnalyticsPlugin implements IAnalyticsPlugin {
4
5
  name: string;
5
6
  pluginName: string;
@@ -14,14 +15,14 @@ export declare class NexusAnalyticsPlugin implements IAnalyticsPlugin {
14
15
  private __status;
15
16
  private __sentEventCount;
16
17
  private __epigraphNotifier;
17
- constructor({ trackingID, experienceID, solution, sessionId, xPath, verboseLogging, sendToStaging }: {
18
+ constructor({ trackingID, experienceID, solution, sessionId, xPath, verboseLogging, baseUrl }: {
18
19
  trackingID: string;
19
20
  experienceID: string;
20
21
  solution: string;
21
22
  sessionId: string;
22
23
  xPath: string;
23
24
  verboseLogging?: boolean;
24
- sendToStaging?: boolean;
25
+ baseUrl?: NexusEndpoints;
25
26
  });
26
27
  getStatus(): AnalyticsStatus;
27
28
  setStatus(newStatus: AnalyticsStatus): void;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../EpigraphResultFactory/epigraphResultFactory.cjs");class E{constructor(i="https://api.myepigraph.com/api/",t,e,r="",s="",a="v1/"){this.epigraphXPath="",this.epigraphComponentVersion=r,this.epigraphSessionId=e,this.epigraphXPath=s,this.baseUrl=i+a,this.epgLocation=t}async getButtonBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorByExperienceId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator/experience_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorByClientAccessKey(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator/client_access_key/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorLiteByExperienceId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator-lite/experience_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorLiteByProjectId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator-lite/project_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async postExperienceSaveAndShare(i,t){const e=`experience/${i}/save`,r=this.buildNexusUrl(e),s={save_data:JSON.stringify(t)},a=new Headers;return a.set("Content-Type","application/json"),await this.callNexusAPI(r,"POST",JSON.stringify(s),a)}async getExperienceSaveAndShare(i,t){const e=`experience/${i}/save/${t}`,r=this.buildNexusUrl(e);return await this.callNexusAPI(r,"GET")}async callNexusAPI(i,t="GET",e,r=new Headers){r=this.addRequiredHeaders(r);const s={method:t,body:e,headers:r};try{const a=await fetch(i,s),c=await a.json();if(!a.ok){let u="Unable to retrieve configurator experience";return c.message&&(u=c.message),Promise.resolve(o.failureResult(c,a.status,u))}return Promise.resolve(o.successResult(c,a.status))}catch{return Promise.resolve(o.failureResult({},500,"Unknown error"))}}buildNexusUrl(i,t={}){let e=new URL(this.baseUrl);e.pathname+=i;for(const[r,s]of Object.entries(t))e.searchParams.set(r,s);return e}addRequiredHeaders(i){return i.has("accept")||i.set("accept","application/json"),i.has("EPG-Location")||i.set("EPG-location",this.epgLocation),i.has("EPG-Session-ID")||i.set("EPG-Session-ID",this.epigraphSessionId),i.has("EPG-XPATH")||i.set("EPG-XPATH",this.epigraphXPath),i.has("EPG-Version")||i.set("EPG-Version",this.epigraphComponentVersion),i}}var l=(n=>(n.PRODUCTION="https://api.myepigraph.com/api/",n.STAGING="https://nexus.epigraph.dev/api/",n.LOCAL="https://nexus.test/api/",n))(l||{}),p=(n=>(n.CLIENT_ACCESS_KEY="client_access_key",n.EXPERIENCE_ID="experience_id",n.PROJECT_ID="project_id",n.SKU="sku",n.SHOPIFY_VARIANT_ID="shopify_variant_id",n.UPC="upc",n.ASIN="asin",n))(p||{}),h=(n=>(n.BUTTON="experience/button",n.VIEWER="experience/viewer",n.TOUR="experience/tour",n.CUSTOMIZER="experience/customizer",n.CONFIGURATOR="experience/configurator",n.CONFIGURATOR_LITE="experience/configurator-lite",n.EXPERIENCE="experience",n.SAVE="save",n))(h||{}),y=(n=>(n.V1="v1/",n))(y||{}),x=(n=>(n.GET="GET",n.POST="POST",n.PUT="PUT",n.DELETE="DELETE",n))(x||{});exports.EpigraphNexusAPI=E;exports.HTTPMethod=x;exports.NexusAPIResourceIdentifier=p;exports.NexusAPIRoutes=h;exports.NexusAPIVersions=y;exports.NexusEndpoints=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../enums-1vqWxJ0i.cjs"),c=require("../EpigraphResultFactory/epigraphResultFactory.cjs");class ${constructor(i=h.NexusEndpoints.PRODUCTION,t,e,r="",s="",a="v1/"){this.epigraphXPath="",this.epigraphComponentVersion=r,this.epigraphSessionId=e,this.epigraphXPath=s,this.baseUrl=i+a,this.epgLocation=t}async getButtonBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getButtonByUuid(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/button/uuid/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getViewerByUuid(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/viewer/uuid/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getTourByUuid(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/tour/uuid/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getCustomizerBySku(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/customizer/sku/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getCustomizerByShopifyVariantId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/customizer/shopify_variant_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getCustomizerByUpc(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/customizer/upc/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getCustomizerByAsin(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/customizer/asin/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getCustomizerByUuid(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/customizer/uuid/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorByExperienceId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator/experience_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorByClientAccessKey(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator/client_access_key/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorLiteByExperienceId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator-lite/experience_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async getConfiguratorLiteByProjectId(i,t=""){const e={};t!==""&&(e.version_id=t);const r=`experience/configurator-lite/project_id/${i}`,s=this.buildNexusUrl(r,e);return await this.callNexusAPI(s,"GET")}async postExperienceSaveAndShare(i,t){const e=`experience/${i}/save`,r=this.buildNexusUrl(e),s={save_data:JSON.stringify(t)},a=new Headers;return a.set("Content-Type","application/json"),await this.callNexusAPI(r,"POST",JSON.stringify(s),a)}async getExperienceSaveAndShare(i,t){const e=`experience/${i}/save/${t}`,r=this.buildNexusUrl(e);return await this.callNexusAPI(r,"GET")}async callNexusAPI(i,t="GET",e,r=new Headers){r=this.addRequiredHeaders(r);const s={method:t,body:e,headers:r};try{const a=await fetch(i,s),u=await a.json();if(!a.ok){let o="Unable to retrieve configurator experience";return u.message&&(o=u.message),Promise.resolve(c.failureResult(u,a.status,o))}return Promise.resolve(c.successResult(u,a.status))}catch{return Promise.resolve(c.failureResult({},500,"Unknown error"))}}buildNexusUrl(i,t={}){let e=new URL(this.baseUrl);e.pathname+=i;for(const[r,s]of Object.entries(t))e.searchParams.set(r,s);return e}addRequiredHeaders(i){return i.has("accept")||i.set("accept","application/json"),i.has("EPG-Location")||i.set("EPG-location",this.epgLocation),i.has("EPG-Session-ID")||i.set("EPG-Session-ID",this.epigraphSessionId),i.has("EPG-XPATH")||i.set("EPG-XPATH",this.epigraphXPath),i.has("EPG-Version")||i.set("EPG-Version",this.epigraphComponentVersion),i}}var l=(n=>(n.CLIENT_ACCESS_KEY="client_access_key",n.EXPERIENCE_ID="experience_id",n.PROJECT_ID="project_id",n.SKU="sku",n.SHOPIFY_VARIANT_ID="shopify_variant_id",n.UPC="upc",n.ASIN="asin",n.UUID="uuid",n))(l||{}),p=(n=>(n.BUTTON="experience/button",n.VIEWER="experience/viewer",n.TOUR="experience/tour",n.CUSTOMIZER="experience/customizer",n.CONFIGURATOR="experience/configurator",n.CONFIGURATOR_LITE="experience/configurator-lite",n.EXPERIENCE="experience",n.SAVE="save",n))(p||{}),y=(n=>(n.V1="v1/",n))(y||{}),x=(n=>(n.GET="GET",n.POST="POST",n.PUT="PUT",n.DELETE="DELETE",n))(x||{});exports.EpigraphNexusAPI=$;exports.HTTPMethod=x;exports.NexusAPIResourceIdentifier=l;exports.NexusAPIRoutes=p;exports.NexusAPIVersions=y;
@@ -1,3 +1,4 @@
1
+ import { NexusEndpoints } from '../../Epigraph/constants/enums.ts';
1
2
  import { Result } from '../EpigraphResultFactory/epigraphResultFactory.ts';
2
3
  export declare class EpigraphNexusAPI {
3
4
  private readonly baseUrl;
@@ -24,6 +25,7 @@ export declare class EpigraphNexusAPI {
24
25
  getButtonByShopifyVariantId(shopify_variant_id: string, versionId?: string): Promise<Result>;
25
26
  getButtonByUpc(upc: string, versionId?: string): Promise<Result>;
26
27
  getButtonByAsin(asin: string, versionId?: string): Promise<Result>;
28
+ getButtonByUuid(uuid: string, versionId?: string): Promise<Result>;
27
29
  /*******************************************************************************************************************
28
30
  * Epigraph Viewer API Calls *
29
31
  ******************************************************************************************************************/
@@ -31,6 +33,7 @@ export declare class EpigraphNexusAPI {
31
33
  getViewerByShopifyVariantId(shopify_variant_id: string, versionId?: string): Promise<Result>;
32
34
  getViewerByUpc(upc: string, versionId?: string): Promise<Result>;
33
35
  getViewerByAsin(asin: string, versionId?: string): Promise<Result>;
36
+ getViewerByUuid(uuid: string, versionId?: string): Promise<Result>;
34
37
  /*******************************************************************************************************************
35
38
  * Epigraph Tour API Calls *
36
39
  ******************************************************************************************************************/
@@ -38,6 +41,15 @@ export declare class EpigraphNexusAPI {
38
41
  getTourByShopifyVariantId(shopify_variant_id: string, versionId?: string): Promise<Result>;
39
42
  getTourByUpc(upc: string, versionId?: string): Promise<Result>;
40
43
  getTourByAsin(asin: string, versionId?: string): Promise<Result>;
44
+ getTourByUuid(uuid: string, versionId?: string): Promise<Result>;
45
+ /*******************************************************************************************************************
46
+ * Epigraph Customizer API Calls *
47
+ ******************************************************************************************************************/
48
+ getCustomizerBySku(sku: string, versionId?: string): Promise<Result>;
49
+ getCustomizerByShopifyVariantId(shopify_variant_id: string, versionId?: string): Promise<Result>;
50
+ getCustomizerByUpc(upc: string, versionId?: string): Promise<Result>;
51
+ getCustomizerByAsin(asin: string, versionId?: string): Promise<Result>;
52
+ getCustomizerByUuid(uuid: string, versionId?: string): Promise<Result>;
41
53
  /*******************************************************************************************************************
42
54
  * Configurator API Calls *
43
55
  ******************************************************************************************************************/
@@ -76,11 +88,6 @@ export declare class EpigraphNexusAPI {
76
88
  private addRequiredHeaders;
77
89
  }
78
90
  export type QueryParameters = Record<string, any>;
79
- export declare enum NexusEndpoints {
80
- PRODUCTION = "https://api.myepigraph.com/api/",
81
- STAGING = "https://nexus.epigraph.dev/api/",
82
- LOCAL = "https://nexus.test/api/"
83
- }
84
91
  export declare enum NexusAPIResourceIdentifier {
85
92
  CLIENT_ACCESS_KEY = "client_access_key",
86
93
  EXPERIENCE_ID = "experience_id",
@@ -88,7 +95,8 @@ export declare enum NexusAPIResourceIdentifier {
88
95
  SKU = "sku",
89
96
  SHOPIFY_VARIANT_ID = "shopify_variant_id",
90
97
  UPC = "upc",
91
- ASIN = "asin"
98
+ ASIN = "asin",
99
+ UUID = "uuid"
92
100
  }
93
101
  export declare enum NexusAPIRoutes {
94
102
  BUTTON = "experience/button",
@@ -1,4 +1,5 @@
1
- import { failureResult as u, successResult as l } from "../EpigraphResultFactory/epigraphResultFactory.js";
1
+ import { N as l } from "../../enums-CvOTKyNu.js";
2
+ import { failureResult as o, successResult as p } from "../EpigraphResultFactory/epigraphResultFactory.js";
2
3
  class P {
3
4
  /**
4
5
  * Constructs a new instance of the class with the provided parameters.
@@ -11,7 +12,7 @@ class P {
11
12
  * @param {NexusAPIVersions} [apiVersion=NexusAPIVersions.V1] - The API version to use, defaulting to version 1.
12
13
  * @return {void}
13
14
  */
14
- constructor(i = "https://api.myepigraph.com/api/", t, e, r = "", s = "", a = "v1/") {
15
+ constructor(i = l.PRODUCTION, t, e, r = "", s = "", a = "v1/") {
15
16
  this.epigraphXPath = "", this.epigraphComponentVersion = r, this.epigraphSessionId = e, this.epigraphXPath = s, this.baseUrl = i + a, this.epgLocation = t;
16
17
  }
17
18
  /*******************************************************************************************************************
@@ -69,6 +70,19 @@ class P {
69
70
  /* GET */
70
71
  );
71
72
  }
73
+ async getButtonByUuid(i, t = "") {
74
+ const e = {};
75
+ t !== "" && (e.version_id = t);
76
+ const r = `experience/button/uuid/${i}`, s = this.buildNexusUrl(
77
+ r,
78
+ e
79
+ );
80
+ return await this.callNexusAPI(
81
+ s,
82
+ "GET"
83
+ /* GET */
84
+ );
85
+ }
72
86
  /*******************************************************************************************************************
73
87
  * Epigraph Viewer API Calls *
74
88
  ******************************************************************************************************************/
@@ -124,6 +138,19 @@ class P {
124
138
  /* GET */
125
139
  );
126
140
  }
141
+ async getViewerByUuid(i, t = "") {
142
+ const e = {};
143
+ t !== "" && (e.version_id = t);
144
+ const r = `experience/viewer/uuid/${i}`, s = this.buildNexusUrl(
145
+ r,
146
+ e
147
+ );
148
+ return await this.callNexusAPI(
149
+ s,
150
+ "GET"
151
+ /* GET */
152
+ );
153
+ }
127
154
  /*******************************************************************************************************************
128
155
  * Epigraph Tour API Calls *
129
156
  ******************************************************************************************************************/
@@ -179,6 +206,87 @@ class P {
179
206
  /* GET */
180
207
  );
181
208
  }
209
+ async getTourByUuid(i, t = "") {
210
+ const e = {};
211
+ t !== "" && (e.version_id = t);
212
+ const r = `experience/tour/uuid/${i}`, s = this.buildNexusUrl(
213
+ r,
214
+ e
215
+ );
216
+ return await this.callNexusAPI(
217
+ s,
218
+ "GET"
219
+ /* GET */
220
+ );
221
+ }
222
+ /*******************************************************************************************************************
223
+ * Epigraph Customizer API Calls *
224
+ ******************************************************************************************************************/
225
+ async getCustomizerBySku(i, t = "") {
226
+ const e = {};
227
+ t !== "" && (e.version_id = t);
228
+ const r = `experience/customizer/sku/${i}`, s = this.buildNexusUrl(
229
+ r,
230
+ e
231
+ );
232
+ return await this.callNexusAPI(
233
+ s,
234
+ "GET"
235
+ /* GET */
236
+ );
237
+ }
238
+ async getCustomizerByShopifyVariantId(i, t = "") {
239
+ const e = {};
240
+ t !== "" && (e.version_id = t);
241
+ const r = `experience/customizer/shopify_variant_id/${i}`, s = this.buildNexusUrl(
242
+ r,
243
+ e
244
+ );
245
+ return await this.callNexusAPI(
246
+ s,
247
+ "GET"
248
+ /* GET */
249
+ );
250
+ }
251
+ async getCustomizerByUpc(i, t = "") {
252
+ const e = {};
253
+ t !== "" && (e.version_id = t);
254
+ const r = `experience/customizer/upc/${i}`, s = this.buildNexusUrl(
255
+ r,
256
+ e
257
+ );
258
+ return await this.callNexusAPI(
259
+ s,
260
+ "GET"
261
+ /* GET */
262
+ );
263
+ }
264
+ async getCustomizerByAsin(i, t = "") {
265
+ const e = {};
266
+ t !== "" && (e.version_id = t);
267
+ const r = `experience/customizer/asin/${i}`, s = this.buildNexusUrl(
268
+ r,
269
+ e
270
+ );
271
+ return await this.callNexusAPI(
272
+ s,
273
+ "GET"
274
+ /* GET */
275
+ );
276
+ }
277
+ async getCustomizerByUuid(i, t = "") {
278
+ const e = {};
279
+ t !== "" && (e.version_id = t);
280
+ const r = `experience/customizer/uuid/${i}`, s = this.buildNexusUrl(
281
+ r,
282
+ e
283
+ );
284
+ return await this.callNexusAPI(
285
+ s,
286
+ "GET"
287
+ /* GET */
288
+ );
289
+ }
182
290
  /*******************************************************************************************************************
183
291
  * Configurator API Calls *
184
292
  ******************************************************************************************************************/
@@ -276,16 +384,16 @@ class P {
276
384
  headers: r
277
385
  };
278
386
  try {
279
- const a = await fetch(i, s), c = await a.json();
387
+ const a = await fetch(i, s), u = await a.json();
280
388
  if (!a.ok) {
281
- let o = "Unable to retrieve configurator experience";
282
- return c.message && (o = c.message), Promise.resolve(
283
- u(c, a.status, o)
389
+ let c = "Unable to retrieve configurator experience";
390
+ return u.message && (c = u.message), Promise.resolve(
391
+ o(u, a.status, c)
284
392
  );
285
393
  }
286
- return Promise.resolve(l(c, a.status));
394
+ return Promise.resolve(p(u, a.status));
287
395
  } catch {
288
- return Promise.resolve(u({}, 500, "Unknown error"));
396
+ return Promise.resolve(o({}, 500, "Unknown error"));
289
397
  }
290
398
  }
291
399
  buildNexusUrl(i, t = {}) {
@@ -307,12 +415,11 @@ class P {
307
415
  return i.has("accept") || i.set("accept", "application/json"), i.has("EPG-Location") || i.set("EPG-location", this.epgLocation), i.has("EPG-Session-ID") || i.set("EPG-Session-ID", this.epigraphSessionId), i.has("EPG-XPATH") || i.set("EPG-XPATH", this.epigraphXPath), i.has("EPG-Version") || i.set("EPG-Version", this.epigraphComponentVersion), i;
308
416
  }
309
417
  }
310
- var p = /* @__PURE__ */ ((n) => (n.PRODUCTION = "https://api.myepigraph.com/api/", n.STAGING = "https://nexus.epigraph.dev/api/", n.LOCAL = "https://nexus.test/api/", n))(p || {}), h = /* @__PURE__ */ ((n) => (n.CLIENT_ACCESS_KEY = "client_access_key", n.EXPERIENCE_ID = "experience_id", n.PROJECT_ID = "project_id", n.SKU = "sku", n.SHOPIFY_VARIANT_ID = "shopify_variant_id", n.UPC = "upc", n.ASIN = "asin", n))(h || {}), y = /* @__PURE__ */ ((n) => (n.BUTTON = "experience/button", n.VIEWER = "experience/viewer", n.TOUR = "experience/tour", n.CUSTOMIZER = "experience/customizer", n.CONFIGURATOR = "experience/configurator", n.CONFIGURATOR_LITE = "experience/configurator-lite", n.EXPERIENCE = "experience", n.SAVE = "save", n))(y || {}), x = /* @__PURE__ */ ((n) => (n.V1 = "v1/", n))(x || {}), $ = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.DELETE = "DELETE", n))($ || {});
418
+ var y = /* @__PURE__ */ ((n) => (n.CLIENT_ACCESS_KEY = "client_access_key", n.EXPERIENCE_ID = "experience_id", n.PROJECT_ID = "project_id", n.SKU = "sku", n.SHOPIFY_VARIANT_ID = "shopify_variant_id", n.UPC = "upc", n.ASIN = "asin", n.UUID = "uuid", n))(y || {}), x = /* @__PURE__ */ ((n) => (n.BUTTON = "experience/button", n.VIEWER = "experience/viewer", n.TOUR = "experience/tour", n.CUSTOMIZER = "experience/customizer", n.CONFIGURATOR = "experience/configurator", n.CONFIGURATOR_LITE = "experience/configurator-lite", n.EXPERIENCE = "experience", n.SAVE = "save", n))(x || {}), h = /* @__PURE__ */ ((n) => (n.V1 = "v1/", n))(h || {}), $ = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.DELETE = "DELETE", n))($ || {});
311
419
  export {
312
420
  P as EpigraphNexusAPI,
313
421
  $ as HTTPMethod,
314
- h as NexusAPIResourceIdentifier,
315
- y as NexusAPIRoutes,
316
- x as NexusAPIVersions,
317
- p as NexusEndpoints
422
+ y as NexusAPIResourceIdentifier,
423
+ x as NexusAPIRoutes,
424
+ h as NexusAPIVersions
318
425
  };
@@ -0,0 +1 @@
1
+ "use strict";var p=(t=>(t.DEVELOPMENT="development",t.STAGING="staging",t.PRODUCTION="production",t))(p||{}),a=(t=>(t.PRODUCTION="https://api.myepigraph.com/api/",t.STAGING="https://nexus.epigraph.dev/api/",t.STAGING_CANARY="https://staging-canary.epigraph.dev/api/",t.LOCAL="https://nexus.test/api/",t))(a||{});exports.ENVIRONMENT_TYPE=p;exports.NexusEndpoints=a;
@@ -0,0 +1,5 @@
1
+ var p = /* @__PURE__ */ ((a) => (a.DEVELOPMENT = "development", a.STAGING = "staging", a.PRODUCTION = "production", a))(p || {}), t = /* @__PURE__ */ ((a) => (a.PRODUCTION = "https://api.myepigraph.com/api/", a.STAGING = "https://nexus.epigraph.dev/api/", a.STAGING_CANARY = "https://staging-canary.epigraph.dev/api/", a.LOCAL = "https://nexus.test/api/", a))(t || {});
2
+ export {
3
+ p as E,
4
+ t as N
5
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Epigraph/epigraph.cjs"),n=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),E=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),r=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),t=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),i=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");exports.ENVIRONMENT_TYPE=a.ENVIRONMENT_TYPE;exports.Epigraph=a.Epigraph;exports.EpigraphBaseSolutionHtmlElement=n.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=n.EpigraphBaseSolutionLitElement;exports.ACTION_PERFORMED=e.ACTION_PERFORMED;exports.BUTTON_TYPE=e.BUTTON_TYPE;exports.CONTENT_TYPES=e.CONTENT_TYPES;exports.CURRENCY=e.CURRENCY;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphCustomEvent=e.EpigraphCustomEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.MODULE_FAILED_ERRORS=e.MODULE_FAILED_ERRORS;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.PANEL_TYPE=e.PANEL_TYPE;exports.SHARE_DESTINATIONS=e.SHARE_DESTINATIONS;exports.SUPPORT_TYPE=e.SUPPORT_TYPE;exports.TRIGGER_SOURCE=e.TRIGGER_SOURCE;exports.VARIANT_CHANGE_TYPES=e.VARIANT_CHANGE_TYPES;exports.EpigraphLogger=E.EpigraphLogger;exports.LogTypes=E.LogTypes;exports.LoggerModeNames=E.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.NexusEndpoints=p.NexusEndpoints;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=r.Result;exports.failureResult=r.failureResult;exports.successResult=r.successResult;exports.Distance=t.Distance;exports.DistanceUnits=t.DistanceUnits;exports.UnitTypes=t.UnitTypes;exports.EpigraphUrlProcessor=i.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=i.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=i.QUERY_PARAMETER_NAMES;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./Epigraph/epigraph.cjs"),a=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),E=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),r=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),t=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),i=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs"),o=require("./enums-1vqWxJ0i.cjs");exports.Epigraph=n.Epigraph;exports.EpigraphBaseSolutionHtmlElement=a.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=a.EpigraphBaseSolutionLitElement;exports.ACTION_PERFORMED=e.ACTION_PERFORMED;exports.BUTTON_TYPE=e.BUTTON_TYPE;exports.CONTENT_TYPES=e.CONTENT_TYPES;exports.CURRENCY=e.CURRENCY;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphCustomEvent=e.EpigraphCustomEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.MODULE_FAILED_ERRORS=e.MODULE_FAILED_ERRORS;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.PANEL_TYPE=e.PANEL_TYPE;exports.SHARE_DESTINATIONS=e.SHARE_DESTINATIONS;exports.SUPPORT_TYPE=e.SUPPORT_TYPE;exports.TRIGGER_SOURCE=e.TRIGGER_SOURCE;exports.VARIANT_CHANGE_TYPES=e.VARIANT_CHANGE_TYPES;exports.EpigraphLogger=E.EpigraphLogger;exports.LogTypes=E.LogTypes;exports.LoggerModeNames=E.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=r.Result;exports.failureResult=r.failureResult;exports.successResult=r.successResult;exports.Distance=t.Distance;exports.DistanceUnits=t.DistanceUnits;exports.UnitTypes=t.UnitTypes;exports.EpigraphUrlProcessor=i.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=i.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=i.QUERY_PARAMETER_NAMES;exports.ENVIRONMENT_TYPE=o.ENVIRONMENT_TYPE;
@@ -1,72 +1,72 @@
1
- import { ENVIRONMENT_TYPE as t, Epigraph as p } from "./Epigraph/epigraph.js";
2
- import { EpigraphBaseSolutionHtmlElement as n, EpigraphBaseSolutionLitElement as o } from "./Epigraph/epigraphBaseSolutions.js";
3
- import { ACTION_PERFORMED as i, BUTTON_TYPE as g, CONTENT_TYPES as s, CURRENCY as h, ConsentPluginNames as u, EpigraphAddToFavouritesEvent as R, EpigraphAnalytics as l, EpigraphArRequestedEvent as d, EpigraphButtonClickEvent as v, EpigraphChangeRateEvent as T, EpigraphCheckoutEvent as A, EpigraphCompletionRateEvent as N, EpigraphContentSharedEvent as P, EpigraphConversionEvent as m, EpigraphCustomEvent as C, EpigraphEngagementRateEvent as I, EpigraphItemAddedEvent as _, EpigraphItemMovedEvent as c, EpigraphItemRemovedEvent as x, EpigraphKeyboardInteractionEvent as M, EpigraphModuleClosedEvent as S, EpigraphModuleFailedEvent as O, EpigraphModuleLoadingEvent as f, EpigraphModuleReadyEvent as U, EpigraphPanelClosedEvent as Y, EpigraphPanelOpenedEvent as L, EpigraphSupportDetectedEvent as y, EpigraphTouchInteractionEvent as D, EpigraphVariantChangedEvent as G, GA4AnalyticsPlugin as B, MODULE_FAILED_ERRORS as F, NexusAnalyticsPlugin as H, OneTrustConsentPlugin as V, PANEL_TYPE as Q, SHARE_DESTINATIONS as k, SUPPORT_TYPE as b, TRIGGER_SOURCE as q, VARIANT_CHANGE_TYPES as K } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
4
- import { EpigraphLogger as w, LogTypes as z, LoggerModeNames as J } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
5
- import { EpigraphNexusAPI as X, HTTPMethod as Z, NexusAPIResourceIdentifier as $, NexusAPIRoutes as ee, NexusAPIVersions as Ee, NexusEndpoints as te } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
6
- import { EpigraphQrCodeGenerator as re } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
7
- import { Result as oe, failureResult as ae, successResult as ie } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
- import { Distance as se, DistanceUnits as he, UnitTypes as ue } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
9
- import { EpigraphUrlProcessor as le, QUERY_PARAMETER_ACTION_NAMES as de, QUERY_PARAMETER_NAMES as ve } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
1
+ import { Epigraph as t } from "./Epigraph/epigraph.js";
2
+ import { EpigraphBaseSolutionHtmlElement as r, EpigraphBaseSolutionLitElement as n } from "./Epigraph/epigraphBaseSolutions.js";
3
+ import { ACTION_PERFORMED as a, BUTTON_TYPE as i, CONTENT_TYPES as g, CURRENCY as s, ConsentPluginNames as h, EpigraphAddToFavouritesEvent as R, EpigraphAnalytics as u, EpigraphArRequestedEvent as l, EpigraphButtonClickEvent as v, EpigraphChangeRateEvent as T, EpigraphCheckoutEvent as d, EpigraphCompletionRateEvent as A, EpigraphContentSharedEvent as P, EpigraphConversionEvent as N, EpigraphCustomEvent as m, EpigraphEngagementRateEvent as C, EpigraphItemAddedEvent as I, EpigraphItemMovedEvent as _, EpigraphItemRemovedEvent as c, EpigraphKeyboardInteractionEvent as x, EpigraphModuleClosedEvent as M, EpigraphModuleFailedEvent as S, EpigraphModuleLoadingEvent as O, EpigraphModuleReadyEvent as f, EpigraphPanelClosedEvent as U, EpigraphPanelOpenedEvent as Y, EpigraphSupportDetectedEvent as L, EpigraphTouchInteractionEvent as y, EpigraphVariantChangedEvent as D, GA4AnalyticsPlugin as G, MODULE_FAILED_ERRORS as B, NexusAnalyticsPlugin as F, OneTrustConsentPlugin as H, PANEL_TYPE as V, SHARE_DESTINATIONS as Q, SUPPORT_TYPE as k, TRIGGER_SOURCE as b, VARIANT_CHANGE_TYPES as q } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
4
+ import { EpigraphLogger as j, LogTypes as w, LoggerModeNames as z } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
5
+ import { EpigraphNexusAPI as W, HTTPMethod as X, NexusAPIResourceIdentifier as Z, NexusAPIRoutes as $, NexusAPIVersions as ee } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
6
+ import { EpigraphQrCodeGenerator as te } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
7
+ import { Result as re, failureResult as ne, successResult as oe } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
+ import { Distance as ie, DistanceUnits as ge, UnitTypes as se } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
9
+ import { EpigraphUrlProcessor as Re, QUERY_PARAMETER_ACTION_NAMES as ue, QUERY_PARAMETER_NAMES as le } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
10
+ import { E as Te } from "./enums-CvOTKyNu.js";
10
11
  export {
11
- i as ACTION_PERFORMED,
12
- g as BUTTON_TYPE,
13
- s as CONTENT_TYPES,
14
- h as CURRENCY,
15
- u as ConsentPluginNames,
16
- se as Distance,
17
- he as DistanceUnits,
18
- t as ENVIRONMENT_TYPE,
19
- p as Epigraph,
12
+ a as ACTION_PERFORMED,
13
+ i as BUTTON_TYPE,
14
+ g as CONTENT_TYPES,
15
+ s as CURRENCY,
16
+ h as ConsentPluginNames,
17
+ ie as Distance,
18
+ ge as DistanceUnits,
19
+ Te as ENVIRONMENT_TYPE,
20
+ t as Epigraph,
20
21
  R as EpigraphAddToFavouritesEvent,
21
- l as EpigraphAnalytics,
22
- d as EpigraphArRequestedEvent,
23
- n as EpigraphBaseSolutionHtmlElement,
24
- o as EpigraphBaseSolutionLitElement,
22
+ u as EpigraphAnalytics,
23
+ l as EpigraphArRequestedEvent,
24
+ r as EpigraphBaseSolutionHtmlElement,
25
+ n as EpigraphBaseSolutionLitElement,
25
26
  v as EpigraphButtonClickEvent,
26
27
  T as EpigraphChangeRateEvent,
27
- A as EpigraphCheckoutEvent,
28
- N as EpigraphCompletionRateEvent,
28
+ d as EpigraphCheckoutEvent,
29
+ A as EpigraphCompletionRateEvent,
29
30
  P as EpigraphContentSharedEvent,
30
- m as EpigraphConversionEvent,
31
- C as EpigraphCustomEvent,
32
- I as EpigraphEngagementRateEvent,
33
- _ as EpigraphItemAddedEvent,
34
- c as EpigraphItemMovedEvent,
35
- x as EpigraphItemRemovedEvent,
36
- M as EpigraphKeyboardInteractionEvent,
37
- w as EpigraphLogger,
38
- S as EpigraphModuleClosedEvent,
39
- O as EpigraphModuleFailedEvent,
40
- f as EpigraphModuleLoadingEvent,
41
- U as EpigraphModuleReadyEvent,
42
- X as EpigraphNexusAPI,
43
- Y as EpigraphPanelClosedEvent,
44
- L as EpigraphPanelOpenedEvent,
45
- re as EpigraphQrCodeGenerator,
46
- y as EpigraphSupportDetectedEvent,
47
- D as EpigraphTouchInteractionEvent,
48
- le as EpigraphUrlProcessor,
49
- G as EpigraphVariantChangedEvent,
50
- B as GA4AnalyticsPlugin,
51
- Z as HTTPMethod,
52
- z as LogTypes,
53
- J as LoggerModeNames,
54
- F as MODULE_FAILED_ERRORS,
55
- $ as NexusAPIResourceIdentifier,
56
- ee as NexusAPIRoutes,
57
- Ee as NexusAPIVersions,
58
- H as NexusAnalyticsPlugin,
59
- te as NexusEndpoints,
60
- V as OneTrustConsentPlugin,
61
- Q as PANEL_TYPE,
62
- de as QUERY_PARAMETER_ACTION_NAMES,
63
- ve as QUERY_PARAMETER_NAMES,
64
- oe as Result,
65
- k as SHARE_DESTINATIONS,
66
- b as SUPPORT_TYPE,
67
- q as TRIGGER_SOURCE,
68
- ue as UnitTypes,
69
- K as VARIANT_CHANGE_TYPES,
70
- ae as failureResult,
71
- ie as successResult
31
+ N as EpigraphConversionEvent,
32
+ m as EpigraphCustomEvent,
33
+ C as EpigraphEngagementRateEvent,
34
+ I as EpigraphItemAddedEvent,
35
+ _ as EpigraphItemMovedEvent,
36
+ c as EpigraphItemRemovedEvent,
37
+ x as EpigraphKeyboardInteractionEvent,
38
+ j as EpigraphLogger,
39
+ M as EpigraphModuleClosedEvent,
40
+ S as EpigraphModuleFailedEvent,
41
+ O as EpigraphModuleLoadingEvent,
42
+ f as EpigraphModuleReadyEvent,
43
+ W as EpigraphNexusAPI,
44
+ U as EpigraphPanelClosedEvent,
45
+ Y as EpigraphPanelOpenedEvent,
46
+ te as EpigraphQrCodeGenerator,
47
+ L as EpigraphSupportDetectedEvent,
48
+ y as EpigraphTouchInteractionEvent,
49
+ Re as EpigraphUrlProcessor,
50
+ D as EpigraphVariantChangedEvent,
51
+ G as GA4AnalyticsPlugin,
52
+ X as HTTPMethod,
53
+ w as LogTypes,
54
+ z as LoggerModeNames,
55
+ B as MODULE_FAILED_ERRORS,
56
+ Z as NexusAPIResourceIdentifier,
57
+ $ as NexusAPIRoutes,
58
+ ee as NexusAPIVersions,
59
+ F as NexusAnalyticsPlugin,
60
+ H as OneTrustConsentPlugin,
61
+ V as PANEL_TYPE,
62
+ ue as QUERY_PARAMETER_ACTION_NAMES,
63
+ le as QUERY_PARAMETER_NAMES,
64
+ re as Result,
65
+ Q as SHARE_DESTINATIONS,
66
+ k as SUPPORT_TYPE,
67
+ b as TRIGGER_SOURCE,
68
+ se as UnitTypes,
69
+ q as VARIANT_CHANGE_TYPES,
70
+ ne as failureResult,
71
+ oe as successResult
72
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/epigraph-std-lib",
3
- "version": "5.0.0-alpha.1",
3
+ "version": "5.0.0-alpha.11",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-std-lib.cjs",
6
6
  "module": "./dist/epigraph-std-lib.js",