1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8561],{48561:function(e,t,r){r.d(t,{Ph:function(){return _},kS:function(){return f},GG:function(){return z},XU:function(){return N},Gd:function(){return h},E6:function(){return c},Pk:function(){return E}});var n=r(59734),a=r(67294),o=r(85810),i=r(17680);function c(e){var t=e.id,r=e.affiliateUrl,c=e.initialData,u=e.setAffiliateCookie,l=e.disableRequest,s="".concat(o.vU,"raffall/").concat(t),f="".concat(s,"?affiliateUrl=").concat(r);r&&u();var d=(0,a.useMemo)((function(){return l?null:t?s:null}),[t,r]),p=(0,n.ZP)(d,(function(){return(0,i._i)(r?f:s,"GET")}),{onErrorRetry:i._6,onError:i.qQ,fallbackData:c,revalidateOnFocus:!1}),h=p.data,b=p.error,g=p.isValidating;return{data:h,isLoading:!b&&!h,isError:!!b,errors:(0,i.ri)(b),isValidating:g}}var u=r(50029),l=r(87794),s=r.n(l),f=function(){var e=(0,u.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,i._i)("".concat(o._n,"api/2/logout"),"POST");case 3:if(!e.sent){e.next=7;break}return window.location.href="".concat(o._n,"site/logout"),e.abrupt("return",{okay:!0});case 7:throw new Error("Logout failed!");case 10:return e.prev=10,e.t0=e.catch(0),e.t0 instanceof Error&&(0,i.qQ)(e.t0),e.abrupt("return",{okay:!1});case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),d=r(11163),p=r(16283),h=function(e){var t="".concat(o.vU,"facebook"),r=(0,d.useRouter)(),c="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash),u=(0,p.gH)()||(0,p.X_)(c)||"/";if(t="".concat(o.vU,"facebook/url?path=").concat(u),"/[id]/[slug]"===r.pathname){var l=t.includes("?")?"&":"?";t+="".concat(l,"history=1")}var s=(0,n.ZP)(t,(function(){return(0,i._i)(t,"GET")}),{onErrorRetry:i._6,onError:i.qQ,revalidateOnFocus:!1}),f=s.data,h=s.error;return(0,a.useEffect)((function(){e&&(0,n.JG)(t).catch((function(){return null}))}),[e]),{loginUrl:null===f||void 0===f?void 0:f.loginUrl,isLoading:!h&&!f,isError:!!h}},b=r(7710),g=r(59499),v=r(41800),w=r.n(v),m=r(9473),y=r(49618),O=r(42666),P=r(22401);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(){var e,t,r,c,u=(0,a.useCallback)((function(e){return(0,i._i)(e,"GET")}),[]),l=(0,n.ZP)("".concat(o.vU,"self"),u,{onErrorRetry:i._6,onError:i.qQ,focusThrottleInterval:o.m4}),s=l.data,f=l.error,d=l.isLoading,p=(0,P.TL)(),h=(0,m.v9)(y.dy),b=null===s||void 0===s||null===(e=s.data)||void 0===e?void 0:e.find((function(e){return"loggedUser"===e.type})),g=s?w()(s):void 0,v=null===g||void 0===g?void 0:g.loggedUser[null===b||void 0===b?void 0:b.id],j=null;v&&(j={id:null===(r=v.id)||void 0===r?void 0:r.toString(),attributes:k(k({},v.attributes),{},{id:v.id,profileImage:(0,i.Jn)(null===(c=v.attributes)||void 0===c?void 0:c.profileImage)})},localStorage.setItem("user",JSON.stringify(s)));h&&401===(null===f||void 0===f||null===(t=f.response)||void 0===t?void 0:t.status)&&(localStorage.removeItem("user"),p((0,O.kX)()));return{data:j,handleRevalidate:function(){(0,n.JG)("".concat(o.vU,"self"))},isLoading:d,isError:f}}var x=r(49429),S=r.n(x),U=r(47753),T=r.n(U),D=r(49124),F=r(23823),R=r(68796);function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _=new(S())({meta:{type:"uppy"},restrictions:{maxNumberOfFiles:1,allowedFileTypes:o.Pi,maxFileSize:o.iA},autoProceed:!1,onBeforeFileAdded:function(e,t){return Object.keys(t).forEach((function(e){return delete t[e]}))}});function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,g.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}_.use(T(),{id:"GalleryThumbnailGenerator",thumbnailWidth:1200,thumbnailHeight:1200,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1}),_.on("restriction-failed",(function(e){var t="The selected file ".concat(e.name," could not be uploaded. ").concat(F.SD);e.size>o.iA?P.h.dispatch((0,R.nn)("The file is too large. The size limit for images is 10mb. Please try again with a different one.")):P.h.dispatch((0,R.nn)(t))})),_.on("file-added",function(){var e=(0,u.Z)(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,D.l)(t)){e.next=16;break}return e.prev=2,e.next=5,(0,D.Fm)(t.data);case 5:if(r=e.sent){e.next=8;break}throw new Error("Failed to convert HEIC to JPEG");case 8:P.h.dispatch((0,R.kS)(r)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),e.t0 instanceof Error&&((0,i.qQ)(e.t0),n=(0,b.serializeError)(e.t0),i.kg.error({error:G({},n)},"imagesUploader"));case 14:e.next=19;break;case 16:(new FileReader).readAsDataURL(t.data),r=URL.createObjectURL(t.data);case 19:r&&P.h.dispatch((0,R.oB)({imageData:r,context:"images"})),P.h.dispatch((0,R.PM)());case 21:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),_.on("thumbnail:generated",function(){var e=(0,u.Z)(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preview){e.next=2;break}return e.abrupt("return");case 2:P.h.dispatch((0,R.kS)(t.preview));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),_.on("complete",(function(){var e=_.getState();if(Array.isArray(e.info)){var t=e.info.filter((function(e){return e.message.includes("You can only")}))[0];P.h.dispatch((0,R.nn)(null===t||void 0===t?void 0:t.message))}}));var z=new(S())({meta:{type:"uppy"},restrictions:{maxNumberOfFiles:1,allowedFileTypes:o.Pi,maxFileSize:o.iA},autoProceed:!1});z.use(T(),{id:"GalleryThumbnailGenerator",thumbnailWidth:1200,thumbnailHeight:1200,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1}),z.on("file-added",function(){var e=(0,u.Z)(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,D.l)(t)){e.next=16;break}return e.prev=2,e.next=5,(0,D.Fm)(t.data);case 5:if(r=e.sent){e.next=8;break}throw new Error("Failed to convert HEIC to JPEG");case 8:P.h.dispatch((0,R.Ot)(r)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),e.t0 instanceof Error&&((0,i.qQ)(e.t0),n=(0,b.serializeError)(e.t0),i.kg.error({error:Z({},n)},"imagesUploader"));case 14:e.next=19;break;case 16:(new FileReader).readAsDataURL(t.data),r=URL.createObjectURL(t.data);case 19:r&&P.h.dispatch((0,R.oB)({imageData:r,context:"promo-image"})),P.h.dispatch((0,R.HZ)());case 21:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}()),z.on("restriction-failed",(function(e){var t="The selected file ".concat(e.name," could not be uploaded. ").concat(F.SD);e.size>o.iA?P.h.dispatch((0,R.w4)("The file is too large. The size limit for images is 2mb. Please try again with a different one.")):P.h.dispatch((0,R.w4)(t))})),z.on("thumbnail:generated",function(){var e=(0,u.Z)(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preview){e.next=2;break}return e.abrupt("return");case 2:P.h.dispatch((0,R.Ot)(t.preview));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var A=r(48065),N=new(S())({restrictions:{maxNumberOfFiles:1,allowedFileTypes:["video/*"],maxFileSize:o.g$},autoProceed:!0});N.on("file-added",(function(e){var t=new FileReader;
1t.readAsDataURL(e.data);var r=URL.createObjectURL(e.data);P.h.dispatch((0,R.cN)(r)),t.onloadend=function(){var e=t.result;"string"===typeof e?P.h.dispatch((0,A.E)(e)):P.h.dispatch((0,R.bj)("Something went wrong. Please try again."))},P.h.dispatch((0,R.LM)())})),N.on("restriction-failed",(function(e){e.size>o.g$&&P.h.dispatch((0,R.bj)("The file is too large. The size limit for video is 100mb. Please try again with a different one."))}))},16283:function(e,t,r){r.d(t,{BY:function(){return s},GB:function(){return p},H$:function(){return l},I5:function(){return o},Ix:function(){return d},Vg:function(){return u},X_:function(){return c},gH:function(){return f},lW:function(){return i}});var n="/google-callback",a="prevPage",o=function(e){var t=e?"/google-callback/history":n;return"".concat(window.location.origin).concat(t)},i=function(){return"".concat(window.location.origin).concat("/google-callback-host")},c=function(e){if(!e)return null;try{var t=new URL(e,window.location.origin);return t.origin!==window.location.origin||(t.pathname===n||t.pathname.startsWith("".concat(n,"/"))||t.pathname.startsWith("/login"))?null:"".concat(t.pathname).concat(t.search).concat(t.hash)}catch(r){return null}},u=function(e){return window.btoa(JSON.stringify(e))},l=function(e){if(!e)return{};try{var t=JSON.parse(window.atob(e));return"object"!==typeof t||null===t?{}:t}catch(r){return{}}},s=function(e){return e.includes("?")?"".concat(e,"&history=1"):"".concat(e,"?history=1")},f=function(){return c(localStorage.getItem(a))},d=function(e){var t="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash),r=c(e||t);r&&localStorage.setItem(a,r)},p=function(){localStorage.removeItem(a)}}}]);
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.