PageSourceSearch

https://amberexpress.net/Scripts/JS/Common/ContactUS.jsx

js amberexpress.net collected 2026-10-02 02:02:06 UTC 7,413 bytes, 194 lines download raw bytes

1// @hash v3-1E7D6FFA07F89C58D4A7435E96E63DD8745A2815
2// Automatically generated by ReactJS.NET. Do not edit, your changes will be overridden.
3// Version: 5.2.12 (build 29c76c8) with Babel 7.8.7
4// Generated at: 10/2/2026 7:32:05 AM
5///////////////////////////////////////////////////////////////////////////////
6const {
7  useEffect,
8  useState
9} = React;
10export default function ContactUS(props) {
11  let [contacUsData, setContacUsData] = useState([]);
12  let [isHoOffice, setIsHoOffice] = useState([]);
13  useEffect(() => {
14    (async function () {
15      await ContactUs();
16    })();
17  }, []);
18
19  const ContactUs = async () => {
20    try {
21      $(".isLoader").show();
22      await axios.post('/Web_Methods/OtherWebMethod.aspx/ContactUs', {}).then(async response => {
23        let data = await JSON.parse(response.data.d.data);
24        await setContacUsData(data);
25
26        let uniqState = _.uniqBy(data, 'StateName');
27
28        let stateCity = [];
29        let headOffice = [];
30
31        for (let so = 0; so < uniqState.length; so++) {
32          let StateObj = {
33            satename: '',
34            city: []
35          };
36
37          let currentState = _.filter(data, {
38            StateName: uniqState[so].StateName
39          });
40
41          StateObj.satename = uniqState[so].StateName;
42
43          let uniqCity = _.uniqBy(currentState, 'CityName');
44
45          for (let cn = 0; cn < uniqCity.length; cn++) {
46            let cityObj = [];
47            cityObj.CityName = uniqCity[cn].CityName;
48
49            let currentCity = _.filter(currentState, {
50              CityName: uniqCity[cn].CityName
51            });
52
53            for (let ho = 0; ho < currentCity.length; ho++) {
54              if (currentCity[ho].IsHoOffice == 1) {
55                headOffice.push(currentCity[ho]); //cityObj.address = [];
56
57                cityObj.address = currentCity;
58              } else {
59                cityObj.address = currentCity;
60              }
61            }
62
63            StateObj.city.push(cityObj);
64          }
65
66          stateCity.push(StateObj);
67        }
68
69        setContacUsData(stateCity);
70        setIsHoOffice(headOffice);
71      }).catch(function (error) {
72        console.log(error);
73      });
74    } catch (error) {
75      console.log("Error : " + error);
76    } finally {
77      $(".isLoader").hide();
78    }
79  };
80
81  return React.createElement(React.Fragment, null, React.createElement("div", {
82    id: "wrapper"
83  }, React.createElement("div", {
84    className: "fix_contentwidth"
85  }, React.createElement("div", {
86    className: "panel panel-primary"
87  }, React.createElement("div", {
88    className: "panel-heading"
89  }, "Contact Us"), React.createElement("div", {
90    className: "panel-body"
91  }, props.compDetails?.companyData?.CompanyID == 20 && React.createElement(React.Fragment, null, React.createElement("h5", null, "Head Office Contact Number"), React.createElement("div", {
92    className: "maincontcadd"
93  }, React.createElement("div", {
94    className: "contact_headoffice_no"
95  }, React.createElement("div", {
96    className: "contact_div"
97  }, React.createElement("span", null, React.createElement("i", {
98    class: "fa-solid fa-phone"
99  })), React.createElement("div", {
100    className: "contact_num"
101  }, React.createElement("p", null, "Mumbai Office"), React.createElement("a", {
102    href: "tel:8652222727"
103  }, "+91 8652222727"))), React.createElement("div", {
104    className: "contact_div"
105  }, React.createElement("span", null, React.createElement("i", {
106    class: "fa-solid fa-phone"
107  })), React.createElement("div", {
108    className: "contact_num"
109  }, React.createElement("p", null, "Pune Office"), React.createElement("a", {
110    href: "tel:8888424424"
111  }, "+91 8888424424")))))), props.compDetails?.companyData?.CompanyID != 20 && isHoOffice.length > 0 && isHoOffice.map((hOffice, hOIndex) => React.createElement(React.Fragment, {
112    key: hOIndex
113  }, React.createElement("div", {
114    className: "maincontcadd"
115  }, React.createElement("h2", null, "HEAD OFFICE"), React.createElement("p", null, React.createElement("div", {
116    dangerouslySetInnerHTML: {
117      __html: isHoOffice[hOIndex].Address + "<br>" + isHoOffice[hOIndex].CityName + "-" + isHoOffice[hOIndex].pincode + "," + "  " + isHoOffice[hOIndex].StateName + "<br>" + isHoOffice[hOIndex].ContactNumber
118    }
119  }
119)), isHoOffice[hOIndex].direction != null && isHoOffice[hOIndex].direction != '' && React.createElement("a", {
120    href: isHoOffice[hOIndex].direction,
121    className: "direction_city",
122    target: "_blank"
123  }, React.createElement("i", {
124    class: "fa-solid fa-location-dot"
125  }), "  Direction")))), React.createElement("div", {
126    className: "contactuscol"
127  }, contacUsData.length > 0 && contacUsData.map((stateName, index) => React.createElement(React.Fragment, {
128    key: index
129  }, React.createElement("div", {
130    className: "Row"
131  }, React.createElement("div", {
132    className: "cityaddname"
133  }, stateName.satename), stateName.city.length > 0 && stateName.city.map((child, childIndex) => React.createElement(React.Fragment, {
134    key: childIndex
135  }, React.createElement("div", {
136    className: "addrow",
137    style: {
138      display: 'inline-block',
139      verticalAlign: 'top',
140      width: '25%'
141    }
142  }, React.createElement("div", {
143    className: "col-lg-12 col-md-12 col-sm-12 col-xs-12 paddgz",
144    style: {
145      paddingBottom: '15px'
146    }
147  }, React.createElement("div", {
148    className: "tabs"
149  }, React.createElement("div", {
150    className: "tab"
151  }, React.createElement("input", {
152    type: "checkbox",
153    id: index + '_' + childIndex
154  }), React.createElement("label", {
155    className: "tab-label",
156    htmlFor: index + '_' + childIndex
157  }, child.CityName), React.createElement("div", {
158    className: "tab-content"
159  }, child.address.length > 0 && child.address.map((add, addInd) => React.createElement(React.Fragment, {
160    key: addInd
161  }, React.createElement("h4", null, add.CityAreaName), React.createElement("p", null, React.createElement("div", {
162    dangerouslySetInnerHTML: {
163      __html: add.Address + "<br>" + add.pincode + "<br>"
164    }
165  }), renderContactNumbers(add.ContactNumber), add.direction != null && add.direction != '' && React.createElement("a", {
166    href: add.direction,
167    className: "direction_city",
168    target: "_blank"
169  }, React.createElement("i", {
170    class: "fa-solid fa-location-dot"
171  }), " Direction"))))))))))))))))))));
172}
173
174const renderContactNumbers = contactString => {
175  if (!contactString) return null; // Extract and remove <b>Contact no:-</b>
176  //const hasTitle = /<b>.*?<\/b>/i.test(contactString);
177  //const numbers = contactString
178  //    .replace(/<b>.*?<\/b>/i, "") // remove bold part
179  //    .split(/,|<br>/) // split by comma or <br>
180  //    .map(num => num.trim())
181  //    .filter(num => num);
182
183  let cleanString = contactString.replace(/<\/?br\s*\/?>/gi, ","); // Extract and remove <b>Contact no:-</b>
184
185  const hasTitle = /<b>.*?<\/b>/i.test(cleanString);
186  const numbers = cleanString.replace(/<b>.*?<\/b>/i, "") // remove bold part
187  .split(",") // split only by commas now (br are already replaced)
188  .map(num => num.trim()).filter(num => num);
189  return React.createElement("p", null, hasTitle && React.createElement("b", null, "Contact no:- "), numbers.map((num, i) => React.createElement(React.Fragment, {
190    key: i
191  }, React.createElement("a", {
192    href: `tel:${num.replace(/\s+/g, "")}`
193  }, num), i !== numbers.length - 1 && ', ')));
194};

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.