1/*! Copyright 2025 SweetCode. All rights reserved. */ 2(self.webpackChunkPixel_Manager_for_WooCommerce=self.webpackChunkPixel_Manager_for_WooCommerce||[]).push([[849],{900(){!function(e){const t=new class{adapt(e,t,r){const a=`adapt${this.toPascalCase(t)}`;return"function"==typeof this[a]?this[a](e,r):null}toPascalCase(e){return"string"!=typeof e?"":e.replace(/(^|_)(\w)/g,(e,t,r)=>r.toUpperCase())}getProductId(e){if(!e)return null;const t=pmwDataLayer?.pixels?.nextdoor?.dynamic_remarketing?.id_type;return t&&e.dyn_r_ids&&e.dyn_r_ids[t]?String(e.dyn_r_ids[t]):e.id?String(e.id):null}toPrice(e){const t=Math.round(100*Number(e))/100;return Number.isFinite(t)?t:0}toOrderValue(e){return this.toPrice(e).toFixed(2)}getBaseData(){const t={event_id:e.getRandomEventId(),source_url:window.location.href,customer:e.getNextdoorCustomerData()},r=e.getNextdoorClickId();return r&&(t.customer.click_id=r),t}getProductContextEntry(e,t,r){const a=this.getProductId(e);return a?{id:a,content_name:e.name||"",quantity:Number(t)||1,item_price:this.toPrice(r)}:null}adaptPageView(e,t){const r=this.getBaseData();return r.event_name="PAGE_VIEW",r.custom_data={},r}adaptViewItem(e,t){const r=this.getProductContextEntry(e.product,1,e.product?.price);if(!r)return null;const a=this.getBaseData();return a.event_name="VIEW_CONTENT",a.custom_data={product_context:[r]},a}adaptAddToCart(e,t){const r=e.product,a=Number(r?.quantity)||1,o=this.getProductContextEntry(r,a,r?.price);if(!o)return null;const n=this.getBaseData();return n.event_name="ADD_TO_CART",n.custom_data={product_context:[o]},n}adaptBeginCheckout(t,r){const a=this.getBaseData();if(a.event_name="INITIATE_CHECKOUT",a.custom_data={},pmwDataLayer?.cart&&!e.isEmptyObject(pmwDataLayer.cart)){pmwDataLayer?.shop?.currency&&(a.custom_data.order_value=this.toOrderValue(e.getCartValue()),a.custom_data.currency=pmwDataLayer.shop.currency);const t=[];Object.values(pmwDataLayer.cart).forEach(e=>{const r=this.getProductContextEntry(e,e.quantity,e.price);r&&t.push(r)}),t.length&&(a.custom_data.product_context=t)}return a}
2adaptSearch(e,t){const r=this.getBaseData();return r.event_name="SEARCH",r.custom_data={},r}adaptPurchase(e,t){if(!pmwDataLayer?.order)return null;const r=[];Object.values(pmwDataLayer.order.items||{}).forEach(e=>{let t=pmwDataLayer.products?.[e.id];pmwDataLayer?.shop?.variations_output&&e.variation_id&&0!==e.variation_id&&(t=pmwDataLayer.products?.[e.variation_id]||t);const a=this.getProductId(t)||(e.id?String(e.id):null);a&&r.push({id:a,content_name:e.name||t?.name||"",quantity:Number(e.quantity)||1,item_price:this.toPrice(e.price)})});const a={order_id:String(pmwDataLayer.order.number||pmwDataLayer.order.id)};pmwDataLayer.order.currency&&(a.order_value=this.toOrderValue(pmwDataLayer.order.value?.marketing),a.currency=pmwDataLayer.order.currency),r.length&&(a.product_context=r);const o=this.getBaseData();return o.event_id=pmwDataLayer.order.id?"pmw_"+String(pmwDataLayer.order.id):o.event_id,o.event_name="PURCHASE",o.custom_data=a,o}};e.registerAdapter("nextdoor",t,{supportsS2S:!0,supportsEventDeduplication:!0,supportsPageViewS2S:!0,isActive:()=>!0===pmwDataLayer?.pixels?.nextdoor?.loaded&&!0===e.consent.categories.get().marketing,isConfigured:()=>!!pmwDataLayer?.pixels?.nextdoor?.pixel_id})}(window.pmw=window.pmw||{})},3265(){var e;(e=window.pmw=window.pmw||{}).bus.on("pmw:load-pixels",function(){pmwDataLayer?.pixels?.nextdoor?.pixel_id&&!pmwDataLayer?.pixels?.nextdoor?.loaded&&e.consent.canPixelBeFired("marketing","Nextdoor")&&e.loadNextdoorPixel()}),e.bus.on("pmw:pixel:page-view",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}}),e.bus.on("pmw:pixel:view-item",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}}),e.bus.on("pmw:pixel:add-to-cart",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}}),e.bus.on("pmw:pixel:begin-checkout",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}}),e.bus.on("pmw:pixel:search",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}}),e.bus.on("pmw:pixel:purchase",t=>{if(pmwDataLayer?.pixels?.nextdoor?.loaded&&e.shouldFireBrowserPixel(t,"nextdoor"))try{const r=t.pixels?.nextdoor;if(!r)return;e.nextdoorTrackEvent(r)}catch(e){console.error(e)}})},9506(){var e;(e=window.pmw=window.pmw||{}).getNextdoorCustomerData=()=>{const e={};return pmwDataLayer?.pixels?.nextdoor?.advanced_matching&&(pmwDataLayer?.user?.email?.sha256&&(e.email=pmwDataLayer.user.email.sha256),pmwDataLayer?.user?.id?.sha256&&(e.external_id=pmwDataLayer.user.id.sha256)),e},e.getNextdoorClickId=()=>e.getCookie("ndclid")||e.retrieveData("ndclid"),e.loadNextdoorPixel=()=>{try{!function(e,t,r){if(!e.ndp){var a=e.ndp=function(){a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments)};a.queue=[];var o="script",n=t.createElement(o);n.async=!0,n.src=r;var i=t.getElementsByTagName(o)[0];i.parentNode.insertBefore(n,i)}}(window,document,"https://ads.nextdoor.com/public/pixel/ndp.js?id="+pmwDataLayer.pixels.nextdoor.pixel_id);const t={},r=e.getNextdoorCustomerData();r.email&&(t.user_email_hash=r.email),window.ndp("init",pmwDataLayer.pixels.nextdoor.pixel_id,t),pmwDataLayer.pixels.nextdoor.loaded=!0,e.console.log("Nextdoor: pixel loaded")}catch(e){console.error(e)}},e.nextdoorTrackEvent=t=>{try{if("function"!=typeof window.ndp)return;if(!t?.event_name)return;const r={pixel_ids:[pmwDataLayer.pixels.nextdoor.pixel_id]};t.event_id&&(r.event_id=t.event_id);const a={...t.custom_data||{}};a.order_value&&a.currency&&(a.order_value=a.currency+a.order_value,delete a.currency),window.ndp("track",t.event_name,r,a),e.console.log("Nextdoor: "+t.event_name+" event sent",t)}catch(e){console.error(e)}}},4624(e,t,r){r(900),r(9506),r(3265)}}]); 3//# sourceMappingURL=pixel-nextdoor.c195de38.chunk.min.js.map
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.