"use strict";define(["app","utm"],function(App,Utm){var WebEngageUtils=function(){};return WebEngageUtils.prototype.applyPlaceholders=function(data){var referrer,placeholders={"{{referral_url}}":document.referrer||"","{{referral_channel}}":(referrer=String(Utm.lastReferrer()),referrer?referrer.match(/instagram/)?"Instagram":referrer.match(/(facebook|fb)/)?"Facebook":referrer.match(/(mail\.google|mail\.yahoo|outlook|aol\.com)/)?"Email":"":""),"{{page_title}}":document.title,"{{utm_source}}":Utm.readCookie("utm_source"),"{{utm_medium}}":Utm.readCookie("utm_medium"),"{{utm_campaign}}":Utm.readCookie("utm_campaign")};return $.each(data,function(name,value){placeholders.hasOwnProperty(value)&&(data[name]=value)}),data},WebEngageUtils.prototype.systemAttrName=function(value){return"we_".concat(App.toSnakeCase(value))},WebEngageUtils.prototype.getPlatform=function(){return App.isAndroid()||App.isIOS()?"App":navigator.userAgent.match(/android|iphone|ipad/i)?"Mobile Web":"Desktop Web"},WebEngageUtils.prototype.route=function(path){if(!window.WEBENGAGE_HOST)throw new Error("window.WEBENGAGE_HOST is required");return"".concat(window.WEBENGAGE_HOST,"/webengage/").concat(path)},new WebEngageUtils});