"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5050],{522:function(e,n,t){t.d(n,{x2:function(){return _},yY:function(){return g},LN:function(){return h},hH:function(){return x},cf:function(){return F},lp:function(){return k},rM:function(){return v}});var r=t(467),i=t(2207),o=t.n(i),u=(t(8706),t(6099),t(3500),t(2010),t(9432),t(3110),t(1971)),a="analytics/add_js_event_occurence/",c="analytics/add_event_occurence/",s=t(1833),d=(0,s.y_)(),w=(0,s.uM)(),l=(0,s.yz)(),f=(0,s.v4)(),p=l?"&isMobileRequest=true":"",m=(0,s.LO)().id,h=function(){var e=(0,r.A)(o().mark((function e(n){var t,r,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.page,r=t?"?page=".concat(t):"",e.next=4,(0,u.Jl)("".concat(d).concat(m).concat(r).concat(p));case 4:return i=e.sent,a=i.data,e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=(0,r.A)(o().mark((function e(n){var t,r,i,a,c,s,d,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.page,r=n.sourceType,i=n.sourceId,a=t?"?page=".concat(t):"",c=r?"&sourceType=".concat(r):"",s=i?"&sourceId=".concat(i):"",e.next=6,(0,u.Jl)("".concat(w).concat(m).concat(a).concat(c).concat(s).concat(p));case 6:return d=e.sent,l=d.data,e.abrupt("return",l);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=(0,r.A)(o().mark((function e(n){var t,r,i,a,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.photos,r=n.widgetRef,i=new FormData,t.forEach((function(e,n){i.append("u-photos-".concat(n),e.file),i.append("reviewsRef",r)})),e.next=5,(0,u.Jl)(f,{method:"POST",body:i});case 5:if(a=e.sent,c=a.success,a.data&&c){e.next=10;break}return e.abrupt("return",!1);case 10:return e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),v=function(){var e=(0,r.A)(o().mark((function e(n){var t,r,i,a,c,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.baseUrl,r=n.widgetRef,i=n.reviewData,(a=new FormData).append("name",i.name),a.append("email",i.email),a.append("rating",i.rating),a.append("text",i.text),i.videos&&Object.keys(i.videos).length&&a.append("videos",JSON.stringify([i.videos])),!i.photos.length){e.next=14;break}return e.next=10,b({widgetRef:r,photos:i.photos});case 10:if(e.sent){e.next=13;break}return e.abrupt("return");case 13:i.photos.forEach((function(e){a.append("photos[]",e.file)}));case 14:return e.next=16,(0,u.Jl)("".concat(t,"api/public/widgets_leave_a_review/").concat(r),{method:"POST",body:a});case 16:return c=e.sent,s=c.success,e.abrupt("return",s);case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),_=function(){var e=(0,r.A)(o().mark((function e(n){var t,r,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.filterMediaUrl,(r=n.params).length){e.next=3;break}return e.abrupt("return",{success:!1,data:null,error:"No params"});case 3:return i="".concat(t),r.forEach((function(e,n){if(!e.key||!e.value)return{success:!1,data:null,error:"Invalid param"};i+="".concat(0===n?"?":"&").concat(e.key,"=").concat(e.value)})),e.next=7,(0,u.Jl)(i);case 7:return a=e.sent,e.abrupt("return",a);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=(0,r.A)(o().mark((function e(n,t){var r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Jl)("".concat(n,"pro_widgets_media_tags/").concat(t));case 2:if(r=e.sent,i=r.data,r.success){e.next=7;break}return e.abrupt("return",[]);case 7:return e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),F=function(){var e=(0,r.A)(o().mark((function e(n,t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Jl)("".concat(n).concat(c).concat(t),{method:"POST"});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.A)(o().mark((function e(n,t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Jl)("".concat(n).concat(a).concat(t),{method:"POST"});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()},1833:function(e,n,t){t.d(n,{$:function(){return L},$_:function(){return r},Bn:function(){return y},C6:function(){return d},DM:function(){return T},ES:function(){return u},Fg:function(){return a},KH:function(){return b},LO:function(){return o},Ln:function(){return C},MJ:function(){return q},NZ:function(){return _},Oy:function(){return k},TS:function(){return U},Vg:function(){return i},W2:function(){return x},WC:function(){return h},WV:function(){return S},Zo:function(){return l},_s:function(){return F},df:function(){return m},gB:function(){return g},j6:function(){return c},mn:function(){return R},mz:function(){return A},nW:function(){return I},p3:function(){return s},q3:function(){return v},qy:function(){return M},tl:function(){return w},u0:function(){return J},uM:function(){return p},v4:function(){return P},y5:function(){return O},yL:function(){return N},y_:function(){return f},yz:function(){return B}});var r=function(){return"".concat(window.baseUrl,"/")},i=function(){return window.embeddedBaseUrl?"".concat(window.embeddedBaseUrl,"/"):""},o=function(){return window.widget?JSON.parse(window.widget):{}},u=function(){return window.widgetSettings?JSON.parse(window.widgetSettings):{}},a=function(){return window.widgetMedia?JSON.parse(window.widgetMedia):[]},c=function(){return window.numMaxMedia},s=function(){return window.averageRating},d=function(){return window.averageRatingNumberOfReviews},w=function(){return window.imagesPerPage},l=function(){return window.numPages},f=function(){return window.paginationUrl},p=function(){return window.filterMediaUrl},m=function(){return window.initialIndex},h=function(){return window.startingPage},g=function(){return window.totalNumMedias},b=function(){return window.postsPerPage},v=function(){return window.isFreeUser},_=function(){return window.customCss?JSON.parse(window.customCss):""},x=function(){return window.isReviewsWidget},F=function(){return window.widgetRef},k=function(){return window.widgetLocation?window.widgetLocation:""},y=function(){return window.isTemplatePreview},R=function(){return window.isEmbeddedOnRegisterPage},B=function(){return window.isMobileRequest},T=function(){return window.overridenTitle},N=function(){return window.shouldEnableGenerateAIReview},U=function(){return window.generateAiReviewURL},A=function(){return window.shouldEnableDefaultReviewerAvatar},O=function(){return window.aiGeneratedSummary},q=function(){return window.enableOpenAIIntegration},I=function(){return window.isJapaneseUserWidget},M=function(){return window.numReviewsPerRating},P=function(){return window.submitFormCheckPhotosURL},S=function(){return window.autoAddNewPosts},J=function(){return window.lightboxBaseUrl},C=function(){return window.widgetLanguage},L=function(){return window.translations}},1399:function(e,n,t){t.d(n,{Go:function(){return r},HM:function(){return i},Ok:function(){return w},dB:function(){return d},hs:function(){return o},lX:function(){return c},nj:function(){return u},q4:function(){return s},vF:function(){return a}});var r=function(){return["#212529","#adb5bd","#2e1cd4","#5465ff","#00b0ee","#61b136","#ec0086","#ef233C","#f86624","#ffbe05"]},i=function(){return["es-rainbow-green","es-rainbow-dark-blue","es-rainbow-yellow","es-rainbow-orange","es-rainbow-light-blue","es-rainbow-pink"]},o=function(){return["instagram","facebook","youtube","twitter","vimeo","pinterest","tiktok"]},u=function(e,n){var t=["Original source","Lightbox"];return e&&t.push("CTA"),n&&t.push("Custom link"),t},a=function(e){var n=e.$wt,t=e.ratingIcon,r=e.starColor,i=e.showAiButton,o=e.uploadVideoUrl;return[{showField:!0,name:"header",component:"BaseHeaderField",props:{formTitle:n("w_share_experience")}},{showField:!0,name:"rating",component:"BaseRatingField",props:{isFieldRequired:!0,labelName:n("w_rating_l"),ratingIcon:t,ratingIconColor:r}},{showField:i,name:"text",component:"BaseAiTextareaField",props:{isFieldRequired:!0,labelName:n("w_review_l"),activateAiButtonText:n("w_ai_review"),generateAiButtonText:n("w_generate"),isLoading:!1,keywordsInputAttributes:{placeholder:n("w_write_keywords")},enableAi:!1,loaderMessage:n("w_writting_your_review")}},{showField:!i,name:"text",component:"BaseTextareaField",props:{isFieldRequired:!0,labelName:n("w_review_l")}},{showField:!0,name:"name",component:"BaseInputField",props:{isFieldRequired:!0,labelName:n("w_name_l")}},{showField:!0,name:"email",component:"BaseInputField",props:{isFieldRequired:!0,labelName:n("w_email_l")}},{showField:!0,name:"videos",component:"BaseUploadVideoField",props:{isFieldRequired:!1,labelName:n("w_video_testimonial"),uploadVideoUrl:o}},{showField:!0,name:"photos",component:"BaseUploadPhotoField",props:{isFieldRequired:!1,labelName:n("w_share_photos"),descriptionText:n("w_following_formats"),maxNumberOfImages:2}},{showField:!0,name:"submit",component:"BaseSubmitButtonField",props:{isFieldRequired:!1,buttonText:n("w_submit_review"),showBaseLinkField:!1,showCheckbox:!1}}]},c=function(e){var n=e.$wt,t=e.uploadVideoUrl,r=e.originalId,i=e.isFreeUser,o=void 0!==i&&i;return[{showField:!0,name:"header",component:"BaseHeaderField",props:{formTitle:n("w_share_voice")}},{showField:!0,name:"text",component:"BaseTextareaField",props:{isFieldRequired:!0,labelName:n("w_description")}},{showField:!0,name:"name",component:"BaseInputField",props:{isFieldRequired:!0,labelName:n("w_name_l")}},{showField:!0,name:"avatar",component:"BaseUploadAvatarField",props:{isFieldRequired:!1,labelName:n("w_avatar_photo"),buttonText:n("w_upload_photo"),descriptionText:n("w_maximum_size"),errorMessage:n("w_error_image")}},{showField:!o,name:"videos",component:"BaseUploadVideoField",props:{isFieldRequired:!1,labelName:n("w_video_testimonial"),uploadVideoUrl:t,originalId:r}},{showField:!0,name:"photos",component:"BaseUploadPhotoField",props:{isFieldRequired:!1,labelName:n("w_share_photos"),descriptionText:n("w_following_formats"),maxNumberOfImages:1}},{showField:!0,name:"submit",component:"BaseSubmitButtonField",props:{isFieldRequired:!1,buttonText:n("w_submit_post"),showBaseLinkField:!1,showCheckbox:!1}}]},s=function(e){switch(e){case"center":return"center";case"right":return"flex-end";default:return"flex-start"}},d=function(e){return[{title:e("w_userfeedbackform_inserturl"),id:"link-post",svg:"instagram",includeTrailingText:!0,trailingText:e("w_userfeedbackform_or")},{title:e("w_userfeedbackform_uploadmanually"),id:"upload-photo",includeTrailingText:!1,trailingText:""}]},w=["instagram"]}}]);