@assaabloy/amarr-wc-dealer-reviews-program 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e){function t(t){for(var a,i,d=t[0],c=t[1],l=t[2],p=0,u=[];p<d.length;p++)i=d[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&u.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);u.length;)u.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,d=1;d<n.length;d++){var c=n[d];0!==o[c]&&(a=!1)}a&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},o={36:0},r=[];function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var d=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var s=c;r.push([830,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var a={mobileAndUpMin:128,mobileAndUp:320,smallMobileAndUp:375,largeMobileAndUp:426,tabletPortraitUp:606,largeMobileAndUp2:576,tabletPortraitAndUp:768,tabletPortraitAndUp2:835,tabletLandscapeAndUp:992,desktopAndUp:1024,smallDesktopAndUp1:1100,smallDesktopAndUp:1200,smallDesktopAndUp2:1280,smallDesktopAndUp3:1300,smallDesktopAndUp4:1150,mediumDesktopAndUp:1400,mediumDesktopAndUp2:1600,mediumDesktopAndUp3:1680,mediumDesktopAndUp4:1440,mediumDesktopAndUp5:1520,largeDesktop:1800,maxWidthAndUp:1900,wrapperMaxWidth:1920},o={mobileAndUpMin:"(min-width: ".concat(a.mobileAndUpMin,"px)"),mobileAndUp:"(min-width: ".concat(a.mobileAndUp,"px)"),mobile1AndUp:"(max-width: ".concat(a.mobileAndUp-20,"px)"),mobileMax:"(max-width: ".concat(a.tabletPortraitAndUp-1,"px)"),smallMobileAndUp:"(min-width: ".concat(a.smallMobileAndUp,"px)"),smallMobileAndUpMax:"(max-width: ".concat(a.smallMobileAndUp+1,"px)"),smallMobileAndUpMax2:"(max-width: ".concat(a.smallMobileAndUp+5,"px)"),largeMobileAndUp:"(min-width: ".concat(a.largeMobileAndUp,"px)"),largeMobileAndUpMax:"(max-width: ".concat(a.largeMobileAndUp,"px)"),largeMobileAndUpMax2:"(max-width: ".concat(a.largeMobileAndUp-2,"px)"),largeMobileAndUp2:"(min-width: ".concat(a.largeMobileAndUp2,"px)"),largeMobileAndUp2Max:"(max-width: ".concat(a.largeMobileAndUp2,"px)"),largeMobileAndUp2Max2:"(max-width: ".concat(a.tabletPortraitUp+34,"px)"),largeMobileMin:"(min-width: ".concat(a.tabletPortraitAndUp+1,"px)"),tabletPortraitUp:"(min-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitUp2:"(min-width: ".concat(a.tabletPortraitAndUp+16,"px)"),tabletPortraitUpMax1:"(max-width: ".concat(a.tabletPortraitAndUp-1,"px)"),tabletPortraitAndUp:"(min-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitAndUpMax:"(max-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitAndUpMax2:"(max-width: ".concat(a.tabletPortraitAndUp+4,"px)"),tabletPortraitAndUpMax3:"(max-width: ".concat(a.tabletPortraitAndUp-12,"px)"),tabletPortraitAndUp2:"(min-width: ".concat(a.tabletPortraitAndUp2,"px)"),tabletPortraitAndUp2Max:"(max-width: ".concat(a.tabletPortraitAndUp2,"px)"),tabletPortraitAndUp2Max2:"(max-width: ".concat(a.tabletPortraitAndUp2-1,"px)"),tabletPortraitMax:"(max-width: ".concat(a.tabletLandscapeAndUp-1,"px)"),tabletPortraitMin:"(min-width: ".concat(a.tabletLandscapeAndUp-1,"px)"),tabletPortraitMax2:"(max-width: ".concat(a.tabletLandscapeAndUp-2,"px)"),tabletLandscapeAndUp:"(min-width: ".concat(a.tabletLandscapeAndUp,"px)"),tabletLandscapeAndUpMax:"(max-width: ".concat(a.tabletLandscapeAndUp,"px)"),desktopAndUp:"(min-width: ".concat(a.desktopAndUp,"px)"),desktopAndUpMax:"(max-width: ".concat(a.desktopAndUp,"px)"),desktopMin:"(min-width: ".concat(a.desktopAndUp+1,"px)"),desktopMax2:"(max-width: ".concat(a.desktopAndUp+1,"px)"),desktop2Max:"(max-width: ".concat(a.desktopAndUp-1,"px)"),desktopMin2:"(min-width: ".concat(a.desktopAndUp+2,"px)"),desktopMin1:"(max-width: ".concat(a.desktopAndUp+1,"px)"),desktop1Min:"(min-width: ".concat(a.desktopMin1+1,"px)"),desktop2Min:"(min-width: ".concat(a.desktopAndUp-1,"px)"),desktopMax:"(max-width: ".concat(a.smallDesktopAndUp-1,"px)"),smallDesktopAndUp1:"(min-width: ".concat(a.smallDesktopAndUp1,"px)"),smallDesktopAndUp1Max:"(max-width: ".concat(a.smallDesktopAndUp1,"px)"),smallDesktopAndUp:"(min-width: ".concat(a.smallDesktopAndUp,"px)"),smallDesktopAndUpMax:"(max-width: ".concat(a.smallDesktopAndUp,"px)"),smallDesktop2Min:"(min-width: ".concat(a.smallDesktopAndUp+1,"px)"),smallDesktopAndUp2:"(min-width: ".concat(a.smallDesktopAndUp2,"px)"),smallDesktopAndUp2Max:"(max-width: ".concat(a.smallDesktopAndUp2,"px)"),smallDesktopAndUp3:"(min-width: ".concat(a.smallDesktopAndUp3,"px)"),smallDesktopAndUp4:"(max-width: ".concat(a.smallDesktopAndUp4,"px)"),smallDesktopAndUp3Max:"(max-width: ".concat(a.smallDesktopAndUp3,"px)"),mediumDesktopMin:"(min-width: ".concat(a.smallDesktopAndUp2+1,"px)"),mediumDesktopMin2:"(min-width: ".concat(a.mediumDesktopAndUp+1,"px)"),mediumDesktopAndUp:"(min-width: ".concat(a.mediumDesktopAndUp,"px)"),mediumDesktopAndUpMax:"(max-width: ".concat(a.mediumDesktopAndUp,"px)"),mediumDesktopAndUp2:"(min-width: ".concat(a.mediumDesktopAndUp2,"px)"),mediumDesktopAndUp3:"(min-width: ".concat(a.mediumDesktopAndUp3,"px)"),mediumDesktopAndUp3Max:"(max-width: ".concat(a.mediumDesktopAndUp3,"px)"),mediumDesktopAndUp4:"(min-width: ".concat(a.mediumDesktopAndUp4,"px)"),mediumDesktopAndUp4Min:"(min-width: ".concat(a.mediumDesktopAndUp4+1,"px)"),mediumDesktopAndUp4Max:"(max-width: ".concat(a.mediumDesktopAndUp4,"px)"),mediumDesktopAndUp5:"(min-width: ".concat(a.mediumDesktopAndUp5,"px)"),mediumDesktopAndUp5Max:"(max-width: ".concat(a.mediumDesktopAndUp5-1,"px)"),largeDesktopMax:"(min-width: ".concat(a.mediumDesktopAndUp3-1,"px)"),largeDesktopMin:"(min-width: ".concat(a.mediumDesktopAndUp3+1,"px)"),largeDesktop:"(min-width: ".concat(a.largeDesktop,"px)"),maxWidthAndUp:"(min-width: ".concat(a.maxWidthAndUp,"px)"),maxWidthAndUpMax:"(max-width: ".concat(a.maxWidthAndUp,"px)"),wrapperMaxWidth:"(min-width: ".concat(a.wrapperMaxWidth,"px)"),wrapperMaxWidthMax:"(max-width: ".concat(a.wrapperMaxWidth-1,"px)"),wrapperMaxWidth2:"(min-width: ".concat(a.wrapperMaxWidth+1,"px)"),largeMobile460:"(max-width: ".concat(a.largeMobileAndUp-6,"px)"),minWidth1901:"(min-width: ".concat(a.maxWidthAndUp+1,"px)")}},14:function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return s}));var a=n(38),o=n(10),r=n.n(o);function i(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"GET",headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function d(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"DELETE",headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function c(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"POST",data:e.data,headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function l(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"PUT",data:e.data,headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function s(e){return r()({url:e,method:"GET"})}r.a.interceptors.request.use((function(e){return!(window.location.pathname.indexOf(".html")>-1)&&Object(a.a)({},e)})),r.a.interceptors.response.use((function(e){return 201===e.status&&console.log("Posted Successfully"),401===e.status&&console.log("not found"),400===e.status&&console.log("unauthorized"),e}),(function(e){return window.location.pathname.indexOf("/dealer/")>-1&&401===e.response.status&&(localStorage.removeItem("user"),localStorage.removeItem("dealer"),localStorage.removeItem("expiry"),localStorage.removeItem("token"),document.cookie="usertype=null; max-age=0;secure",localStorage.removeItem("primaryRole"),sessionStorage.removeItem("amarrRoles"),window.location.href=window.location.origin),Promise.reject(e)}))},142:function(e,t,n){"use strict";var a=n(3),o=n(0),r=n.n(o),i=n(6),d=n(17),c=n(14),l=n(15),s=n(2),p=n(12),u=n.n(p),m={theme1:{background:"var(--bg-main)"},theme2:{background:"var(--bg-alt)"}},f=n(11),x=n(5),b=n(1);function h(){var e=Object(f.a)(["\n .capitalize {\n text-transform: capitalize;\n }\n .uppercase {\n text-transform: uppercase;\n }\n .pr-snippet-stars-container {\n display: inline !important;\n margin-right: 10px;\n }\n .read-review-link {\n visibility: hidden;\n font-size: 1px;\n }\n .pr-snippet-write-review-link,\n span.pr-snippet-review-count {\n display: none;\n }\n a {\n color: var(--accent);\n font-weight: 600;\n }\n .dealer-reviews-program {\n flex: 0 0 50%;\n max-width: calc(50% - 24px);\n @media screen and "," {\n flex: 0 0 100%;\n max-width: 100%;\n flex-wrap: wrap;\n }\n .row {\n margin-bottom: 26px;\n }\n\n @media "," {\n .row {\n margin-bottom: 20px;\n }\n }\n }\n .container-gap {\n gap: 24px;\n row-gap: 24px;\n }\n .box-container {\n border: 1px solid var(--border-color);\n border-radius: 4px;\n padding: 24px 24px 4px 24px;\n }\n .p-w-r .pr-category-snippet {\n margin: 0;\n }\n .p-w-r .pr-snippet-rating-decimal {\n padding: 4px 0 0 10px !important;\n }\n "]);return h=function(){return e},e}var v=x.default.div.withConfig({displayName:"styles__Content",componentId:"m3d7ie-0"})(["",""],(function(e){var t;(null===(t=e.gradients)||void 0===t?void 0:t.visible)?e.theme.gradient:e.theme;return Object(x.css)(h(),b.b.mobileMax,b.b.mediumDesktopAndUp3Max)})),w=n(7),g=n(8),A=n(9),U={locationReviewIdLabel:"",enrolmentLabel:"",enrolledText:"",notEnrolledText:"",cta:{label:"",url:"",linkAction:"",color:"",isInternal:""},locationListingByIdAPIPath:"",noDataMessage:"",parentRedirectURL:""},k=function(e){var t=u()({},U,Object(s.g)(e.content)),n=Object(o.useState)(!1),p=Object(a.a)(n,2),f=p[0],x=p[1],b=Object(o.useState)([]),h=Object(a.a)(b,2),k=h[0],M=h[1];Object(o.useEffect)((function(){if(Object(s.A)().subscribe((function(e){x(e)})),localStorage.getItem("dealer")){var e=localStorage.getItem("dealer");JSON.parse(e).isParentAccount&&(window.location.href=t.parentRedirectURL)}var n="";window.location.search.substring(1,window.location.search.length).split("&").forEach((function(e){if("acc"===e.split("=")[0]&&(n=e.split("=")[1]),"ids"===e.split("=")[0]){var a=e.split("=")[1].split(","),o=[];if(a.forEach((function(e){""!==e&&o.push(t.locationListingByIdAPIPath.replace("{accountNumber}",n).replace("{dealerListingLocationId}",e))})),o.length>0){var r=[];o.forEach((function(e){var t;Object(s.b)(),null===(t=Object(c.c)({url:e}))||void 0===t||t.then((function(e){r.push(e.data),r.length===o.length&&(r=r.sort((function(e,t){return e.id-t.id})),M(r)),Object(s.O)()}),(function(e){Object(s.O)()})).catch((function(e){Object(s.O)()}))})),setTimeout((function(){D(r)}),2e3)}}}))}),[]);var D=function(e){if(e&&e.length>0){var t="";e.forEach((function(e){t=t+'{\n "read_services_base_url": "stable",\n "api_key": `'+d.a.PowerReviewApi+'`,\n "locale": `'+d.a.Locale+'`,\n "merchant_group_id": `'+d.a.MerchantGroupId+'`,\n "merchant_id": `'+d.a.DealerMerchantId+'`,\n "page_id": `_dealer_loc_id_'+e.id+'`,\n "on_read_reviews_click": function () {\n var a = document.getElementById(`'+e.id+'-click`)\n a.click()\n },\n "components": {\n "ReviewSnippet": `'+e.id+"`,\n }\n },"}));var n="POWERREVIEWS.display.render(["+t+"]);",a=document.createElement("script");a.innerHTML=n,setTimeout((function(){document.body.appendChild(a),setTimeout((function(){var e=document.querySelectorAll(".pr-snippet-rating-decimal");e&&e.length>0&&e.forEach((function(e){var t=Number(e.textContent).toFixed(1);e.innerText=t}))}),3e3)}),1500)}};return r.a.createElement(w.a,{setter:{componentThemes:m,selectedTheme:e.theme}},r.a.createElement(g.a,null,r.a.createElement(A.a,null,r.a.createElement(v,{isReversed:!1},f&&r.a.createElement(l.a,null),r.a.createElement("div",{className:"container d-flex container-gap flex-wrap pb-5 mb-2"},!f&&k&&0===k.length&&r.a.createElement("div",{className:"body-text2"},t.noDataMessage),k&&k.length>0&&k.map((function(e,n){var a,o,d,c,l,p,u,m,f,x,b,h;return r.a.createElement("div",{className:" dealer-reviews-program box-container",key:n},r.a.createElement("div",{className:"row mb-2"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{className:"amarr-h4 mb-1 mb-xl-2"},t.locationReviewIdLabel),r.a.createElement("div",{className:"body-text1 capitalize"},null===e||void 0===e||null===(a=e.name)||void 0===a?void 0:a.toLowerCase()),r.a.createElement("div",{className:"body-text1 uppercase"},null===e||void 0===e||null===(o=e.address)||void 0===o||null===(d=o.address1)||void 0===d?void 0:d.toLowerCase(),","," ",(null===e||void 0===e||null===(c=e.address)||void 0===c?void 0:c.address2)&&r.a.createElement("span",null,null===e||void 0===e||null===(l=e.address)||void 0===l||null===(p=l.address2)||void 0===p?void 0:p.toLowerCase(),",")," ",null===e||void 0===e||null===(u=e.address)||void 0===u||null===(m=u.city)||void 0===m?void 0:m.toLowerCase(),","," ",null===e||void 0===e||null===(f=e.address)||void 0===f?void 0:f.state,","," ",null===e||void 0===e||null===(x=e.address)||void 0===x||null===(b=x.country)||void 0===b?void 0:b.toLowerCase()," ",null===e||void 0===e||null===(h=e.address)||void 0===h?void 0:h.zip))),r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{id:e.id}))),r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{className:"amarr-h4 mb-1 mb-xl-2"},t.enrolmentLabel),r.a.createElement("p",{className:"m-0 body-text1"},e.enrolledInDealerReviews?t.enrolledText:t.notEnrolledText))),r.a.createElement("div",{className:"row mb-0"},r.a.createElement("div",{className:"col-12"},t.cta.isInternal&&r.a.createElement(i.a,{label:Object(s.i)(t.cta.label),link:!0,target:t.cta.linkAction,linkHref:"".concat(t.cta.url,"?acc=").concat(e.accountNumber,"&id=").concat(e.id),inverse:"inverse"===t.cta.color}))),r.a.createElement("a",{className:"read-review-link",id:"".concat(e.id,"-click"),href:"".concat(t.cta.url,"?acc=").concat(e.accountNumber,"&id=").concat(e.id,"#reviewsTab")},"1"))})))))))};k.defaultProps={theme:"",content:""};t.a=k},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(23),o=n(0),r=n.n(o),i=n(5),d=(n(42),i.default.div.withConfig({displayName:"styles__View",componentId:"sc-10ksvu2-0"})([".loader{position:fixed;left:0;right:0;top:0;bottom:0;text-align:var(--text-center);z-index:9999;background:rgba(0,0,0,0.5);overflow:hidden;div{align-items:center;}}"])),c=n(33),l=n.n(c),s=function(e){return Object(a.a)(e),r.a.createElement(d,null,r.a.createElement("div",{className:"d-flex justify-content-center loader"},r.a.createElement("div",{className:"d-flex"},r.a.createElement(l.a,{type:"ThreeDots",color:"rgb(0, 97, 102)",height:100,width:100}))))}},17:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a={PowerReviewApi:"3783f7b5-5e6f-4da2-90ce-1a55c1fd02b2",Locale:"en_US",MerchantGroupId:"48814",ProductMerchantId:"445672",DealerMerchantId:"135036"}},2:function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"U",(function(){return r})),n.d(t,"i",(function(){return i})),n.d(t,"D",(function(){return d})),n.d(t,"G",(function(){return c})),n.d(t,"v",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"o",(function(){return p})),n.d(t,"r",(function(){return u})),n.d(t,"I",(function(){return m})),n.d(t,"H",(function(){return f})),n.d(t,"P",(function(){return x})),n.d(t,"E",(function(){return b})),n.d(t,"u",(function(){return h})),n.d(t,"h",(function(){return v})),n.d(t,"t",(function(){return w})),n.d(t,"y",(function(){return g})),n.d(t,"w",(function(){return A})),n.d(t,"C",(function(){return U})),n.d(t,"s",(function(){return k})),n.d(t,"Q",(function(){return M})),n.d(t,"q",(function(){return D})),n.d(t,"J",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"R",(function(){return N})),n.d(t,"m",(function(){return j})),n.d(t,"j",(function(){return I})),n.d(t,"n",(function(){return _})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return L})),n.d(t,"z",(function(){return z})),n.d(t,"L",(function(){return T})),n.d(t,"x",(function(){return C})),n.d(t,"S",(function(){return W})),n.d(t,"T",(function(){return R})),n.d(t,"b",(function(){return Z})),n.d(t,"O",(function(){return H})),n.d(t,"A",(function(){return $})),n.d(t,"a",(function(){return B})),n.d(t,"d",(function(){return G})),n.d(t,"f",(function(){return F})),n.d(t,"e",(function(){return J})),n.d(t,"W",(function(){return q})),n.d(t,"c",(function(){return V})),n.d(t,"V",(function(){return K})),n.d(t,"K",(function(){return Q})),n.d(t,"M",(function(){return X})),n.d(t,"N",(function(){return Y})),n.d(t,"p",(function(){return ee}));var a=n(4),o=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},i=function(e){return e.toUpperCase()},d=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),l=new a.a(!1),s=new a.a(!1),p=new a.a(!1),u=new a.a(""),m=new a.a(!1),f=new a.a(!1),x=new a.a(!1),b=new a.a(!1),h=new a.a(!1),v=new a.a(!1),w=new a.a(""),g=new a.a(!0),A=new a.a(!0),U=new a.a(!0),k=new a.a(!0),M=new a.a(!0),D=new a.a(!0),y=new a.a({}),E=new a.a(!1),P=0,O=new a.a(!1),N=new a.a(""),j=new a.a(""),I=new a.a(""),_=new a.a(""),S=new a.a(""),L=new a.a(""),z=new a.a(""),T=new a.a(""),C=new a.a(!1),W=new a.a(!1),R=new a.a(!1),Z=(new a.a(!1),function(){setTimeout((function(){P++,E.next(!0)}),0)}),H=function(){setTimeout((function(){P>0&&P--,0==P&&E.next(!1)}),0)},$=function(){return E.asObservable()},B=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},G=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},F=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},J=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},q=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},V=function(e){return/^[0-9]*$/.test(e)},K=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},Q=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},X=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},Y=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},ee=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},26:function(e,t){e.exports=ReactDOM},6:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(29),o=n(0),r=n.n(o),i=n(5),d=n(1),c=i.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),l=i.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(["font-size:var(--font-size-s1);font-family:var(--font-family-body);font-weight:var(--font-weight-semi-bold);font-stretch:var(--font-normal);font-style:var(--font-normal);line-height:1.5;letter-spacing:var(--font-normal);text-align:var(--text-center);color:var(--bg-main);padding:12px 19px 12px 20px;border-radius:var(--border-radius);background-color:var(--accent);box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:var(--accent-hover);color:var(--bg-main);}&:focus{transform:scale(1);box-shadow:none !important;background-color:var(--accent-focus);}&:active{background-color:var(--accent-active) !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:var(--text-color);background:var(--accent-inverse);&:hover{background:var(--accent-inverse-hover);}&:focus{background:var(--accent-inverse-focus);border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:var(--accent-inverse-active) !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media ","{font-size:var(--font-size-m1);}.button-icon{vertical-align:top;padding-right:8px;}"],d.b.smallDesktop2Min),s=n(25),p=n(24),u=function(e){var t=e.label,n=void 0===t?"label":t,o=e.classStyle,i=void 0===o?"default":o,d=e.link,u=void 0!==d&&d,m=e.disabled,f=void 0!==m&&m,x=e.datatoggle,b=void 0===x?"":x,h=e.datatarget,v=void 0===h?"":h,w=e.linkHref,g=e.target,A=void 0===g?"_self":g,U=e.downloadLink,k=void 0!==U&&U,M=e.inverse,D=void 0!==M&&M,y=e.icon,E=void 0===y?"":y,P=e.iconAlt,O=void 0===P?"":P,N=e.dataItemName,j=void 0===N?"":N,I=e.id,_=void 0===I?"":I,S=e.type,L=void 0===S?"button":S,z=e.showDisabledMessage,T=void 0===z?"":z,C=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(c,null,r.a.createElement("div",{className:"".concat(f&&T&&"disabled-button-parent")},u?r.a.createElement("a",{href:w,download:k,target:A,"data-item-name":j,id:_},r.a.createElement(l,Object.assign({disabled:f,classStyle:"".concat(i)},C,{type:L,className:D?"btn-inverse btn btn-success":"btn btn-success"}),""!=E?r.a.createElement("div",{"data-toggle":b,"data-target":v},r.a.createElement("img",{loading:"lazy",className:"button-icon",src:E,alt:O}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(l,Object.assign({disabled:f,classStyle:i,className:D?"btn-inverse btn btn-success":"btn btn-success",id:_,"data-item-name":j,type:L},C),r.a.createElement("span",null,n)),f&&T&&r.a.createElement(s.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(p.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},T))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(5),o=n(0),r=n.n(o),i=function(e){var t=e.setter,n=t.componentThemes,o=t.selectedTheme;return r.a.createElement(a.ThemeProvider,{theme:function(){if(!o)return n.theme1;var e=o.match(/\d+/g).map(Number),t=Object.keys(n).find((function(t){return!(!Array.isArray(e)||1!==e.length)&&(t.includes(e[0])&&n[t])}));return t?n["".concat(t)]:n.theme1}},e.children)}},738:function(e,t,n){"use strict";n.r(t);var a=n(21),o=n(142);t.default=a.a.create({component:o.a,configuration:{tagname:"amarr-dealer-reviews-program",useShadow:!1},plugins:[]})},8:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(5),i=n(20),d=n.n(i),c=Object(a.createContext)({});t.a=function(e){var t=!1;try{var n;t=(null===(n=document)||void 0===n?void 0:n.dir)&&"rtl"===document.dir.toLowerCase()||!1}catch(i){console.log(i)}var a=t?[d.a]:[];return o.a.createElement(r.StyleSheetManager,{stylisPlugins:a},o.a.createElement(c.Provider,{value:{rtl:t}},e.children))}},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(5).default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-1pdbosk-0"})(["box-sizing:border-box;width:100%;margin:0 auto;padding:",";max-width:",";"],(function(e){return e.padding?"0 var(--grid-margin);":0}),(function(e){e.maxWidth;return"calc(var(--container-max-width)px + var(--grid-margin) + var(--grid-margin));"})),i=function(e){var t=e.className,n=e.children,a=e.maxWidth,i=void 0===a?1520:a,d=e.padding,c=void 0===d||d;return o.a.createElement(r,{className:t,maxWidth:i,padding:c},n)}}});
1
+ !function(e){function t(t){for(var a,i,d=t[0],c=t[1],l=t[2],p=0,u=[];p<d.length;p++)i=d[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&u.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);u.length;)u.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,d=1;d<n.length;d++){var c=n[d];0!==o[c]&&(a=!1)}a&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var a={},o={36:0},r=[];function i(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var d=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var s=c;r.push([832,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var a={mobileAndUpMin:128,mobileAndUp:320,smallMobileAndUp:375,largeMobileAndUp:426,tabletPortraitUp:606,largeMobileAndUp2:576,tabletPortraitAndUp:768,tabletPortraitAndUp2:835,tabletLandscapeAndUp:992,desktopAndUp:1024,smallDesktopAndUp1:1100,smallDesktopAndUp:1200,smallDesktopAndUp2:1280,smallDesktopAndUp3:1300,smallDesktopAndUp4:1150,mediumDesktopAndUp:1400,mediumDesktopAndUp2:1600,mediumDesktopAndUp3:1680,mediumDesktopAndUp4:1440,mediumDesktopAndUp5:1520,largeDesktop:1800,maxWidthAndUp:1900,wrapperMaxWidth:1920},o={mobileAndUpMin:"(min-width: ".concat(a.mobileAndUpMin,"px)"),mobileAndUp:"(min-width: ".concat(a.mobileAndUp,"px)"),mobile1AndUp:"(max-width: ".concat(a.mobileAndUp-20,"px)"),mobileMax:"(max-width: ".concat(a.tabletPortraitAndUp-1,"px)"),smallMobileAndUp:"(min-width: ".concat(a.smallMobileAndUp,"px)"),smallMobileAndUpMax:"(max-width: ".concat(a.smallMobileAndUp+1,"px)"),smallMobileAndUpMax2:"(max-width: ".concat(a.smallMobileAndUp+5,"px)"),largeMobileAndUp:"(min-width: ".concat(a.largeMobileAndUp,"px)"),largeMobileAndUpMax:"(max-width: ".concat(a.largeMobileAndUp,"px)"),largeMobileAndUpMax2:"(max-width: ".concat(a.largeMobileAndUp-2,"px)"),largeMobileAndUp2:"(min-width: ".concat(a.largeMobileAndUp2,"px)"),largeMobileAndUp2Max:"(max-width: ".concat(a.largeMobileAndUp2,"px)"),largeMobileAndUp2Max2:"(max-width: ".concat(a.tabletPortraitUp+34,"px)"),largeMobileMin:"(min-width: ".concat(a.tabletPortraitAndUp+1,"px)"),tabletPortraitUp:"(min-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitUp2:"(min-width: ".concat(a.tabletPortraitAndUp+16,"px)"),tabletPortraitUpMax1:"(max-width: ".concat(a.tabletPortraitAndUp-1,"px)"),tabletPortraitAndUp:"(min-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitAndUpMax:"(max-width: ".concat(a.tabletPortraitAndUp,"px)"),tabletPortraitAndUpMax2:"(max-width: ".concat(a.tabletPortraitAndUp+4,"px)"),tabletPortraitAndUpMax3:"(max-width: ".concat(a.tabletPortraitAndUp-12,"px)"),tabletPortraitAndUp2:"(min-width: ".concat(a.tabletPortraitAndUp2,"px)"),tabletPortraitAndUp2Max:"(max-width: ".concat(a.tabletPortraitAndUp2,"px)"),tabletPortraitAndUp2Max2:"(max-width: ".concat(a.tabletPortraitAndUp2-1,"px)"),tabletPortraitMax:"(max-width: ".concat(a.tabletLandscapeAndUp-1,"px)"),tabletPortraitMin:"(min-width: ".concat(a.tabletLandscapeAndUp-1,"px)"),tabletPortraitMax2:"(max-width: ".concat(a.tabletLandscapeAndUp-2,"px)"),tabletLandscapeAndUp:"(min-width: ".concat(a.tabletLandscapeAndUp,"px)"),tabletLandscapeAndUpMax:"(max-width: ".concat(a.tabletLandscapeAndUp,"px)"),desktopAndUp:"(min-width: ".concat(a.desktopAndUp,"px)"),desktopAndUpMax:"(max-width: ".concat(a.desktopAndUp,"px)"),desktopMin:"(min-width: ".concat(a.desktopAndUp+1,"px)"),desktopMax2:"(max-width: ".concat(a.desktopAndUp+1,"px)"),desktop2Max:"(max-width: ".concat(a.desktopAndUp-1,"px)"),desktopMin2:"(min-width: ".concat(a.desktopAndUp+2,"px)"),desktopMin1:"(max-width: ".concat(a.desktopAndUp+1,"px)"),desktop1Min:"(min-width: ".concat(a.desktopMin1+1,"px)"),desktop2Min:"(min-width: ".concat(a.desktopAndUp-1,"px)"),desktopMax:"(max-width: ".concat(a.smallDesktopAndUp-1,"px)"),smallDesktopAndUp1:"(min-width: ".concat(a.smallDesktopAndUp1,"px)"),smallDesktopAndUp1Max:"(max-width: ".concat(a.smallDesktopAndUp1,"px)"),smallDesktopAndUp:"(min-width: ".concat(a.smallDesktopAndUp,"px)"),smallDesktopAndUpMax:"(max-width: ".concat(a.smallDesktopAndUp,"px)"),smallDesktop2Min:"(min-width: ".concat(a.smallDesktopAndUp+1,"px)"),smallDesktopAndUp2:"(min-width: ".concat(a.smallDesktopAndUp2,"px)"),smallDesktopAndUp2Max:"(max-width: ".concat(a.smallDesktopAndUp2,"px)"),smallDesktopAndUp3:"(min-width: ".concat(a.smallDesktopAndUp3,"px)"),smallDesktopAndUp4:"(max-width: ".concat(a.smallDesktopAndUp4,"px)"),smallDesktopAndUp3Max:"(max-width: ".concat(a.smallDesktopAndUp3,"px)"),mediumDesktopMin:"(min-width: ".concat(a.smallDesktopAndUp2+1,"px)"),mediumDesktopMin2:"(min-width: ".concat(a.mediumDesktopAndUp+1,"px)"),mediumDesktopAndUp:"(min-width: ".concat(a.mediumDesktopAndUp,"px)"),mediumDesktopAndUpMax:"(max-width: ".concat(a.mediumDesktopAndUp,"px)"),mediumDesktopAndUp2:"(min-width: ".concat(a.mediumDesktopAndUp2,"px)"),mediumDesktopAndUp3:"(min-width: ".concat(a.mediumDesktopAndUp3,"px)"),mediumDesktopAndUp3Max:"(max-width: ".concat(a.mediumDesktopAndUp3,"px)"),mediumDesktopAndUp4:"(min-width: ".concat(a.mediumDesktopAndUp4,"px)"),mediumDesktopAndUp4Min:"(min-width: ".concat(a.mediumDesktopAndUp4+1,"px)"),mediumDesktopAndUp4Max:"(max-width: ".concat(a.mediumDesktopAndUp4,"px)"),mediumDesktopAndUp5:"(min-width: ".concat(a.mediumDesktopAndUp5,"px)"),mediumDesktopAndUp5Max:"(max-width: ".concat(a.mediumDesktopAndUp5-1,"px)"),largeDesktopMax:"(min-width: ".concat(a.mediumDesktopAndUp3-1,"px)"),largeDesktopMin:"(min-width: ".concat(a.mediumDesktopAndUp3+1,"px)"),largeDesktop:"(min-width: ".concat(a.largeDesktop,"px)"),maxWidthAndUp:"(min-width: ".concat(a.maxWidthAndUp,"px)"),maxWidthAndUpMax:"(max-width: ".concat(a.maxWidthAndUp,"px)"),wrapperMaxWidth:"(min-width: ".concat(a.wrapperMaxWidth,"px)"),wrapperMaxWidthMax:"(max-width: ".concat(a.wrapperMaxWidth-1,"px)"),wrapperMaxWidth2:"(min-width: ".concat(a.wrapperMaxWidth+1,"px)"),largeMobile460:"(max-width: ".concat(a.largeMobileAndUp-6,"px)"),minWidth1901:"(min-width: ".concat(a.maxWidthAndUp+1,"px)")}},14:function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return s}));var a=n(38),o=n(10),r=n.n(o);function i(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"GET",headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function d(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"DELETE",headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function c(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"POST",data:e.data,headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function l(e){var t=localStorage.getItem("token");if(e)return r()({url:e.url,method:"PUT",data:e.data,headers:{Authorization:"Bearer "+t,"content-type":"application/json"}})}function s(e){return r()({url:e,method:"GET"})}r.a.interceptors.request.use((function(e){return!(window.location.pathname.indexOf(".html")>-1)&&Object(a.a)({},e)})),r.a.interceptors.response.use((function(e){return 201===e.status&&console.log("Posted Successfully"),401===e.status&&console.log("not found"),400===e.status&&console.log("unauthorized"),e}),(function(e){return window.location.pathname.indexOf("/dealer/")>-1&&401===e.response.status&&(localStorage.removeItem("user"),localStorage.removeItem("dealer"),localStorage.removeItem("expiry"),localStorage.removeItem("token"),document.cookie="usertype=null; max-age=0;secure",localStorage.removeItem("primaryRole"),sessionStorage.removeItem("amarrRoles"),window.location.href=window.location.origin),Promise.reject(e)}))},142:function(e,t,n){"use strict";var a=n(3),o=n(0),r=n.n(o),i=n(6),d=n(17),c=n(14),l=n(15),s=n(2),p=n(12),u=n.n(p),m={theme1:{background:"var(--bg-main)"},theme2:{background:"var(--bg-alt)"}},f=n(11),x=n(5),b=n(1);function h(){var e=Object(f.a)(["\n .capitalize {\n text-transform: capitalize;\n }\n .uppercase {\n text-transform: uppercase;\n }\n .pr-snippet-stars-container {\n display: inline !important;\n margin-right: 10px;\n }\n .read-review-link {\n visibility: hidden;\n font-size: 1px;\n }\n .pr-snippet-write-review-link,\n span.pr-snippet-review-count {\n display: none;\n }\n a {\n color: var(--accent);\n font-weight: 600;\n }\n .dealer-reviews-program {\n flex: 0 0 50%;\n max-width: calc(50% - 24px);\n @media screen and "," {\n flex: 0 0 100%;\n max-width: 100%;\n flex-wrap: wrap;\n }\n .row {\n margin-bottom: 26px;\n }\n\n @media "," {\n .row {\n margin-bottom: 20px;\n }\n }\n }\n .container-gap {\n gap: 24px;\n row-gap: 24px;\n }\n .box-container {\n border: 1px solid var(--border-color);\n border-radius: 4px;\n padding: 24px 24px 4px 24px;\n }\n .p-w-r .pr-category-snippet {\n margin: 0;\n }\n .p-w-r .pr-snippet-rating-decimal {\n padding: 4px 0 0 10px !important;\n }\n "]);return h=function(){return e},e}var v=x.default.div.withConfig({displayName:"styles__Content",componentId:"m3d7ie-0"})(["",""],(function(e){var t;(null===(t=e.gradients)||void 0===t?void 0:t.visible)?e.theme.gradient:e.theme;return Object(x.css)(h(),b.b.mobileMax,b.b.mediumDesktopAndUp3Max)})),w=n(7),g=n(8),A=n(9),U={locationReviewIdLabel:"",enrolmentLabel:"",enrolledText:"",notEnrolledText:"",cta:{label:"",url:"",linkAction:"",color:"",isInternal:""},locationListingByIdAPIPath:"",noDataMessage:"",parentRedirectURL:""},k=function(e){var t=u()({},U,Object(s.g)(e.content)),n=Object(o.useState)(!1),p=Object(a.a)(n,2),f=p[0],x=p[1],b=Object(o.useState)([]),h=Object(a.a)(b,2),k=h[0],M=h[1];Object(o.useEffect)((function(){if(Object(s.A)().subscribe((function(e){x(e)})),localStorage.getItem("dealer")){var e=localStorage.getItem("dealer");JSON.parse(e).isParentAccount&&(window.location.href=t.parentRedirectURL)}var n="";window.location.search.substring(1,window.location.search.length).split("&").forEach((function(e){if("acc"===e.split("=")[0]&&(n=e.split("=")[1]),"ids"===e.split("=")[0]){var a=e.split("=")[1].split(","),o=[];if(a.forEach((function(e){""!==e&&o.push(t.locationListingByIdAPIPath.replace("{accountNumber}",n).replace("{dealerListingLocationId}",e))})),o.length>0){var r=[];o.forEach((function(e){var t;Object(s.b)(),null===(t=Object(c.c)({url:e}))||void 0===t||t.then((function(e){r.push(e.data),r.length===o.length&&(r=r.sort((function(e,t){return e.id-t.id})),M(r)),Object(s.O)()}),(function(e){Object(s.O)()})).catch((function(e){Object(s.O)()}))})),setTimeout((function(){D(r)}),2e3)}}}))}),[]);var D=function(e){if(e&&e.length>0){var t="";e.forEach((function(e){t=t+'{\n "read_services_base_url": "stable",\n "api_key": `'+d.a.PowerReviewApi+'`,\n "locale": `'+d.a.Locale+'`,\n "merchant_group_id": `'+d.a.MerchantGroupId+'`,\n "merchant_id": `'+d.a.DealerMerchantId+'`,\n "page_id": `_dealer_loc_id_'+e.id+'`,\n "on_read_reviews_click": function () {\n var a = document.getElementById(`'+e.id+'-click`)\n a.click()\n },\n "components": {\n "ReviewSnippet": `'+e.id+"`,\n }\n },"}));var n="POWERREVIEWS.display.render(["+t+"]);",a=document.createElement("script");a.innerHTML=n,setTimeout((function(){document.body.appendChild(a),setTimeout((function(){var e=document.querySelectorAll(".pr-snippet-rating-decimal");e&&e.length>0&&e.forEach((function(e){var t=Number(e.textContent).toFixed(1);e.innerText=t}))}),3e3)}),1500)}};return r.a.createElement(w.a,{setter:{componentThemes:m,selectedTheme:e.theme}},r.a.createElement(g.a,null,r.a.createElement(A.a,null,r.a.createElement(v,{isReversed:!1},f&&r.a.createElement(l.a,null),r.a.createElement("div",{className:"container d-flex container-gap flex-wrap pb-5 mb-2"},!f&&k&&0===k.length&&r.a.createElement("div",{className:"body-text2"},t.noDataMessage),k&&k.length>0&&k.map((function(e,n){var a,o,d,c,l,p,u,m,f,x,b,h;return r.a.createElement("div",{className:" dealer-reviews-program box-container",key:n},r.a.createElement("div",{className:"row mb-2"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{className:"amarr-h4 mb-1 mb-xl-2"},t.locationReviewIdLabel),r.a.createElement("div",{className:"body-text1 capitalize"},null===e||void 0===e||null===(a=e.name)||void 0===a?void 0:a.toLowerCase()),r.a.createElement("div",{className:"body-text1 uppercase"},null===e||void 0===e||null===(o=e.address)||void 0===o||null===(d=o.address1)||void 0===d?void 0:d.toLowerCase(),","," ",(null===e||void 0===e||null===(c=e.address)||void 0===c?void 0:c.address2)&&r.a.createElement("span",null,null===e||void 0===e||null===(l=e.address)||void 0===l||null===(p=l.address2)||void 0===p?void 0:p.toLowerCase(),",")," ",null===e||void 0===e||null===(u=e.address)||void 0===u||null===(m=u.city)||void 0===m?void 0:m.toLowerCase(),","," ",null===e||void 0===e||null===(f=e.address)||void 0===f?void 0:f.state,","," ",null===e||void 0===e||null===(x=e.address)||void 0===x||null===(b=x.country)||void 0===b?void 0:b.toLowerCase()," ",null===e||void 0===e||null===(h=e.address)||void 0===h?void 0:h.zip))),r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{id:e.id}))),r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-12"},r.a.createElement("div",{className:"amarr-h4 mb-1 mb-xl-2"},t.enrolmentLabel),r.a.createElement("p",{className:"m-0 body-text1"},e.enrolledInDealerReviews?t.enrolledText:t.notEnrolledText))),r.a.createElement("div",{className:"row mb-0"},r.a.createElement("div",{className:"col-12"},t.cta.isInternal&&r.a.createElement(i.a,{label:Object(s.i)(t.cta.label),link:!0,target:t.cta.linkAction,linkHref:"".concat(t.cta.url,"?acc=").concat(e.accountNumber,"&id=").concat(e.id),inverse:"inverse"===t.cta.color}))),r.a.createElement("a",{className:"read-review-link",id:"".concat(e.id,"-click"),href:"".concat(t.cta.url,"?acc=").concat(e.accountNumber,"&id=").concat(e.id,"#reviewsTab")},"1"))})))))))};k.defaultProps={theme:"",content:""};t.a=k},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(23),o=n(0),r=n.n(o),i=n(5),d=(n(42),i.default.div.withConfig({displayName:"styles__View",componentId:"sc-10ksvu2-0"})([".loader{position:fixed;left:0;right:0;top:0;bottom:0;text-align:var(--text-center);z-index:9999;background:rgba(0,0,0,0.5);overflow:hidden;div{align-items:center;}}"])),c=n(33),l=n.n(c),s=function(e){return Object(a.a)(e),r.a.createElement(d,null,r.a.createElement("div",{className:"d-flex justify-content-center loader"},r.a.createElement("div",{className:"d-flex"},r.a.createElement(l.a,{type:"ThreeDots",color:"rgb(0, 97, 102)",height:100,width:100}))))}},17:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a={PowerReviewApi:"3783f7b5-5e6f-4da2-90ce-1a55c1fd02b2",Locale:"en_US",MerchantGroupId:"48814",ProductMerchantId:"445672",DealerMerchantId:"135036"}},2:function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"U",(function(){return r})),n.d(t,"i",(function(){return i})),n.d(t,"D",(function(){return d})),n.d(t,"G",(function(){return c})),n.d(t,"v",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"o",(function(){return p})),n.d(t,"r",(function(){return u})),n.d(t,"I",(function(){return m})),n.d(t,"H",(function(){return f})),n.d(t,"P",(function(){return x})),n.d(t,"E",(function(){return b})),n.d(t,"u",(function(){return h})),n.d(t,"h",(function(){return v})),n.d(t,"t",(function(){return w})),n.d(t,"y",(function(){return g})),n.d(t,"w",(function(){return A})),n.d(t,"C",(function(){return U})),n.d(t,"s",(function(){return k})),n.d(t,"Q",(function(){return M})),n.d(t,"q",(function(){return D})),n.d(t,"J",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"R",(function(){return N})),n.d(t,"m",(function(){return j})),n.d(t,"j",(function(){return I})),n.d(t,"n",(function(){return _})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return L})),n.d(t,"z",(function(){return z})),n.d(t,"L",(function(){return T})),n.d(t,"x",(function(){return C})),n.d(t,"S",(function(){return W})),n.d(t,"T",(function(){return R})),n.d(t,"b",(function(){return Z})),n.d(t,"O",(function(){return H})),n.d(t,"A",(function(){return $})),n.d(t,"a",(function(){return B})),n.d(t,"d",(function(){return G})),n.d(t,"f",(function(){return F})),n.d(t,"e",(function(){return J})),n.d(t,"W",(function(){return q})),n.d(t,"c",(function(){return V})),n.d(t,"V",(function(){return K})),n.d(t,"K",(function(){return Q})),n.d(t,"M",(function(){return X})),n.d(t,"N",(function(){return Y})),n.d(t,"p",(function(){return ee}));var a=n(4),o=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},i=function(e){return e.toUpperCase()},d=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),l=new a.a(!1),s=new a.a(!1),p=new a.a(!1),u=new a.a(""),m=new a.a(!1),f=new a.a(!1),x=new a.a(!1),b=new a.a(!1),h=new a.a(!1),v=new a.a(!1),w=new a.a(""),g=new a.a(!0),A=new a.a(!0),U=new a.a(!0),k=new a.a(!0),M=new a.a(!0),D=new a.a(!0),y=new a.a({}),E=new a.a(!1),P=0,O=new a.a(!1),N=new a.a(""),j=new a.a(""),I=new a.a(""),_=new a.a(""),S=new a.a(""),L=new a.a(""),z=new a.a(""),T=new a.a(""),C=new a.a(!1),W=new a.a(!1),R=new a.a(!1),Z=(new a.a(!1),function(){setTimeout((function(){P++,E.next(!0)}),0)}),H=function(){setTimeout((function(){P>0&&P--,0==P&&E.next(!1)}),0)},$=function(){return E.asObservable()},B=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},G=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},F=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},J=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},q=function(e){return/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e)},V=function(e){return/^[0-9]*$/.test(e)},K=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},Q=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},X=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},Y=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)},ee=function(e){var t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,glass:e.selectedGlass,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t}},26:function(e,t){e.exports=ReactDOM},6:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(29),o=n(0),r=n.n(o),i=n(5),d=n(1),c=i.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),l=i.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(["font-size:var(--font-size-s1);font-family:var(--font-family-body);font-weight:var(--font-weight-semi-bold);font-stretch:var(--font-normal);font-style:var(--font-normal);line-height:1.5;letter-spacing:var(--font-normal);text-align:var(--text-center);color:var(--bg-main);padding:12px 19px 12px 20px;border-radius:var(--border-radius);background-color:var(--accent);box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:var(--accent-hover);color:var(--bg-main);}&:focus{transform:scale(1);box-shadow:none !important;background-color:var(--accent-focus);}&:active{background-color:var(--accent-active) !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:var(--text-color);background:var(--accent-inverse);&:hover{background:var(--accent-inverse-hover);}&:focus{background:var(--accent-inverse-focus);border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:var(--accent-inverse-active) !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media ","{font-size:var(--font-size-m1);}.button-icon{vertical-align:top;padding-right:8px;}"],d.b.smallDesktop2Min),s=n(25),p=n(24),u=function(e){var t=e.label,n=void 0===t?"label":t,o=e.classStyle,i=void 0===o?"default":o,d=e.link,u=void 0!==d&&d,m=e.disabled,f=void 0!==m&&m,x=e.datatoggle,b=void 0===x?"":x,h=e.datatarget,v=void 0===h?"":h,w=e.linkHref,g=e.target,A=void 0===g?"_self":g,U=e.downloadLink,k=void 0!==U&&U,M=e.inverse,D=void 0!==M&&M,y=e.icon,E=void 0===y?"":y,P=e.iconAlt,O=void 0===P?"":P,N=e.dataItemName,j=void 0===N?"":N,I=e.id,_=void 0===I?"":I,S=e.type,L=void 0===S?"button":S,z=e.showDisabledMessage,T=void 0===z?"":z,C=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type","showDisabledMessage"]);return r.a.createElement(c,null,r.a.createElement("div",{className:"".concat(f&&T&&"disabled-button-parent")},u?r.a.createElement("a",{href:w,download:k,target:A,"data-item-name":j,id:_},r.a.createElement(l,Object.assign({disabled:f,classStyle:"".concat(i)},C,{type:L,className:D?"btn-inverse btn btn-success":"btn btn-success"}),""!=E?r.a.createElement("div",{"data-toggle":b,"data-target":v},r.a.createElement("img",{loading:"lazy",className:"button-icon",src:E,alt:O}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(l,Object.assign({disabled:f,classStyle:i,className:D?"btn-inverse btn btn-success":"btn btn-success",id:_,"data-item-name":j,type:L},C),r.a.createElement("span",null,n)),f&&T&&r.a.createElement(s.a,{placement:"top",delay:{show:250,hide:250},overlay:r.a.createElement(p.a,{id:"button-tooltip"},r.a.createElement("div",{className:"p-1 amarr-h6"},T))},r.a.createElement("div",{className:"disabled-button-overlay"}))))}},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(5),o=n(0),r=n.n(o),i=function(e){var t=e.setter,n=t.componentThemes,o=t.selectedTheme;return r.a.createElement(a.ThemeProvider,{theme:function(){if(!o)return n.theme1;var e=o.match(/\d+/g).map(Number),t=Object.keys(n).find((function(t){return!(!Array.isArray(e)||1!==e.length)&&(t.includes(e[0])&&n[t])}));return t?n["".concat(t)]:n.theme1}},e.children)}},738:function(e,t,n){"use strict";n.r(t);var a=n(20),o=n(142);t.default=a.a.create({component:o.a,configuration:{tagname:"amarr-dealer-reviews-program",useShadow:!1},plugins:[]})},8:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(5),i=n(19),d=n.n(i),c=Object(a.createContext)({});t.a=function(e){var t=!1;try{var n;t=(null===(n=document)||void 0===n?void 0:n.dir)&&"rtl"===document.dir.toLowerCase()||!1}catch(i){console.log(i)}var a=t?[d.a]:[];return o.a.createElement(r.StyleSheetManager,{stylisPlugins:a},o.a.createElement(c.Provider,{value:{rtl:t}},e.children))}},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(5).default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-1pdbosk-0"})(["box-sizing:border-box;width:100%;margin:0 auto;padding:",";max-width:",";"],(function(e){return e.padding?"0 var(--grid-margin);":0}),(function(e){e.maxWidth;return"calc(var(--container-max-width)px + var(--grid-margin) + var(--grid-margin));"})),i=function(e){var t=e.className,n=e.children,a=e.maxWidth,i=void 0===a?1520:a,d=e.padding,c=void 0===d||d;return o.a.createElement(r,{className:t,maxWidth:i,padding:c},n)}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assaabloy/amarr-wc-dealer-reviews-program",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Web component - Dealer-reviews-program",
5
5
  "type": "module",
6
6
  "main": "dealer-reviews-program.js",
@@ -11,5 +11,5 @@
11
11
  },
12
12
  "author": "Nagarro",
13
13
  "license": "MIT",
14
- "gitHead": "d48358bbd19434f7c894ba5d11be622e8fd7566f"
14
+ "gitHead": "af00033930c3cf2a3178119560fd703131426031"
15
15
  }