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BACA,gCACA,mCACA,0CACA,iDACA,2CACA,yCACA,8CACA,sDCvDH,EAvE8BM,KAC7BC,EAAAA,EAAAA,WAAUD,EAAK,iCAEf,MACCE,KAAK,SAAEC,IACJH,EAeJG,EAASC,MAAMC,WAAWC,kBACzBH,EAASC,MAAMC,WAAWC,mBACzB,WAIA,MAAMA,EAAoB,cAAcH,EAASI,UAAUC,QACzDC,wBAwCF,OAtCAH,EAAkBI,UAAUC,YAC3B,+BAiBDL,EAAkBI,UAAUE,gBAC3B,SAAyBC,GACxB,MAAM,OAAEd,EAAF,KAAUD,IACfgB,EAAAA,EAAAA,GACCC,EACAF,EAAUxB,UACN,CAAC,EAEP2B,KAAKC,SAASL,gBAAgB,IAC1BC,MACEA,EAAUK,UACdpB,GAAQ,CACPoB,SAAUpB,MAERC,GAAU,CACboB,WAAYpB,IAGd,EAEKO,CACP,CA9CA,EAFF,C","sources":["webpack://ws-tagging/./src/utils/findPropertiesFromSelector.js","webpack://ws-tagging/./src/utils/legacy/projects/shift/mappings/linkTypeSelectors.js","webpack://ws-tagging/./src/utils/legacy/projects/shift/decorators/LinkTypeDecorator.js"],"sourcesContent":["export default (mapping, element) => {\n\tlet match;\n\tif (element instanceof Element) {\n\t\tmatch = mapping.find(({ selector }) => {\n\t\t\tlet properties;\n\t\t\tif (typeof selector === 'string') {\n\t\t\t\tproperties = element.matches(selector);\n\t\t\t} else if (selector instanceof Array) {\n\t\t\t\tproperties = selector.find((sel) => element.matches(sel));\n\t\t\t}\n\t\t\treturn properties;\n\t\t});\n\t}\n\treturn match;\n};\n","export default [\n\t{\n\t\ttype: 'Subaru Express Service',\n\t\tselector:\n\t\t\t'.ws-subaru-prgrm-logos a[href*=\"/subaru-express-service.htm\"]'\n\t},\n\t{\n\t\ttype: 'Trade Up Advantage',\n\t\tselector: '.ws-subaru-prgrm-logos a[href*=\"/trade-up-advantage.htm\"]'\n\t},\n\t{\n\t\ttype: 'Certified Subaru Eco-Friendly Retailer',\n\t\tselector:\n\t\t\t'.ws-subaru-prgrm-logos a[href*=\"/eco-friendly-retailer-program.htm\"]'\n\t},\n\t{\n\t\ttype: 'CPO Logo',\n\t\tselector:\n\t\t\t'.ws-subaru-prgrm-logos a[href*=\"/certified-inventory/index.htm\"]'\n\t},\n\t{\n\t\ttype: 'Retailer Program Widget',\n\t\tselector: '.ws-subaru-prgrm-logos a'\n\t},\n\t{\n\t\ttype: '2022 Subaru Outback Wilderness',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/2022-subaru-outback-wilderness-launch.htm\"]'\n\t},\n\t{\n\t\ttype: 'Subaru Consumer Reports',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/consumer-reports.htm\"]'\n\t},\n\t{\n\t\ttype: 'Industry Reviews & Awards',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/subaru-awards.htm\"]'\n\t},\n\t{\n\t\ttype: 'Subaru Incentives, Rebates, Specials',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/global-incentives/index.htm\"]'\n\t},\n\t{\n\t\ttype: 'Meet the Barkleys',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/meet-the-barkleys.htm\"]'\n\t},\n\t{\n\t\ttype: 'Love Promise',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a[href=\"/subaru-love-promise.htm\"]'\n\t},\n\t{\n\t\ttype: 'Corporate Cell Cards',\n\t\tselector:\n\t\t\t'.v9-oem-subaru-0001-v1 .ddc-footer-secondary ul.jcarousel-list li > a'\n\t},\n\t{\n\t\ttype: 'aspca',\n\t\tselector: '.ws-subaru-stl #aspca a.national-charity-btn'\n\t},\n\t{\n\t\ttype: 'maw',\n\t\tselector: '.ws-subaru-stl #maw a.national-charity-btn'\n\t},\n\t{\n\t\ttype: 'mow',\n\t\tselector: '.ws-subaru-stl #monw a.national-charity-btn'\n\t},\n\t{\n\t\ttype: 'npf',\n\t\tselector: '.ws-subaru-stl #npf a.national-charity-btn'\n\t},\n\t{\n\t\ttype: 'hometown',\n\t\tselector:\n\t\t\t'.ws-subaru-stl a[href*=\"/share-the-love/submission-form.html\"]'\n\t},\n\t{\n\t\ttype: 'Share The Love',\n\t\tselector: '.ws-subaru-stl a.national-charity-btn'\n\t},\n\t{\n\t\ttype: 'Awards and Accolades',\n\t\tselector: '[data-web-api-id=\"subaruawards-badgeprice\"] a'\n\t},\n\t{\n\t\ttype: 'CPO',\n\t\tselector: '.badge-callout a.certified, .badge-callout .certified a'\n\t},\n\t{\n\t\ttype: 'Starlink',\n\t\tselector: 'a.subaru-starlink, .subaru-starlink a'\n\t},\n\t{\n\t\ttype: 'Eyesight',\n\t\tselector: 'a.subaru-eyesight, .subaru-eyesight a'\n\t},\n\t{\n\t\ttype: 'Maintain the Love',\n\t\tselector: 'a.mtl-badge, .mtl-badge a'\n\t},\n\t{\n\t\ttype: 'CR Trust Mark',\n\t\tselector: 'a.trustmark-link, .trustmark-link a'\n\t},\n\t{\n\t\ttype: 'Flex Banner',\n\t\tselector: 'a.soa-wiapi-footer-banner'\n\t},\n\t{\n\t\tevents: 'scheduleServiceClick',\n\t\ttype: 'Schedule Service',\n\t\tselector: [\n\t\t\t'.schedule-service.include-velocity a',\n\t\t\t'.page-header .cst_SCHEDULE_SERVICE a',\n\t\t\t'.subaru-service-button a',\n\t\t\t'a[data-location=\"page-schedule-service-button\"]',\n\t\t\t'a[href=\"/ServiceApptForm.htm\"]',\n\t\t\t'a[href=\"/schedule-service.htm\"]',\n\t\t\t'a[href=\"/service/index.htm\"]',\n\t\t\t'a[href=\"/service/center.htm\"]',\n\t\t\t'a[href=\"/service/scheduler.htm\"]',\n\t\t\t'a[href=\"/service/schedule-service.htm\"]',\n\t\t\t'a[href=\"/eleads-service-scheduler-mobile.htm\"]',\n\t\t\t'a[href=\"/e-leads-service-scheduler.htm\"]',\n\t\t\t'a[href=\"/schedule-service-online.htm\"]',\n\t\t\t'a[href=\"/service/schedule-appointment.htm\"]',\n\t\t\t'a[href=\"/schedule-your-service-appointment.htm\"]'\n\t\t]\n\t}\n];\n","import { namespace } from 'wsm-tagging-utils';\nimport findPropertiesFromSelector from '../../../../findPropertiesFromSelector';\nimport linkTypeSelectors from '../mappings/linkTypeSelectors';\n\nconst runLinkTypeDecorator = (win) => {\n\tnamespace(win, 'DDC.tracking.shift.decorators');\n\n\tconst {\n\t\tDDC: { tracking }\n\t} = win;\n\n\t// ======================================================================\n\t// ---------------------------- Constructor -----------------------------\n\t// ======================================================================\n\n\t/**\n\t * The Link Type Decorator updates link click events with the type of the\n\t * link clicked and applies the type to the event to be used by event handlers.\n\t *\n\t * @param {Object} window The window object\n\t * @param {tracking.framework.runtime.Page} page A Page instance for page related queries\n\t * @param {tracking.framework.runtime.EventHandler} delegate The EventHandler implementation to which all interface operations are delegated\n\t * @constructor\n\t */\n\ttracking.shift.decorators.LinkTypeDecorator =\n\t\ttracking.shift.decorators.LinkTypeDecorator ||\n\t\t(function buildLinkTypeDecorator() {\n\t\t\t// ======================================================================\n\t\t\t// ---------------------------- Constructor -----------------------------\n\t\t\t// ======================================================================\n\t\t\tconst LinkTypeDecorator = class extends tracking.framework.runtime\n\t\t\t\t.EventHandlerDecorator {};\n\n\t\t\tLinkTypeDecorator.prototype.logCategory =\n\t\t\t\t'ws-tagging:LinkTypeDecorator';\n\n\t\t\t// ======================================================================\n\t\t\t// --------------------------- Event Handlers ---------------------------\n\t\t\t// ======================================================================\n\n\t\t\t/**\n\t\t\t * Provides supplementary functionality for the link click handler.\n\t\t\t *\n\t\t\t * @param {Object} eventData The event data object.\n\t\t\t *\n\t\t\t * Relevant eventData properties:\n\t\t\t * {string} text Text on link\n\t\t\t * {string} url The URL listed on \"href\"\n\t\t\t * {string} pageName The name of the current page\n\t\t\t * {Object} element A reference to the element clicked\n\t\t\t */\n\t\t\tLinkTypeDecorator.prototype.handleLinkClick =\n\t\t\t\tfunction handleLinkClick(eventData) {\n\t\t\t\t\tconst { events, type } =\n\t\t\t\t\t\tfindPropertiesFromSelector(\n\t\t\t\t\t\t\tlinkTypeSelectors,\n\t\t\t\t\t\t\teventData.element\n\t\t\t\t\t\t) || {};\n\n\t\t\t\t\tthis.delegate.handleLinkClick({\n\t\t\t\t\t\t...eventData,\n\t\t\t\t\t\t...(!eventData.linkType &&\n\t\t\t\t\t\t\ttype && {\n\t\t\t\t\t\t\t\tlinkType: type\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t...(events && {\n\t\t\t\t\t\t\tlinkEvents: events\n\t\t\t\t\t\t})\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\treturn LinkTypeDecorator;\n\t\t})();\n};\n\nexport default runLinkTypeDecorator;\n"],"names":["mapping","element","match","Element","find","properties","selector","matches","Array","sel","type","events","win","namespace","DDC","tracking","shift","decorators","LinkTypeDecorator","framework","runtime","EventHandlerDecorator","prototype","logCategory","handleLinkClick","eventData","findPropertiesFromSelector","linkTypeSelectors","this","delegate","linkType","linkEvents"],"sourceRoot":""}