PageSourceSearch

https://www.invisiblefence.com/component---src-page-templates-dealers-tsx-a73cebc608d1d0eacd6d.js

js invisiblefence.com collected 2026-09-25 18:39:43 UTC 8,949 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="849eaf46-ae13-4525-a7ef-4588ce562588",e._sentryDebugIdIdentifier="sentry-dbid-849eaf46-ae13-4525-a7ef-4588ce562588")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"a1914b02daa8c613ead1e27da03d97f802f0ebde"};(self.webpackChunkinvisiblefence=self.webpackChunkinvisiblefence||[]).push([[5420],{66020:function(e){function t(e,t=100,a={}){if("function"!=typeof e)throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:n}="boolean"==typeof a?{immediate:a}:a;let r,o,i,s,l;function c(){const t=r,a=o;return r=void 0,o=void 0,l=e.apply(t,a),l}function d(){const e=Date.now()-s;e<t&&e>=0?i=setTimeout(d,t-e):(i=void 0,n||(l=c()))}const u=function(...e){if(r&&this!==r&&Object.getPrototypeOf(this)===Object.getPrototypeOf(r))throw new Error("Debounced method called with different contexts of the same prototype.");r=this,o=e,s=Date.now();const a=n&&!i;return i||(i=setTimeout(d,t)),a&&(l=c()),l};return Object.defineProperty(u,"isPending",{get(){return void 0!==i}}),u.clear=()=>{i&&(clearTimeout(i),i=void 0)},u.flush=()=>{i&&u.trigger()},u.trigger=()=>{l=c(),u.clear()},u}e.exports.debounce=t,e.exports=t},76716:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return w}});var n=a(14041),r=a(26370),o=a(66020),i=a.n(o),s=a(63544),l=a(50674),c=a(52053),d=a(41204),u=a(2359),m=a(57764),f=a(57142),p=a(80832),h=a(3399);const y={BHS:"Bahamas",BMU:"Bermuda",Canada:"Canada",CANADA:"Canada",CA:"Canada",CAN:"Canada","GREAT BRITAIN":"Great Britain",TTO:"Trinidad and Tobago",USA:"United States"};function g({hit:e,countryProp:t=""}){var a,r;return n.createElement("div",{className:"relative flex flex-col h-full rounded-md p-4 bg-muted flex-1"},n.createElement(c.Link,{to:"Canada"===t?`/en-ca/dealer/${e.slug}`:`/dealer/${e.slug}`,className:"absolute top-4 right-4 text-card-foreground opacity-65 hover:opacity-100"},n.createElement(l.AnD,{size:20})),n.createElement("h2",{className:"font-bold text-xl pr-6"},n.createElement(c.Link,{to:"Canada"===t?`/en-ca/dealer/${e.slug}`:`/dealer/${e.slug}`},e.name)),e.phone&&n.createElement("p",{className:"p-0 my-1"},n.createElement(s.uhe,{size:24,className:"text-primary mr-2","aria-hidden":"true"}),n.createElement("a",{href:`tel:${e.phone}`},e.phone)),e.mainServiceArea&&n.createElement("p",{className:"p-0 my-1 line-clamp-2"},n.createElement("strong",null,"Main Service Areas: ")," ",e.mainServiceArea),(null===(a=e.address)||void 0===a?void 0:a.state)&&n.createElement("p",{className:"p-0 my-1"},n.createElement("strong",null,"Canada"===y[e.address.country]?"State/Province: ":"State: ")," ",e.address.state),(null===(r=e.address)||void 0===r?void 0:r.country)&&y[e.address.country]&&n.createElement("p",{className:"p-0 my-1"},n.createElement("strong",null,"Country: ")," ",y[e.address.country]))}function b(e){return e.length>0&&function(e){return(0,r.Kq)(e,"CA")||(0,r.Kq)(e,"US")}(e)}function N({countryProp:e="",initialDealerData:t}){const a=(0,n.useContext)(d.U6),{0:o,1:s}=(0,n.useState)(!1),{0:l,1:c}=(0,n.useState)(""),{0:y,1:N}=(0,n.useState)([]),{0:v,1:w}=(0,n.useState)(!1),{0:E,1:A}=(0,n.useState)(!1),C=["ca","canada","can"],S=["us","usa","united states","great britain","bermuda","trinidad and tobago"],x=(e,t)=>{const a=null==e?void 0:e.toLowerCase();return t.some(e=>e===a)},D=t.filter(t=>{var a;const n=null===(a=t.address)||void 0===a?void 0:a.country;return x(n,"Canada"===e?C:S)});async function I(e){const t=(a=e,(0,r.Kq)(a,"CA")?a.replace(/ /g,"").replace(/(.{3})/,"$1 "):a);var a;try{const e=await async function(e){try{const t=await fetch(`https://fu7sdsqrc6.execute-api.us-east-1.amazonaws.com/prod/ifb-dealer-search?postalCode=${e}`,{method:"GET"});return await t.json()}catch(t){throw new Error("Error communicating with dealer search service, please try again later.")}}(t);N(e)}catch(n){c(n.message)}finally{w(!1)}}async function T(e){e.preventDefault();const t=e.target.value.toUpperCase().trim();if(w(!0),A(!0),c(""),N([]),s(!1),!b(t))return s(!0),void w(!1);await I(t)}return n.createElement(p.A,{headTagData:{title:"Our Network of Local Dealers | Invisible Fence",description:"Invisible Fence Dealers: Local Experts in Pet Safety Solutions & Support.",meta:(0,u.A)({title:"Our Network of Local Dealers | InvisibleFence",description:"Invisible Fence Dealers: Local Experts in Pet Safety Solutions & Support.",url:"/dealers"},"invisiblefence")}},n.createElement(m.A,null,n.createElement("h1",null,"Our Network of Local Dealers"),n.createElement("p",null,"One big reason Invisible Fence® Brand has been the industry leader for over 50 years lies with our network of trained professionals who install the system, train your pets to their boundaries, and provide full support and service when you need it. They’re ready to help you find the right solutions to keep your pets happy and safe, so find your local dealer today and take the next steps towards pet safety and freedom."),n.createElement("div",{className:"flex mb-2 flex-col",id:"search-form-container"},n.createElement("label",{htmlFor:"search-box",className:"mb-1 font-bold text-lg"},"CA"===a.getCountryCode()?"Search by postal code":"Search by ZIP/postal code"),n.createElement("form",{id:"search-box",className:"flex flex-1 h-12 relative items-center","aria-label":"Search by ZIP/postal code",onChange:i()(e=>T(e),200),onSubmit:e=>e.preventDefault()},n.createElement(f.A,{width:16,height:16,className:"absolute fill-card-foreground left-4 top-1/2 transform -translate-y-1/2","aria-hidden":"true"}),n.createElement("input",{type:"text",name:"searchTerm",className:"flex-1 h-11 px-3 py-2 rounded-md border border-input text-input bg-white text-base ring-offset-white placeholder:text-input-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus:outline focus:outline-2 focus:outline-ring focus:outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2 pl-10"})),o&&n.createElement("div",{className:"h-16 pt-4 flex items-center"},"Invalid postal code"),l&&n.createElement("div",{className:"h-16 pt-4 flex items-center"},l),v&&n.createElement("div",{className:"h-16 pt-4 flex items-center"},n.createElement(h.A,null)),0===y.length&&!v&&!o&&!l&&E&&n.createElement("div",{className:"h-16 pt-4 flex items-center"},"No results found")),y.length>0&&n.createElement("div",{className:"my-0 py-4"},n.createElement("ul",{className:"grid grid-cols-1 gap-8 auto-rows-[1fr] sm:grid-cols-2 lg:grid-cols-3 m-0 p-0"},y.map(t=>n.createElement("li",{key:t.dealerID,className:"flex items-start m-0 p-0 shadow-none"},n.createElement(g,{hit:t,countryProp:e}))))),!E&&n.createElement("div",{className:"my-0 py-4"},n.createElement("ul",{className:"grid grid-cols-1 gap-8 auto-rows-[1fr] sm:grid-cols-2 lg:grid-cols-3 m-0 p-0"},D.map(e=>n.createElement("li",{key:e.objectID,className:"flex items-start m-0 p-0 shadow-none"},n.createElement(g,{hit:e})))))))}var v=JSON.parse('{"AB":"Alberta","BC":"British Columbia","MB":"Manitoba","NB":"New Brunswick","NL":"Newfoundland and Labrador","NS":"Nova Scotia","NT":"Northwest Territories","NU":"Nunavut","ON":"Ontario","PE":"Prince Edward Island","QC":"Quebec","SK":"Saskatchewan","YT":"Yukon","AL":"Alabama","AK":"Alaska","AZ":"Arizona","AR":"Arkansas","CA":"California","CO":"Colorado","CT":"Connecticut","DE":"Delaware","FL":"Florida","GA":"Georgia","HI":"Hawaii","ID":"Idaho","IL":"Illinois","IN":"Indiana","IA":"Iowa","KS":"Kansas","KY":"Kentucky","LA":"Louisiana","ME":"Maine","MD":"Maryland","MA":"Massachusetts","MI":"Michigan","MN":"Minnesota","MS":"Mississippi","MO":"Missouri","MT":"Montana","NE":"Nebraska","NV":"Nevada","NH":"New Hampshire","NJ":"New Jersey","NM":"New Mexico","NY":"New York","NC":"North Carolina","ND":"North Dakota","OH":"Ohio","OK":"Oklahoma","OR":"Oregon","PA":"Pennsylvania","RI":"Rhode Island","SC":"South Carolina","SD":"South Dakota","TN":"Tennessee","TX":"Texas","UT":"Utah","VT":"Vermont","VA":"Virginia","WA":"Washington","WV":"West Virginia","WI":"Wisconsin","WY":"Wyoming"}');var w=function({pageContext:e,data:t}){const{locale:a}=e,r=(t.allSanityDealer.edges.map(({node:e})=>({objectID:e.objectID,name:e.name,slug:e.slug.current,phone:e.phoneNumber,email:e.email,mainServiceArea:e.mainServiceArea,address:{state:v[e.state]||e.state,country:e.country}}))||[]).filter(e=>e.slug);return"en-ca"===a?n.createElement(N,{countryProp:"Canada",initialDealerData:r}):n.createElement(N,{initialDealerData:r})}}}]);
2//# sourceMappingURL=component---src-page-templates-dealers-tsx-a73cebc608d1d0eacd6d.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.