1// Git Commit: d0332af707e29a6257f397c21371bf504028c525 2{var a=function(t,s,a,c){return new(a=a||Promise)(function(i,e){function n(t){try{o(c.next(t))}catch(t){e(t)}}function r(t){try{o(c.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?i(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}o((c=c.apply(t,s||[])).next())})};let t="https://.c360a.salesforce.com".replace(/\/+$/,"");class P{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return null!=this.configuration.basePath?this.configuration.basePath:t}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||s}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let t=this.configuration.apiKey;if(t)return"function"==typeof t?t:()=>t}get accessToken(){let t=this.configuration.accessToken;if(t)return"function"==typeof t?t:()=>a(this,void 0,void 0,function*(){return t})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}let e=new P;class o{constructor(t=e){this.configuration=t,this.fetchApi=(o,s)=>a(this,void 0,void 0,function*(){let e={url:o,init:s};for(var t of this.middleware)t.pre&&(e=(yield t.pre(Object.assign({fetch:this.fetchApi},e)))||e);let i=void 0;try{i=yield(this.configuration.fetchApi||fetch)(e.url,e.init)}catch(t){for(var n of this.middleware)n.onError&&(i=(yield n.onError({fetch:this.fetchApi,url:e.url,init:e.init,error:t,response:i?i.clone():void 0}))||i);if(void 0===i)throw t instanceof Error?new h(t,"The request failed and the interceptors did not return an alternative response"):t}for(var r of this.middleware)r.post&&(i=(yield r.post({fetch:this.fetchApi,url:e.url,init:e.init,response:i.clone()}))||i);return i}),this.middleware=t.middleware}withMiddleware(...t){var e=this.clone();return e.middleware=e.middleware.concat(...t),e}withPreMiddleware(...t){t=t.map(t=>({pre:t}));return this.withMiddleware(...t)}withPostMiddleware(...t){t=t.map(t=>({post:t}));return this.withMiddleware(...t)}isJsonMime(t){return!!t&&o.jsonRegex.test(t)}request(i,n){return a(this,void 0,void 0,function*(){var{url:t,init:e}=yield this.createFetchParams(i,n),t=yield this.fetchApi(t,e);if(t&&200<=t.status&&t.status<300)return t;
2throw new u(t,"Response returned an error code")})}createFetchParams(o,s){return a(this,void 0,void 0,function*(){let t=this.configuration.basePath+o.path,e=(void 0!==o.query&&0!==Object.keys(o.query).length&&(t+="?"+this.configuration.queryParamsStringify(o.query)),Object.assign({},this.configuration.headers,o.headers));Object.keys(e).forEach(t=>void 0===e[t]?delete e[t]:{});var i="function"==typeof s?s:()=>a(this,void 0,void 0,function*(){return s}),n={method:o.method,headers:e,body:o.body,credentials:this.configuration.credentials},i=Object.assign(Object.assign({},n),yield i({init:n,context:o}));let r;n=i.body,r=!("undefined"!=typeof FormData&&n instanceof FormData||i.body instanceof URLSearchParams||(n=i.body,"undefined"!=typeof Blob&&n instanceof Blob))&&this.isJsonMime(e["Content-Type"])?JSON.stringify(i.body):i.body;n=Object.assign(Object.assign({},i),{body:r});return{url:t,init:n}})}clone(){var t=new this.constructor(this.configuration);return t.middleware=this.middleware.slice(),t}}o.jsonRegex=new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$","i");class u extends Error{constructor(t,e){super(e),this.response=t,this.name="ResponseError"}}
2class h extends Error{constructor(t,e){super(e),this.cause=t,this.name="FetchError"}}class _ extends Error{constructor(t,e){super(e),this.field=t,this.name="RequiredError"}}function s(e,i=""){return Object.keys(e).map(t=>function e(i,n,r=""){let o=r+(r.length?`[${i}]`:i);if(n instanceof Array){let t=n.map(t=>encodeURIComponent(String(t))).join(`&${encodeURIComponent(o)}=`);return encodeURIComponent(o)+"="+t}if(n instanceof Set){let t=Array.from(n);return e(i,t,r)}if(n instanceof Date)return encodeURIComponent(o)+"="+encodeURIComponent(n.toISOString());if(n instanceof Object)return s(n,o);return encodeURIComponent(o)+"="+encodeURIComponent(String(n))}(t,e[t],i)).filter(t=>0<t.length).join("&")}class S{constructor(t){this.raw=t}value(){return a(this,void 0,void 0,function*(){})}}var d,l,n=function(t,s,a,c){return new(a=a||Promise)(function(i,e){function n(t){try{o(c.next(t))}catch(t){e(t)}}function r(t){try{o(c.throw(t))}catch(t){e(t)}}function o(t){var e;t.done?i(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}o((c=c.apply(t,s||[])).next())})};class T extends o{webEventsAppSourceIdPostRaw(e,i){return n(this,void 0,void 0,function*(){if(null==e.interaction)throw new _("interaction","Required parameter requestParameters.interaction was null or undefined when calling webEventsAppSourceIdPost.");var t={"Content-Type":"application/json"},t=yield this.request({path:"/",method:"POST",headers:t,query:{},body:e.interaction},i);return new S(t)})}webEventsAppSourceIdPost(t,e){return n(this,void 0,void 0,function*(){yield this.webEventsAppSourceIdPostRaw({interaction:t},e)})}}class A{constructor(){this.productViewStart={events:[]}}withCatalog(t){return this.catalog=t,this}withErrorEvent(t){return this.errorEvent=t,this}withIdentity(t){return this.identity=t,this}withPartyIdentification(t){return this.partyIdentification=t,this}build(){return this.catalog&&this.productViewStart.events.push(this.catalog),this.errorEvent&&this.productViewStart.events.push(this.errorEvent),this.identity&&this.productViewStart.events.push(this.identity),this.partyIdentification&&this.productViewStart.events.push(this.partyIdentification),this.productViewStart}}class R{constructor(){this.search={events:[]}}withErrorEvent(t){return this.errorEvent=t,this}withIdentity(t){return this.identity=t,this}withPartyIdentification(t){return this.partyIdentification=t,this}withSearchEvent(t){return this.searchEvent=t,this}build(){return this.errorEvent&&this.search.events.push(this.errorEvent),this.identity&&this.search.events.push(this.identity),this.partyIdentification&&this.search.events.push(this.partyIdentification),this.searchEvent&&this.search.events.push(this.searchEvent),this.search}}class N{constructor(){this.viewPage={events:[]}}withErrorEvent(t){return this.errorEvent=t,this}withIdentity(t){return this.identity=t,this}withPartyIdentification(t){return this.partyIdentification=t,this}withUserEngagement(t){return this.userEngagement=t,this}build(){return this.errorEvent&&this.viewPage.events.push(this.errorEvent),this.identity&&this.viewPage.events.push(this.identity),this.partyIdentification&&this.viewPage.events.push(this.partyIdentification),this.userEngagement&&this.viewPage.events.push(this.userEngagement),this.viewPage}}class C{constructor(){this.viewProductImpressions={events:[]}}withCatalog(t){return this.catalog=t,this}withErrorEvent(t){return this.errorEvent=t,this}withIdentity(t){return this.identity=t,this}withPartyIdentification(t){return this.partyIdentification=t,this}build(){return this.catalog&&this.viewProductImpressions.events.push(this.catalog),this.errorEvent&&this.viewProductImpressions.events.push(this.errorEvent),this.identity&&this.viewProductImpressions.events.push(this.identity),this.partyIdentification&&this.viewProductImpressions.events.push(this.partyIdentification),this.viewProductImpressions}}class j{constructor(){this.pre=n=>new Promise((t,e)=>{var i=new Headers(n.init.headers);i.set("content-type","application/x-www-form-urlencoded"),n.init.headers=i,null===n.init.body&&e("Body can't be null"),n.init.body="event="+encodeURIComponent((t=>{if("undefined"==typeof TextEncoder)return btoa(unescape(encodeURIComponent(t)));{var i=(new TextEncoder).encode(t);let e="";for(let t=0;t<i.length;t++)e+=String.fromCharCode(i[t]);return btoa(e)}})(n.init.body.toString())),t()})}}function r(t){var e=new RegExp(["%23","%24","%26","%2B","%5E","%60","%7C","%2F","%3A","%3C","%3D","%3E","%3F","%40","%5B","%5D","%7B","%7D"].join("|"),"g");let i=encodeURIComponent(t);return i=i.replace(e,decodeURIComponent)}function p(t,e){var i=r(e.value)||"";let n=r(t)+"="+i+";";e.domain&&(n+=" domain="+e.domain+";"),e.path&&(n+=" path="+e.path+";"),e.expires&&(n+=" expires="+e.expires+";"),document.cookie=n}function v(t){let e=t.eventId,i=t.deviceId,n=t.visitorId,r=t.sessionId,o=t.guestId,s=t.customerId,a=t.customerNo;var c;return null!=t.dwacDomain&&""!==t.dwacDomain&&(c=(t=>{var e,i=t+"=";for(e of document.cookie.split(";")){var n=e.trim();if(n.startsWith(i))return decodeURIComponent(n.substring(i.length).replace(/\+/g,"%20"))}return null})("dwanonymous_"+t.dwacDomain))&&t.visitorId!=c&&(e=crypto.randomUUID(),i=c,n=c,r=c,o="",s="",a=""),{eventId:e,deviceId:i,visitorId:n,sessionId:r,guestId:o,customerId:s,customerNo:a}}function f(){var t;return{browserName:null==(t=null==(t=null==(t=null==(t=window.navigator)?void 0:t.userAgentData)?void 0:t.brands)?void 0:t[0])?void 0:t.brand,browserVersion:null==(t=null==(t=null==(t=window.navigator)?void 0:t.userAgentData)?void 0:t.brands[0])?void 0:t.ver
2sion,deviceModel:navigator.platform,deviceVendor:navigator.vendor,osName:null==(t=null==(t=window.navigator)?void 0:t.userAgentData)?void 0:t.platform,osVersion:navigator.appVersion,screenHeight:null==(t=window.screen)?void 0:t.height,screenWidth:null==(t=window.screen)?void 0:t.width}}function w(t){return t?{sourceUrlReferrer:document.referrer,sourceUrl:null==(t=document.location)?void 0:t.href,sourcePageName:document.title}:{sourceUrlReferrer:"",sourceUrl:"",sourcePageName:""}}(E=d=d||{}).PROFILE="Profile",E.ENGAGEMENT="Engagement",E.OTHERS="Others",(E=l=l||{}).CATALOG="catalog",E.USERENGAGEMENT="userEngagement",E.SEARCHEVENT="searchEvent";var c,g=function(t,e){var i={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i},m=function(t,e){var i={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i};(E=c=c||{}).START_VIEW_PRODUCT="startViewProduct",E.CATALOG_OBJECT_IMPRESSION="catalog-object-impression",E.VIEW_SEARCH="viewSearch",E.VIEW_PAGE="viewPage",E.VIEW_RECOMMENDATION="viewRecommendation";{let o=(E="undefined"!=typeof module&&module.exports?module.exports:window).DataCloud=window.DataCloud||(E.DataCloud={}),s=(o.VERSION="DEV",o.orgId);E=o.appId;let u,r=(s&&E&&(u=((t,e)=>{if(!t)throw new _("tenantId","tenantId is empty.");if(e)return e="web/events/"+e,new T(new P({basePath:`https://${t}.c360a.salesforce.com/`+e,middleware:[new j]}));throw new _("appSourceId","appSourceId is empty.")})(s,E)),O()),h=(o._getTopDomain=function(t){let e,i,n="weird_get_top_level_domain=cookie",r=t.split(".");for(e=r.length-1;0<=e;e--)if(i=r.slice(e).join("."),document.cookie=n+";domain=."+i+";",-1<document.cookie.indexOf(n))return document.cookie=n.split("=")[0]+"=;domain=."+i+";expires=Thu, 01 Jan 1970 00:00:01 GMT;","."+i;return!1},o._getTopDomain(document.location.hostname));function y(t){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1").replace(/\+/g,"%20"))||null}function I(t){var e=(i=>{var n=[void 0];let r,o,s="";var a=document.location.hostname.split(".").reverse();for(let t=0,e=a.length;t<e;t++)s="."+a[t]+s,n.push(s);try{r=y(i)}catch(t){r=void 0}for(let t=0,e=n.length;t<e;t++){var c=n[t];p(i,{domain:c,path:"/",expires:"Thu, 01 Jan 1970 00:00:00 UTC"});try{o=y(i)}catch(t){o=void 0}if(r!==o)return p(i,{value:r,domain:c,path:"/"}),c}})(t);p(t,{path:"/",expires:"Thu, 01 Jan 1970 00:00:00 UTC",domain:e})}function i(t,e){try{window.sessionStorage.removeItem(t)}catch(t){I(e)}}(()=>{var t="viewCategory";try{var e=window.sessionStorage.getItem("dc."+t);if(!e)return;try{JSON.parse(e)}catch(t){return}}catch(t){return}})();var E="dc.viewCategory",b="__dccviews=;path=/;";try{window.sessionStorage.removeItem(E)}catch(t){document.cookie=b}{let e,i;try{e=window.sessionStorage.getItem("dc.anchor")}catch(t){e=y("__dc_anchor")}try{i=JSON.parse(e)||{}}catch(t){i={}}i}i("dc.anchor","__dc_anchor");{let e,i;try{e=window.sessionStorage.getItem("dc.recoUUID")}catch(t){e=y("__dc_recoUUID")}try{i=JSON.parse(e)||{}}catch(t){i={}}i}i("dc.recoUUID","__dc_recoUUID");{let e,i;try{e=window.sessionStorage.getItem("dc.banditPrediction")}catch(t){e=y("__dc_banditPrediction")}try{i=JSON.parse(e)||{}}catch(t){i={}}i}function O(){var t=y("__dc_env");let e;return"string"==typeof t&&(t=atob(t),e=JSON.parse(t)),e}if(i("dc.banditPrediction","__dc_banditPrediction"),o.startViewProduct=function(t){let e=new A;t=(t=>{var{eventId:e,deviceId:i,visitorId:n,sessionId:r,guestId:o,customerId:s,customerNo:a}=v(t),c=g(t,["dwacDomain"]);return Object.assign(Object.assign(Object.assign(Object.assign({},c),{eventId:e,customerId:s,customerNo:a,guestId:o,dateTime:null!=(c=t.dateTime)?c:(new Date).toISOString(),sessionId:r,visitorId:n,deviceId:i,category:d.ENGAGEMENT,eventType:l.CATALOG,id:t.id||t.altId||"undefined-product-id",type:t.type||"product"}),f()),w(!0))})(t);e=e.withCatalog(t),null!=r&&r.Identity&&(e=e.withIdentity(r.Identity)),null!=r&&r.PartyIdentification&&(e=e.withPartyIdentification(r.PartyIdentification)),o.sendActivity(e.build())},o.viewPage=function(t){let e=new N;t=(t=>{var{eventId:e,deviceId:i,visitorId:n,sessionId:r,guestId:o,customerId:s,customerNo:a}=v(t),c=m(t,["dwacDomain"]);return Object.assign(Object.assign(Object.assign(Object.assign({},c),{eventId:e,category:d.ENGAGEMENT,eventType:l.USERENGAGEMENT,dateTime:null!=(c=t.dateTime)?c:(new Date).toISOString(),sessionId:r,visitorId:n,deviceId:i,guestId:o,customerId:s,customerNo:a}),f()),w(!0))})(t);e=e.withUserEngagement(t),o.sendActivity(e.build())},o.viewProductImpression=function(t){let e=new C;t=t;var i=Object.assign(Object.assign(Object.assign(Object.assign({},t),{category:d.ENGAGEMENT,eventType:l.CATALOG,interactionName:t.interactionName,dateTime:null!=(i=t.dateTime)?i:(new Date).toISOString(),searchResultId:null!=(i=t.searchResultId)?i:"",id:t.id||t.altId||"undefined-product-id",categoryId:null!=(i=t.categoryId)?i:"",siteId:t.siteId,webStoreId:t.siteId,customerId:t.customerId,customerNo:t.customerNo,guestId:t.guestId,visitorId:t.visitorId,deviceId:t.deviceId,sessionId:t.sessionId,eventStatus:t.eventStatus,type:t.type||"product"}),f()),w(!0));e=e.withCatalog(i),null!=r&&r.Identity&&(e=e.withIdentity(r.Identity)),null!=r&&r.PartyIdentification&&(e=e.withPartyIdentification(r.PartyIdentification)),o.sendActivity(e.build())},o.search=function(t){let e=new R;t=t;var i=Object.assign(Object.assign(Object.assign(Object.assign({},t),{customerId:t.customerId,customerNo:t.customerNo,guestId:t.guestId,visitorId:t.visitorId,category:d.ENGAGEMENT,eventType:l.SEARCHEVENT,dateTime:null!=(i=t.dateTime)?i:(new Date).toISOString(),searchType:t.searchType||"product"}),f()),w(!0));e=e.withSearchEvent(i),null!=r&&r.Identity&&(e=e.withIdentity(r.Identity)),null!=r&&r.PartyIdentification&&(e=e.withPartyIdentification(r.PartyIdentification)),o.sendActivity(e.build())},o.viewRecommendation=function(t){o.viewProductImpression(t)}
2,o.sendActivity=function(t,e,i){if(-1!==document.cookie.indexOf("__dc_dnt=1"))try{for(var n=["dccid","dcuid","__dc_uuid","__dcact","__dcviews","__dc_bc","__dc_seg","__dc_anchor"],r=document.cookie.split(";"),o=0,s=r.length;o<s;o++){var a=r[o],c=a.indexOf("="),d=(-1<c?a.substr(0,c):a).trim();-1!==n.indexOf(d)&&(document.cookie=d+"=; path=/; domain="+h+"; expires=Thu, 01 Jan 1970 00:00:00 GMT")}}catch(t){}else u.webEventsAppSourceIdPost(t).then(e);return new Image},window.setInterval(function(){if(s)try{var t=y("__dcact");if(t){I("__dcact");var e=t.replaceAll('"',"").split(",");if(e[0])for(let t=0;t<e.length;t++){var i,n=e[t],r=y(n);if(r){let t;"string"==typeof(t="string"==typeof r?atob(r):t)&&"page-view"===(i=JSON.parse(t)).activityType&&o.viewPage(JSON.parse(i.parameters))}I(n)}else I("__dcact")}}catch(t){I("__dcact")}},1e3),o.autoSendActivities=function(){if(s&&o.activities&&0!==o.activities.length){var i=o.activities;r=O();for(let t=0,e=i.length;t<e;t++){var n=i[t];switch(n.activityType){case c.START_VIEW_PRODUCT:case"startViewProduct":o.startViewProduct(n.parameters);break;case c.CATALOG_OBJECT_IMPRESSION:case"catalog-object-impression":o.viewProductImpression(n.parameters);break;case c.VIEW_SEARCH:case"viewSearch":o.search(n.parameters);break;case c.VIEW_PAGE:case"viewPage":o.viewPage(n.parameters);break;case c.VIEW_RECOMMENDATION:o.viewRecommendation(n.parameters)}}o.activities=[]}},window.setTimeout(function(){o.autoSendActivities()},100),window.setInterval(function(){o.autoSendActivities()},3e3),o.enableDNT=function(){p("__dc_dnt",{domain:h,value:1,expires:new Date(Date.now()+3154e7)})},o.disableDNT=function(){p("__dc_dnt",{domain:h,value:0,expires:new Date(Date.now()+3154e7)})},s&&o.widgets&&0<o.widgets.length){for(let t=0;t<o.widgets.length;t++)o.widgets[t];o.widgets=[]}}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.