1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1196],{14070:function(e,r,t){var n=t(85893),a=t(16829);r.Z=e=>{let{svgClass:r,pathClass:t,width:s,height:o,...i}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:(0,a.Z)(r||"stroke-cadet"),width:null!=s?s:"24",height:null!=o?o:"24","aria-label":"Arrow Left Icon",...i,children:(0,n.jsx)("path",{d:"M15 18L9 12L15 6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t})})}},14191:function(e,r,t){var n=t(85893),a=t(16829);r.Z=e=>{let{svgClass:r,pathClass:t,width:s,height:o,...i}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:(0,a.Z)(r||"stroke-cadet"),width:null!=s?s:"24",height:null!=o?o:"24","aria-label":"Arrow Right Icon",...i,children:(0,n.jsx)("path",{d:"M9 18L15 12L9 6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t})})}},3798:function(e,r,t){var n=t(85893),a=t(16829);r.Z=e=>{let{svgClass:r,pathClass:t,size:s,...o}=e;return(0,n.jsxs)("svg",{width:(0,a.Z)(s||"16"),height:(0,a.Z)(s||"16"),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Magnifying Glass Icon",className:(0,a.Z)(r||"stroke-cadet"),...o,children:[(0,n.jsx)("path",{d:"M7.33333 12.6667C10.2789 12.6667 12.6667 10.2789 12.6667 7.33333C12.6667 4.38781 10.2789 2 7.33333 2C4.38781 2 2 4.38781 2 7.33333C2 10.2789 4.38781 12.6667 7.33333 12.6667Z",className:(0,a.Z)(t||"stroke-cadet"),strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14.0001 14L11.1001 11.1",className:(0,a.Z)(t||"stroke-cadet"),strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}},98316:function(e,r,t){t.d(r,{Z:function(){return E}});var n,a,s=t(85893),o=t(67294),i=t(83275),l=t(42113);(n=a||(a={})).organic="organic-search",n.paid="paid-search",n.campaign1="campaign-1",n.campaign2="campaign-2",n.valueBrand="value-brand",n.topRightDomain="top-right-domain",n.topRightCampaign="top-right-campaign",n.general="general-campaign",n.focus="focus-campaign";var u=a;function c(e,r,t,n,a){return e||(r||t||a?u.general:n?u.focus:u.organic)}let g=t(1604).z.string().regex(/^(?:\+?1[- ]?)?\d{3}[- ]?\d{3}[- ]?\d{4}$/).transform(e=>e.replace(/\D/g,"")).transform(e=>e.slice(-10));function d(e,r){let t=e.find(e=>e.numberType===r);if(!(null==t?void 0:t.number))return console.warn("WhoDis: no matching number found for filter '".concat(r,"' in"),e),null;let{success:n,data:a,error:s}=g.safeParse(t.number);return n?a:(s&&console.warn("WhoDis: matched number validation error: '".concat(t.number,"'"),JSON.stringify(s.format())),null)}var m=e=>{let{leased:r,override:t,numbers:n,default:a,persisted:s,filter:o,isGeneralCampaign:i,isFocusCampaign:l,isFallbackCampaign:u,enableWhoDisOverride:m,useTraneInfo:p}=e;if(!RegExp("^$|^n\\/a$","i").test(r)){let{success:e,data:t,error:n}=g.safeParse(r);if(e)return t;n&&console.warn("WhoDis: leased number validation error: '".concat(r,"'"),n.format())}if(m&&t.length){let{success:e,data:r,error:n}=g.safeParse(t);if(e)return r;n&&console.warn("WhoDis: whoDisOverrideNumber validation error: '".concat(t,"'"),n.format())}if(n.length&&p){let e=d(n,c(void 0,p,i,l,u));if(e)return e}if(n.length){let e=d(n,c(o,p,i,l,u));if(e)return e}return a||s||null},p=t(3833),f=t(68188),h=t(61773);let v=async e=>{let r,t;try{r=await fetch("/residential/api/whodisoverride/",{method:"POST",signal:e})}catch(e){if(e instanceof Error)return console.error("Error fetching phone number overrides | ".concat(e.message)),{status:400,body:null,error:e};return{status:400,body:null,error:Error("Error fetching phone number overrides")}}if(!r.ok||r.status>=400)return console.error("Error fetch phone number overrides | ".concat(r.statusText)),{status:r.status,body:null,error:Error("Error fetching phone number overrides | ".concat(r.statusText))};try{t=await r.json()}catch(e){if(e instanceof Error)return console.error("Error parsing phone number overrides | ".concat(e.message)),{status:400,body:null,error:e};return console.error("Error parsing phone number overrides | ".concat(String(e))),{status:400,body:null,error:Error("Error parsing phone number overrides",{cause:e})}}
1if(200===r.status){let{success:e,data:r,error:n}=h.hl.safeParse(t.body);return e?{status:200,body:r,error:null}:{status:422,body:null,error:Error("Invalid response structure from WhoDis Discrete Numbers API: "+JSON.stringify(n.format()))}}return{status:500,body:null,error:Error("Unexpected response from WhoDis Override API: ".concat(r.status," ").concat(r.statusText))}};var b=function(){let e=sessionStorage.getItem("phoneOverride");if(e)try{let r=JSON.parse(e),{success:t,data:n,error:a}=h.hl.safeParse(r);if(t&&n.length)return n;throw Error("Invalid data format in sessionStorage"+(null==a?void 0:a.format()))}catch(e){sessionStorage.removeItem("phoneOverride")}return null};let w=e=>e.replace(/#.*$/,""),x=e=>e.replace(/\?.*$/,""),k=e=>e.startsWith("/")?e:"/".concat(e),z=(e,r)=>{let t=w(e),n=w(k(r));if(!t.includes("?")||!t.includes(n)||x(t)!==x(n))return!1;let a=t.indexOf(n),s=t[a+n.length];return void 0===s||"&"===s||"?"===s};var y=(e,r)=>{var t,n;let a=w(r),s=null===(t=e.find(e=>{let{key:r}=e;return r&&w(k(r))===a}))||void 0===t?void 0:t.phoneNumber,o=null===(n=[...e].filter(e=>{var r;return null===(r=e.key)||void 0===r?void 0:r.length}).sort((e,r)=>r.key.length-e.key.length).find(e=>z(a,e.key)))||void 0===n?void 0:n.phoneNumber,i=null!=s?s:o;return i&&r.includes("campaign")&&"true"===sessionStorage.getItem("firstVisit")&&sessionStorage.setItem("persistedNumber",i),null!=i?i:f.gJ.tel},N=function(e){let r=JSON.stringify(e);sessionStorage.setItem("phoneOverride",r)};async function D(e,r){let t=b();if(t)return y(t,e);let{body:n}=await v(r);return n?(N(n),y(n,e)):f.gJ.tel}var I=t(11163),E=e=>{let{specifiedNumber:r="",phoneNumbers:t=[],directNumber:n="",children:a,linkClass:u="text-trane-red hover:text-hover-red",numberClass:c,excludeOneDisplay:d=!1,dataLocation:h="",dataPosition:v="",autoLaunch:b=!1,enableWhoDisOverride:w=!1,referer:x,numberType:k,forceUseTraneInfo:z}=e,[y,N]=(0,o.useState)(null),[E,j]=(0,o.useState)(f.gJ.tel),S=o.useRef(!1),{asPath:Z}=(0,I.useRouter)(),L=(0,p.Z)(),P=z||L,W=(0,l.ZP)(x),O=(0,o.useMemo)(()=>m({leased:r,override:E,numbers:t,default:n,persisted:y,filter:k,isFocusCampaign:W===l.Qx.Focus,isGeneralCampaign:W===l.Qx.General,isFallbackCampaign:W===l.Qx.Fallback,enableWhoDisOverride:w,useTraneInfo:P}),[n,w,k,E,t,y,W,r,P]),C=(0,i.Z)(O),G=(0,i.Z)(O,d);return(0,o.useEffect)(()=>{(null==O?void 0:O.length)&&b&&!S.current&&(S.current=!0,window.open("tel:+".concat(G),"_self"))},[b,G,null==O?void 0:O.length]),(0,o.useEffect)(()=>{let e=sessionStorage.getItem("persistedNumber");if(null===e)return;let{success:r,data:t,error:n}=g.safeParse(e);r&&N(t),n&&console.warn("WhoDis: persisted number validation error: '".concat(e,"'"),JSON.stringify(n.format()))},[]),(0,o.useEffect)(()=>{let e=new AbortController,r=async()=>{try{let r=await D(Z,e.signal);e.signal.aborted||j(r)}catch(e){console.error("WhoDis: error fetching override number",e)}};if(w)return r(),()=>e.abort()},[Z,w]),(0,s.jsxs)("a",{href:"tel:+".concat(C),className:u,id:"WhodisLink","data-position":v,"data-location":h,"data-action":"call","data-text-grouping":"phone number","data-text":C,"data-type":"link",children:[a," ",(0,s.jsx)("span",{className:c,children:G})]})}},42113:function(e,r,t){t.d(r,{Qx:function(){return o},ZP:function(){return g}});var n=t(67294),a=t(11163);let s=t(1604).z.enum(["Focus","General","Fallback","Active","Default"]),o=s.enum,i=["/campaigns/2024-fall-offer/","/campaigns/2024-fall-offer-canada/","/campaigns/2025-spring-offer/","/campaigns/2025-spring-offer-canada/","/campaigns/sy/hvac-built-to-last/","/campaigns/mv/hvac-built-to-last/"],l=["/campaigns/trane-hvac-built-to-last/","/resources/repair-and-replace/","/campaigns/mg/2025-spring-offer/","/campaigns/mg/trane-hvac-built-to-last/","/campaigns/mg/repair-or-replace/","/campaigns/mg/heat-pump-incentives/"],u=["/campaigns/sk/2026-offer-texas/","/campaigns/mg/2026-offer-phoenix/","/campaigns/mg/repair-or-replace-phoenix/","/residential/en/campaigns/mg/repair-or-replace-phoenix/","/campaigns/sk/repair-or-replace-texas/","/residential/en/campaigns/mg/repair-or-replace/","/residential/en/campaigns/sk/repair-or-replace-texas/"],c=["/dealer-locator/","/schedule-service/","/find-a-dealer/"];var g=e=>{let{asPath:r}=(0,a.useRouter)(),t=null!=e?e:r;return(0,n.useMemo)(()=>i.some(e=>t.includes(e))?s.enum.Focus:l.some(e=>t.includes(e))?s.enum.General:c.some(e=>t.includes(e))?s.enum.Active:u.some(e=>t.includes(e))?s.enum.Fallback:s.enum.Default,[t])}},61773:function(e,r,t){t.d(r,{IQ:function(){return i},Md:function(){return c},c:function(){return u},hl:function(){return o}});var n=t(88341),a=t(1604);let s=a.z.object({discreteNumberID:a.z.string(),phoneNumber:a.z.string(),targetPhoneNumber:a.z.string(),routingGroupID:a.z.number(),description:a.z.string(),key:a.z.string(),numberTypeName:a.z.string(),poolName:a.z.string(),poolID:a.z.number(),metaData:a.z.record(a.z.unknown())}).partial().passthrough(),o=a.z.array(s),i=a.z.object({externalSessionID:a.z.string(),pageReferrer:a.z.string(),leaseName:a.z.string(),metaData:a.z.object({dealerName:a.z.string(),initialPage:a.z.string(),gaSessionId:a.z.string(),[n.$]:a.z.string()}).partial().passthrough().optional()}).partial().passthrough().extend({routingGroupID:a.z.number()}),l=a.z.record(a.z.string()),u=a.z.object({name:a.z.string(),routingGroupID:a.z.number(),poolID:a.z.number(),targetPhoneNumber:a.z.string(),phoneNumbers:l}).partial().passthrough(),c=a.z.object({leaseID:a.z.number(),leaseName:a.z.string(),leasePhoneNumber:a.z.string(),leaseEnd:a.z.string(),routingGroup:u}).partial().passthrough()},83275:function(e,r){r.Z=(e,r)=>{if(!e||"string"!=typeof e)return"";let t=e.replace(/\D/g,"");if(t.length<10)return"";t.length>
110&&(t=t.slice(-10));let n=t.slice(0,3),a=t.slice(3,6),s=t.slice(6,10);return"".concat(r?"":"1-").concat(n,"-").concat(a,"-").concat(s)}}}]);
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.