1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5760],{55121:(e,t,n)=>{"use strict";n.d(t,{JX:()=>y,TU:()=>D,a$:()=>N,a8:()=>j,f0:()=>w,lw:()=>k,vh:()=>A,w9:()=>S});var r=n(63857),o=n(43081),a=n.n(o),s=n(91040),i=n(4518),c=n(48979),l=n(61846),u="/api/pwa",d=l.A.generateOtpUrl,p=l.A.loginUrl,h=l.A.linkedAccountVarificationUrl,f=l.A.selectMainAccountUrl,m=(l.A.logOutUrl,l.A.loginVerifiedSession,l.A.handleSubmitAnswers),g=l.A.deleteAccountUrl;function b(){var e=window.localStorage&&window.localStorage.loginData&&JSON.parse(window.localStorage.loginData),t=e&&e.cookieList&&e.cookieList[0].name,n=e&&e.cookieList&&e.cookieList[1].name,r=e&&e.cookieList&&e.cookieList[0].value,o=e&&e.cookieList&&e.cookieList[1].value;return"".concat(t,"=").concat(r,";").concat(n,"=").concat(o)}l.A.subscriptionCancellationURL,l.A.subscriptionManageURL,n(76757);var v=function(){var e=_.at(window,"__dhpwa__.clientData");if(!e){var t=c.A.fetchDataFromEasyLevels();t&&(e={signature:t.signature4,clientid:t.clientId4,fingerprint:t.fingerprint4})}return e},x={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},withCredentials:!0},y=function(){var e=(0,r.A)(a().mark(function e(t){var n,r;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(i.aG,"userprofile/tpv/").concat(t,"?topicType=userProfile&partner=localhost:3007&mode=pwa"),r={method:"GET"},e.abrupt("return",C(n,r));case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,r.A)(a().mark(function e(t){var n,r,o,s;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=v())&&n.clientid,r=n&&n.signature,o=b(),"".concat(r,";").concat(o),s={dhAccount:t},x.data={method:"POST",body:s,url:f},e.abrupt("return",C(u,x));case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,r.A)(a().mark(function e(t){var n,r,o;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=v())&&n.clientid,r=n&&n.signature,o=b(),"".concat(r,";").concat(o),x.data={method:"POST",body:t,url:g},e.abrupt("return",C(u,x));case 7:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=(0,r.A)(a().mark(function e(t){var n,r,o;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=v())&&n.clientid,r=n&&n.signature,o=b(),"".concat(r,";").concat(o),x.data={method:"POST",body:t,url:m},e.abrupt("return",C(u,x));case 7:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=(0,r.A)(a().mark(function e(t,n,r){var o,s,i,c,l;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=(o=v())&&o.clientid,i=o&&o.signature,c=b(),"".concat(i,";").concat(c),l={userAuthType:t,clientId:s,mobileNo:"91-"+n,otp:r},x.data={method:"POST",body:l,url:h},e.abrupt("return",C(u,x));case 8:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}(),S=function(){var e=(0,r.A)(a().mark(function e(t,n){var r,o,s;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(r=v())&&r.clientid,r&&r.signature,s={userAuthType:t,explicit:"Y",token:n,clientId:o},p=window.location.search.includes("onlyLogin=true")||p.includes("loginForAccountDeletion")?p:p+"?loginForAccountDeletion=true",x.data={method:"POST",body:s,url:p},e.abrupt("return",C(u,x));case 7:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),N=function(){var e=(0,r.A)(a().mark(function e(t,n,r){var o,s,i;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s=(o=v())&&o.clientid,o&&o.signature,i={userAuthType:t,clientId:s},"MOBILE_OTP"==t&&(i.mobileNo="91-"+n,i.explicit="Y",i.otp=r),p=window.location.search.includes("onlyLogin=true")||p.includes("loginForAccountDeletion")?p:p+"?loginForAccountDeletion=true",x.data={method:"POST",body:i,url:p},e.abrupt("return",C(u,x));case 11:e.prev=11,e.t0=e.catch(0),console.error("this is submitLoginForOtpError",e.t0);case 14:case"end":return e.stop()}},e,null,[[0,11]])}));return function(t,n,r){return e.apply(this,arguments)}}(),D=function(){var e=(0,r.A)(a().mark(function e(t,n){var r,o;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(r=v())&&r.signature,o={mobileNo:"91-"+t},n&&(o.altcha=n),x.data={action:"generateOtp",method:"POST",body:o,url:d},e.abrupt("return",C(u,x));case 9:e.prev=9,e.t0=e.catch(0),console.error("this is getOtpResponseError");case 12:case"end":return e.stop()}},e,null,[[0,9]])}));return function(t,n){return e.apply(this,arguments)}}(),C=function(){var e=(0,r.A)(a().mark(function e(t,n){var r,o,i,c,l;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,s.A)(t,n);case 3:return r=e.sent,e.abrupt("return",r.data);case 7:if(e.prev=7,e.t0=e.catch(0),!e.t0.response){e.next=17;break}if(i=(o=e.t0.response).status,c=o.statusText,l=o.data,console.error("Error ".concat(i,": ").concat(c),l),!(l&&"object"==typeof l&&("code"in l||l.status))){e.next=14;break}return e.abrupt("return",l);case 14:return e.abrupt("return",{success:!1,status:i,statusText:c,data:l});case 17:return console.error("Network error or other issue",e.t0.message),e.abrupt("return",{success:!1,message:e.t0.message});case 19:return e.abrupt("return",e.t0);case 20:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t,n){return e.apply(this,arguments)}}()},74736:function(e,t,n){var r;r=function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(4)},function(e,t,n){e.exports=n(6)()},function(t,n){t.exports=e},function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return decodeURIComponent(e.replace(RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=r(n(2)),c=r(n(1)),l=r(n(5)),u=r(n(3)),d=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var s=arguments.length,i=Array(s),c=0;c<s;c++)i[c]=arguments[c];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={isSdkLoaded:!1,isProcessing:!1},r.responseApi=function(e){window.FB.api("/me",{locale:r.props.language,fields:r.props.fields},function(t){a(t,e),r.props.callback(t)})},r.checkLoginState=function(e){r.setStateIfMounted({isProcessing:!1}),e.authResponse?r.responseApi(e.authResponse):r.props.onFailure?r.props.onFailure({status:e.status}):r.props.callback({status:e.status})},r.checkLoginAfterRefresh=function(e){"connected"===e.status?r.checkLoginState(e):window.FB.login(function(e){return r.checkLoginState(e)},!0)},r.click=function(e){if(r.state.isSdkLoaded&&!r.state.isProcessing&&!r.props.isDisabled){r.setState({isProcessing:!0});var t=r.props,n=t.scope,o=t.appId,a=t.onClick,s=t.returnScopes,i=t.responseType,c=t.redirectUri,u=t.disableMobileRedirect,d=t.authType,p=t.state;if("function"!=typeof a||(a(e),!e.defaultPrevented)){var h={client_id:o,redirect_uri:c,state:p,return_scopes:s,scope:n,response_type:i,auth_type:d};if(r.props.isMobile&&!u)window.location.href="https://www.facebook.com/dialog/oauth"+(0,l.default)(h);else{if(!window.FB)return void(r.props.onFailure&&r.props.onFailure({status:"facebookNotLoaded"}));window.FB.login(r.checkLoginState,{scope:n,return_scopes:s,auth_type:h.auth_type})}}}},o(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),s(t,[{key:"componentDidMount",value:function(){if(this._isMounted=!0,document.getElementById("facebook-jssdk"))return void this.sdkLoaded();this.setFbAsyncInit(),this.loadSdkAsynchronously();var e=document.getElementById("fb-root");e||((e=document.createElement("div")).id="fb-root",document.body.appendChild(e))}},{key:"componentWillReceiveProps",value:function(e){this.state.isSdkLoaded&&e.autoLoad&&!this.props.autoLoad&&window.FB.getLoginStatus(this.checkLoginAfterRefresh)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"setStateIfMounted",value:function(e){this._isMounted&&this.setState(e)}},{key:"setFbAsyncInit",value:function(){var e=this,t=this.props,n=t.appId,r=t.xfbml,o=t.cookie,a=t.version,s=t.autoLoad;window.fbAsyncInit=function(){window.FB.init({version:"v"+a,appId:n,xfbml:r,cookie:o}),e.setStateIfMounted({isSdkLoaded:!0}),(s||e.isRedirectedFromFb())&&window.FB.getLoginStatus(e.checkLoginAfterRefresh)}}},{key:"isRedirectedFromFb",value:function(){var e=window.location.search;return(0,u.default)(e,"code")||(0,u.default)(e,"granted_scopes")}},{key:"sdkLoaded",value:function(){this.setState({isSdkLoaded:!0})}},{key:"loadSdkAsynchronously",value:function(){var e,t,n,r,o,a=this.props.language;t="script",n="facebook-jssdk",o=r=(e=document).getElementsByTagName(t)[0],e.getElementById(n)||((o=e.createElement(t)).id=n,o.src="https://connect.facebook.net/"+a+"/sdk.js",r.parentNode.insertBefore(o,r))}},{key:"render",value:function(){if(!this.props.render)throw Error("ReactFacebookLogin requires a render prop to render");var e={onClick:this.click,isDisabled:!!this.props.isDisabled,isProcessing:this.state.isProcessing,isSdkLoaded:this.state.isSdkLoaded};return this.props.render(e)}}]),t}(i.default.Component);d.propTypes={isDisabled:c.default.bool,callback:c.default.func.isRequired,appId:c.default.string.isRequired,xfbml:c.default.bool,cookie:c.default.bool,authType:c.default.string,scope:c.default.string,state:c.default.string,responseType:c.default.string,returnScopes:c.default.bool,redirectUri:c.default.string,autoLoad:c.default.bool,disableMobileRedirect:c.default.bool,isMobile:c.default.bool,f
1ields:c.default.string,version:c.default.string,language:c.default.string,onClick:c.default.func,onFailure:c.default.func,render:c.default.func.isRequired},d.defaultProps={redirectUri:"undefined"!=typeof window?window.location.href:"/",scope:"public_profile,email",returnScopes:!1,xfbml:!1,cookie:!1,authType:"",fields:"name",version:"2.3",language:"en_US",disableMobileRedirect:!1,isMobile:function(){var e=!1;try{e=!!(window.navigator&&window.navigator.standalone||navigator.userAgent.match("CriOS")||navigator.userAgent.match(/mobile/i))}catch(e){}return e}(),onFailure:null,state:"facebookdirect",responseType:"code"},t.default=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")}},function(e,t,n){"use strict";function r(){}var o=n(7);e.exports=function(){function e(e,t,n,r,a,s){if(s!==o){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=r(n(14232))},95760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>eb});var r,o,a=n(42969),s=n(67251),i=n(23745),c=n(80033),l=n(76966),u=n(73910),d=n(52672),p=n(14232),h=n(74162),f=n(32131),m=n(20371),g=n.n(m),b=n(54587),v=n.n(b),x=n(37876),y=n(63857),w=n(43081),k=n.n(w),A=n(77328),j=n.n(A),S=null,N=n(74736),D=n.n(N),C=n(4518),T=n(61846),O="prod"==C.Gj?"17344308122-57t2752ntmubsmqvi2llcjplapqqmrsd.apps.googleusercontent.com":"688489692230-do780norutrojk7as5g5u403oirm3u28.apps.googleusercontent.com";T.A.userPersonalizationUrl;var P=".dailyhunt.in",L=n(67802),R=n(29454),I=n(55121);let E=(0,p.createContext)(null);function F({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:o}){let a=function(e={}){let{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[o,a]=(0,p.useState)(!1),s=(0,p.useRef)(n);s.current=n;let i=(0,p.useRef)(r);return i.current=r,(0,p.useEffect)(()=>{let e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.nonce=t,e.onload=()=>{var e;a(!0),null===(e=s.current)||void 0===e||e.call(s)},e.onerror=()=>{var e;a(!1),null===(e=i.current)||void 0===e||e.call(i)},document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),o}({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),s=(0,p.useMemo)(()=>({clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return p.createElement(E.Provider,{value:s},o)}let M={large:40,medium:32,small:20};function U({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:o="standard",theme:a="outline",size:s="large",text:i,shape:c,logo_alignment:l,width:u,locale:d,click_listener:h,containerProps:f,...m}){let g=(0,p.useRef)(null),{clientId:b,scriptLoadedSuccessfully:v}=function(){let e=(0,p.useContext)(E);if(!e)throw Error("Google OAuth components must be used within GoogleOAuthProvider");return e}(),x=(0,p.useRef)(e);x.current=e;let y=(0,p.useRef)(t);y.current=t;let w=(0,p.useRef)(r);return w.current=r,(0,p.useEffect)(()=>{var e,t,r,p,f,k,A,j,S;if(v)return null===(r=null===(t=null===(e=null==window?void 0:window.google)||void 0===e?void 0:e.accounts)||void 0===t?void 0:t.id)||void 0===r||r.initialize({client_id:b,callback:e=>{var t,n,r;if(!(null==e?void 0:e.credential))return null===(t=y.current)||void 0===t?void 0:t.call(y);let{credential:o,select_by:a}=e;x.current({credential:o,clientId:null!==(r=null==(n=e)?void 0:n.clientId)&&void 0!==r?r:null==n?void 0:n.client_id,select_by:a})},...m}),null===(k=null===(f=null===(p=null==window?void 0:window.google)||void 0===p?void 0:p.accounts)||void 0===f?void 0:f.id)||void 0===k||k.renderButton(g.current,{type:o,theme:a,size:s,text:i,shape:c,logo_alignment:l,width:u,locale:d,click_listener:h}),n&&(null===(S=null===(j=null===(A=null==window?void 0:window.google)||void 0===A?void 0:A.accounts)||void 0===j?void 0:j.id)||void 0===S||S.prompt(w.current)),()=>{var e,t,r;n&&(null===(r=null===(t=null===(e=null==window?void 0:window.google)||void 0===e?void 0:e.accounts)||void 0===t?void 0:t.id)||void 0===r||r.cancel())}},[b,v,n,o,a,s,i,c,l,u,d]),p.createElement("div",{...f,ref:g,style:{height:M[s],...null==f?void 0:f.style}})}var B=n(60556),q=n(89099),z=n(20609),V=n(43505),W=n(89230),H=n(30848),G=n(70236),Y=function(){return window.location.search.includes("client=true")},$=function(e){return new URLSearchParams(window.location.search).get("language")||(null==e?void 0:e.selectedLang)||"en"},K=function(e){var t=e?"night":"day";return{radioUnchecked:"/images/delete-account/icn_radio_unchecked_".concat(t,".svg"),radioChecked:"/images/delete-account/icn_radio_checked_".concat(t,".svg"),appPreference:"/images/delete-account/icn_app_preference_".concat(t,".svg"),appDeleteCommentPost:"/images/delete-account/icn_app_del_comment_post_".concat(t,".svg"),deleteIcon:"/images/delete-account/icn_delete_account_delete.svg"}};let J=function(e){var t=e.question,n=e.onAnswer,r=e.handleFlag,o=e.isDarkTheme,a=(0,p.useState)(""),s=a[0],i=a[1],c=K(o);(0,p.useEffect)(function(){n&&s&&n({questionCode:t.id,optionCode:s})},[s,t.id,n]);var l=function(e){i(e),r(!0)};return(0,x.jsxs)("div",{className:"question",children:[(0,x.jsx)("h4",{className:"text-base font-bold leading-5 mb-2.5 text-black dark:text-white",children:t.title}),(0,x.jsx)("div",{className:"rounded border border-[#eee] dark:border-[#545454] px-4 py-5",children:t.options.map(function(e,t){var n="optionCode".concat(t+1),r=s===n;return(0,x.jsx)("button",{type:"button",className:"w-full text-left py-2 border-b border-[#eee] dark:border-[#545454] last:border-b-0 ".concat(""),onClick:function(){return l(n)},children:(0,x.jsx)("span",{className:"block min-h-6 pr-[26px] text-sm font-medium text-black dark:text-white bg-no-repeat bg-right-top bg-[length:24px_auto]",style:{backgroundImage:"url(".concat(r?c.radioChecked:c.radioUnchecked,")")},children:e})},n)})})]})};var Q=n(38910);let X=function(e){var t=e.answers,n=e.onContinue,r=e.allQuestionsAnswered,o=e.selelectedFlag,a=e.history,s=e.langCode,i=(0,Q.A)(s),c=i.continueToDeleteString,l=i.cancelDeleteString;return(0,x.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[(0,x.jsx)("button",{type:"button",className:"w-full py-2.5 text-center text-sm font-medium capitalize rounded transition-colors ".concat(o&&r?"bg-black text-white dark:bg-[#ffffff] dark:text-[#000000]":"bg-[#eee] text-[#999] dark:bg-[#333] dark:text-[#999] cursor-not-allowed"),onClick:function(){r&&n&&n(t)},disabled:!r,children:c}),(0,x.jsx)("button",{type:"button",className:"w-full py-2.5 text-center text-sm font-medium capitalize text-black dark:text-white",onClick:function(){a&&a.back()},children:l})]})},Z=(0,q.withRouter)((0,z.A)(function(e){var t=e.history,n=e.text,r=e.isDarkTheme;return(0,x.jsxs)("div",{className:"flex items-center gap-2 border-b border-[#eee] dark:border-[#545454] pb-3 mb-4",children:[(0,x.jsx)("button",{type:"button","aria-label":"Back",className:"w-7 h-7 shrink-0 bg-no-repeat bg-center bg-[length:28px]",style:{backgroundImage:"url(".concat(r?"/images/icn_back_primary_dark.svg":"/images/icn_back_primary.svg",")")},onClick:function(){t&&t.back()}}),(0,x.jsx)("span",{className:"text-sm font-medium text-black dark:text-white capitalize",children:n})]})}));var ee=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){var t;return(0,s.A)(this,r),(t=n.call(this,e)).handleFlag=function(e){t.setState({selelectedFlag:e})},t.handleAnswerChange=function(e){t.setState(function(t){var n,r=t.answers.findIndex(function(t){return t.questionCode===e.questionCode});if(r>
1-1){if((n=(0,G.A)(t.answers))[r].optionCode===e.optionCode)return null;n[r]=e}else n=[].concat((0,G.A)(t.answers),[e]);return{answers:n}})},t.state={answers:[],selelectedFlag:!1},t}return(0,i.A)(r,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"componentDidUpdate",value:function(e,t){t.answers!==this.state.answers&&this.props.onAnswersChanged&&this.props.onAnswersChanged(this.state.answers)}},{key:"render",value:function(){var e=this,t=this.props,n=t.history,r=t.onContinue,o=t.questionsData,a=t.store,s=this.state,i=s.answers,c=s.selelectedFlag,l=$(a),u=(null==a?void 0:a.isDarkTheme)===!0||"true"===String(null==a?void 0:a.isDarkTheme),d=(0,Q.A)(l),p=d.beforeYouDeleteWeMayHelpYouString,h=d.sorryToSeeYouLeaveString,f=i.every(function(e){return e.optionCode});return(0,x.jsxs)(x.Fragment,{children:[Y()&&(0,x.jsx)(Z,{history:n,text:"Delete Account",isDarkTheme:u}),(0,x.jsxs)("section",{className:"pb-6",children:[(0,x.jsx)("h4",{className:"text-base font-bold leading-5 mb-2.5 text-black dark:text-white",children:p}),(0,x.jsx)("p",{className:"text-xs leading-[15px] mb-6 text-[#333] dark:text-[#eee]",children:h}),o.map(function(t){return(0,x.jsx)(J,{question:t,onAnswer:e.handleAnswerChange,handleFlag:e.handleFlag,isDarkTheme:u},t.id)})]}),(0,x.jsx)(X,{answers:i,onContinue:r,allQuestionsAnswered:f,questionsData:o,selelectedFlag:c,history:n,langCode:l})]})}}]),r}(p.Component);let et=(0,q.withRouter)((0,z.A)(ee));var en=n(48979);let er=function(e){var t=$(e.store),n=(0,Q.A)(t).receivedRequestString;return(0,x.jsx)("div",{className:"fixed inset-0 z-10 flex items-center justify-center bg-[#f5f5f5] dark:bg-[#333] p-10",children:(0,x.jsx)("div",{className:"w-full max-w-sm rounded bg-white dark:bg-[#545454] px-6 py-5 text-center shadow-[0_10px_24px_rgba(0,0,0,0.1)]",children:(0,x.jsx)("h5",{className:"text-base font-medium leading-5 text-[#545454] dark:text-[#eee]",children:n})})})};var eo=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){(0,s.A)(this,r),(a=n.call(this,e)).handleDelete=(0,y.A)(k().mark(function e(){var t,n,r,o,s,i,c,l,u,d,p,h,f,m,g,b,v,x,y,w;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(o=a.props).deldata,i=o.answers,c=o.authType,l=o.token,u=o.name,d=o.phoneNumber,p=o.otp,h=o.history,null!=i&&i.length){e.next=4;break}return a.setState({deleteError:"Unable to delete your account. Please try again."}),e.abrupt("return");case 4:return a.setState({deleteError:""}),e.next=7,(0,I.vh)(i);case 7:if(g=null==(m=(f=e.sent)&&f.data)?void 0:m.sToken,b=null!==(t=null==m?void 0:m.deleteOpinionId)&&void 0!==t?t:null==s?void 0:s.deleteOpinionId,!(!g||!b)){e.next=14;break}return a.setState({deleteError:"Unable to delete your account. Please try again."}),e.abrupt("return");case 14:return v=a.state.clientData&&a.state.clientData.clientid,e.next=17,a.generateHash(v);case 17:return x={clientIdentifier:e.sent,userAuthType:c,token:l,explicit:"Y",fullName:u,mobileNo:"91-"+d,authorizationCode:"",clientId:v,otp:p},p||delete x.otp,l||delete x.token,d||delete x.mobileNo,y={authRequestNewList:[x],deleteOpinionId:b,sToken:g},e.next=25,(0,I.lw)(y);case 25:if(!Y()){e.next=28;break}return a.setState({oKbox:!0}),e.abrupt("return");case 28:w=(0,V.hC)("/news/".concat((null===(n=a.store)||void 0===n?void 0:n.selectedCountry)||"india","/").concat(W.A[(null===(r=a.store)||void 0===r?void 0:r.selectedLang)||"en"])),null==h||h.replace(w);case 30:case"end":return e.stop()}},e)})),a.generateHash=(t=(0,y.A)(k().mark(function e(t){var n,r;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new TextEncoder().encode(t),e.next=4,crypto.subtle.digest("SHA-256",n);case 4:return r=Array.from(new Uint8Array(e.sent)),e.abrupt("return",r.map(function(e){return e.toString(16).padStart(2,"0")}).join(""));case 7:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),a.store=a.props.store;var t,o,a,i=null===(o=window.__dhpwa__)||void 0===o?void 0:o.clientData;if(!i){var c=en.A.fetchDataFromEasyLevels();c&&(i={signature:c.signature4,clientid:c.clientId4,fingerprint:c.fingerprint4})}return a.state={clientData:i,oKbox:!1,deleteError:""},a}
1return(0,i.A)(r,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"render",value:function(){var e,t,n=this;if(this.state.oKbox)return(0,x.jsx)(er,{store:this.store});var r=$(this.store),o=(null===(e=this.store)||void 0===e?void 0:e.isDarkTheme)===!0||"true"===String(null===(t=this.store)||void 0===t?void 0:t.isDarkTheme),a=K(o),s=(0,Q.A)(r),i=s.cancelDeleteString,c=s.submitToDeleteString,l=s.appPreferenceWillDeleteString,u=s.confirmPermanentDeleteString,d=s.AllWillDeleteString,p=s.deleteMyAccountString,h=s.confirmDeletionString;return(0,x.jsxs)(x.Fragment,{children:[Y()&&(0,x.jsx)(Z,{history:this.props.history,text:h,isDarkTheme:o}),(0,x.jsxs)("section",{className:"pb-6",children:[(0,x.jsx)("h4",{className:"text-base font-bold leading-5 mb-2.5 text-black dark:text-white",children:u}),(0,x.jsx)("p",{className:"text-xs leading-[15px] mb-6 text-[#333] dark:text-[#eee]",children:c}),(0,x.jsxs)("div",{className:"rounded border border-[#e0e0e0] dark:border-[#545454] bg-[#f5f5f5] dark:bg-[#333] px-4 py-1",children:[(0,x.jsx)("div",{className:"flex min-h-8 items-center border-b border-[#e0e0e0] dark:border-[#545454] py-4 pl-11 text-xs text-[#333] dark:text-[#eee] bg-no-repeat bg-left-top bg-[length:32px_auto]",style:{backgroundImage:"url(".concat(a.appDeleteCommentPost,")")},children:d}),(0,x.jsx)("div",{className:"flex min-h-8 items-center py-4 pl-11 text-xs text-[#333] dark:text-[#eee] bg-no-repeat bg-left-top bg-[length:32px_auto]",style:{backgroundImage:"url(".concat(a.appPreference,")")},children:l})]})]}),(0,x.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[this.state.deleteError&&(0,x.jsx)("p",{className:"text-sm text-red-600",children:this.state.deleteError}),(0,x.jsx)("button",{type:"button",onClick:this.handleDelete,className:"w-full rounded bg-[#e54646] dark:bg-[#e54646] py-2.5 text-center text-sm font-semibold text-white dark:text-white transition-colors",children:(0,x.jsx)("span",{className:"inline-block bg-no-repeat bg-left-center bg-[length:20px_auto] pl-7 capitalize text-white dark:text-white",style:{backgroundImage:"url(".concat(a.deleteIcon,")")},children:p})}),(0,x.jsx)("button",{type:"button",className:"w-full rounded py-2.5 text-center text-sm font-medium capitalize bg-transparent dark:bg-transparent text-black dark:text-white transition-colors",onClick:function(){var e;return null===(e=n.props.history)||void 0===e?void 0:e.back()},children:i})]})]})}}]),r}(p.Component);let ea=(0,q.withRouter)((0,z.A)(eo));var es=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){var t,o;return(0,s.A)(this,r),(t=n.call(this,e)).handleContinue=(o=(0,y.A)(k().mark(function e(n){var r,o;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.length===t.state.questions.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,(0,I.vh)(n);case 4:if(o=(r=e.sent)&&r.data){e.next=9;break}return t.setState({submitError:"Unable to submit your response. Please try again."}),e.abrupt("return");case 9:t.setState({confirmDel:!0,delData:o,answers:n,submitError:""});case 10:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),t.handleAnswersChanged=function(e){t.setState({answers:e})},t.store=t.props.store,t.state={answers:null,confirmDel:!1,delData:null,submitError:"",questions:[{id:"questionCode1",title:"Why do you want to delete your Dailyhunt account",options:["I do not use the app","I do not find it very useful","The news are not relevant","The news are repetitive","I re
1ceive too many notifications","The app does not work on my phone","The app is very slow"]}]},t}return(0,i.A)(r,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"render",value:function(){var e=this.state.submitError;return(0,x.jsx)(x.Fragment,{children:this.state.confirmDel?(0,x.jsx)(ea,{name:this.props.name,phoneNumber:this.props.phoneNumber,otp:this.props.otp,authType:this.props.authType,token:this.props.token,userId:this.props.userId,deldata:this.state.delData,answers:this.state.answers,store:this.store,history:this.props.history}):(0,x.jsxs)(x.Fragment,{children:[e&&(0,x.jsx)("p",{className:"mb-3 text-sm text-red-600",children:e}),(0,x.jsx)(et,{history:this.props.history,onAnswersChanged:this.handleAnswersChanged,onContinue:this.handleContinue,questionsData:this.state.questions,store:this.store})]})})}}]),r}(p.Component);let ei=(0,q.withRouter)((0,z.A)(es));var ec=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){var t,o;return(0,s.A)(this,r),(t=n.call(this,e)).handleToSelectMainAccount=(o=(0,y.A)(k().mark(function e(n){var r,o,a,s;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(r=[t.getAccountInfo()].filter(Boolean))&&r.reduce(function(e,t){return t.keyIdentifier==n?e.selectedId=t.keyIdentifier:e.defunctId=t.keyIdentifier,e},{}),e.next=4,(0,I.f0)(o);case 4:(a=e.sent)&&200==a.code?(a.data&&(0,B.M)(a.data,t.store,!0),s=(0,V.hC)("/news/".concat(t.store.selectedCountry,"/").concat(W.A[t.store.selectedLang],"/side-menu")),t.props.history.push(s)):console.error("this is something not happening");case 6:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)}),t.getAccountInfo=function(){var e=t.props.linkedAccountInfo;return Array.isArray(e)?e[0]:e},t.getLinkedAccounts=function(){var e=t.props.linkedAccountInfo;return Array.isArray(e)?e:e?[e]:[]},t.goToDeletionPage=function(){t.setState({isDeletionPage:!1})},t.cancelDeletion=function(){var e;null===(e=t.props)||void 0===e||null===(e=e.history)||void 0===e||e.back()},t.store=t.props.store,t.state={isDeletionPage:!0},t}return(0,i.A)(r,[{key:"render",value:function(){var e,t,n=$(this.store),r=(null===(e=this.store)||void 0===e?void 0:e.isDarkTheme)===!0||"true"===String(null===(t=this.store)||void 0===t?void 0:t.isDarkTheme),o=this.getLinkedAccounts(),a=this.getAccountInfo(),s=this.state.isDeletionPage,i=this.props,c=i.token,l=i.phoneNumber,u=i.otp,d=i.authType,p=i.history,h=(0,Q.A)(n),f=h.confirmYourAccountString,m=h.beforeYouPermanentlyDeleteYourAccountString,g=h.cancelDeleteString,b=h.proceedDeleteString,v=h.confirmAccountString;return(0,x.jsx)(x.Fragment,{children:s?(0,x.jsxs)(x.Fragment,{children:[Y()&&c&&(0,x.jsx)(Z,{history:p,text:v,isDarkTheme:r}),(0,x.jsxs)("section",{className:"pb-6",children:[(0,x.jsx)("h4",{className:"text-base font-bold leading-5 mb-2.5 text-black dark:text-white",children:f}),(0,x.jsxs)("p",{className:"text-xs leading-[15px] mb-6 text-[#333] dark:text-[#eee]",children:[m,"."]}),o.map(function(e,t){var n=e&&e.name,r=e&&e.handle,o=e&&e.profileImage&&(0,H.AN)(e.profileImage,{width:100,height:100}).webp;return(0,x.jsx)("div",{className:"mb-6",children:(0,x.jsxs)("div",{className:"flex items-center gap-2",children:[(0,x.jsx)("figure",{className:"w-[52px] h-[52px] rounded-full overflow-hidden shrink-0",children:(0,x.jsx)("img",{src:o,alt:n||"Profile",className:"w-full h-full object-cover",loading:"lazy"})}),(0,x.jsxs)("div",{children:[(0,x.jsx)("h5",{className:"font-semibold capitalize text-black dark:text-white",children:n}),(0,x.jsxs)("span",{className:"block text-xs text-[#545454] dark:text-[#e0e0e0]",children:["@",r]})]})]})},t)})]}),(0,x.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[(0,x.jsx)("button",{type:"button",className:"w-full rounded bg-black py-2.5 text-center text-sm font-medium capitalize text-white dark:bg-[#ffffff] dark:text-[#000000] transition-colors",onClick:this.goToDeletionPage,children:b}),(0,x.jsx)("button",{type:"button",className:"w-full py-2.5 text-center text-sm font-medium capitalize text-black dark:text-white",onClick:this.cancelDeleti
1on,children:g})]})]}):(0,x.jsx)(ei,{history:p,phoneNumber:l,otp:u,token:c,authType:d,userId:null==a?void 0:a.userId,name:null==a?void 0:a.name,store:this.store})})}}]),r}(p.Component);let el=(0,q.withRouter)((0,z.A)(ec));var eu=n(48230),ed=n.n(eu);let ep=function(e){var t,n=e.mobile,r=e.store,o=e.altchaPayload,a=e.onGenerateOtpError,s=(0,p.useState)(0),i=s[0],c=s[1],l=(0,p.useState)(30),u=l[0],d=l[1],h=(0,p.useRef)(null),f=function(){h.current||(h.current=setInterval(function(){d(function(e){return e>0?e-1:(c(function(e){return 0===e?(clearInterval(h.current),h.current=null,0):(d(59),e-1)}),0)})},1e3))},m=(t=(0,y.A)(k().mark(function e(){var t;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return h.current&&(clearInterval(h.current),h.current=null),e.next=5,(0,I.TU)(n,o);case 5:(t=e.sent)&&200===t.code?(c(0),d(30),f()):t&&t.status&&t.status.message&&a&&a(t.status.message);case 7:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,p.useEffect)(function(){return f(),function(){return clearInterval(h.current)}},[]);var g=u?L.Ty["name_"+(null==r?void 0:r.selectedLang)]||"Resend verification code in":"Resend Otp";return(0,x.jsxs)("div",{className:"text-red-400 text-xs flex items-center gap-1 transition-all duration-300 hover:text-red-600 justify-self-end",style:u>0?{}:{textDecoration:"underline",cursor:"pointer"},onClick:function(){0===u&&m()},children:[g,u>0&&(0,x.jsxs)("span",{children:[i>9?i:"0".concat(i),":",u>9?u:"0".concat(u),"S"]})]})};var eh="[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none";f.default.mixin(n(20371));var ef=(0,h.inject)("store")(r=(0,h.observer)(r=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){var t,o,a;return(0,s.A)(this,r),(t=n.call(this,e)).nextSlide=function(){t.setState(function(e){return{currentSlide:(e.currentSlide+1)%t.slides.length}})},t.goToSlide=function(e){t.setState({currentSlide:e})},t.handleMobileChange=function(e){var n=e.target.value,r=/^\d{10}$/.test(n);t.setState({mobile:n,mobileValid:r})},t.handleOtpChange=function(e){var n=e.target.value,r=/^\d{4}$/.test(n);t.setState({otp:n,otpValid:r})},t.handleContineSubmit=function(){t.setState({step:1,error:""})},t.changeHeaderText=function(e){t.setState({headerText:e})},t.linkedAnotherAccount=function(e,n,r){var o,a=t.props,s=new URLSearchParams(window.location.search);if((0,B.M)(e,t.store,!0),t.setState({isLinkedAnotherAccount:o,linkedAnotherAccountData:[e],token:n,authType:r}),window.location.search.includes("onlyLogin=true")){o=!1;var i=s.get("redirectUrl");if(i){var c=(0,V.hC)(i);t.props.router.push(c)}else{var l=(0,V.hC)("/news/".concat(a.store.selectedCountry,"/").concat(W.A[a.store.selectedLang]));t.props.router.push(l)}}else t.setState({currentTab:1})},t.handleMobileSubmit=function(){var e=t.state,n=e.mobileValid,r=e.altchaVerified;if(!n){t.setState({error:"Please enter a valid mobile number."});return}if(!r){t.setState({error:"Captcha required"});return}t.callForOtp()},t.handleSubmit=(0,y.A)(k().mark(function e(){return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.submitForLogin();case 1:case"end":return e.stop()}},e)})),t.handleOtpSubmit=(0,y.A)(k().mark(function e(){var n,r,o,a,s,i,c=arguments;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>0&&void 0!==c[0]?c[0]:"MOBILE_OTP",o=(r=t.state).mobile,a=r.otp,e.next=4,(0,I.a8)(n,o,a);case 4:(s=e.sent)&&s.data&&s.data.dhAccounts?(i=s.data.dhAccounts,t.setState({isOtherAccountLinked:!0,linkedAccountInfo:i,currentTab:2,error:""})):console.log("\n\n\n this is message when profile alreay link with some other account",s&&s.status&&s.status.message);case 6:case"end":return e.stop()}},e)})),t.handleOtpError=function(e){console.log("____otp fun",e);var n=(0,c.A)(t);t.setState({isOtpCorrect:!1,errorMessage:e,otp:""}),setTimeout(function(){n.setState({isOtpCorrect:!0,errorMessage:e})},1e4)},t.submitForLogin=(0,y.A)(k().mark(function e(){var n,r,o,a,s,i,l,u,d,p;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,c.A)(t),o=(r=t.state).otp,a=r.mobile,s=new URLSearchParams(window.location.search),window.location.search.includes("onlyLogin=true")||(R.A.remove("nhusv3",{path:"/",domain:P}),R.A.remove("nhuusv3",{path:"/",domain:P})),e.next=6,(0,I.a$)("MOBILE_OTP",a,o);case 6:200==(i=e.sent).code?(clearInterval(t.counter),t.counter=null,l=i&&i.data,(0,B.M)(l,t.store,!0),window.location.search.includes("onlyLogin=true")?(u=s.get("redirectUrl"))?(d=(0,V.hC)(u),t.setState({isLinkedAccount:!0,linkedAnotherAccountData:[l]}),t.props.router.push(d)):(p=(0,V.hC)("/news/".concat(n.store.selectedCountry,"/").concat(W.A[n.store.selectedLang])),t.setState({isLinkedAccount:!0,linkedAnotherAccountData:[l]}),t.props.router.push(p)):t.setState({currentTab:2,isLinkedAccount:!0,linkedAnotherAccountData:[l]})):400==i.code&&("Incorrect OTP. Login Failed"==i.status.message?t.handleOtpError(i.status.message):"You are disabled. Please contact the support to clarify"==i.status.message?t.setState({showDisablePopup:!0}):"No DH account found"==i.status.message&&t.setState({showNoDhAccountFound:!0}));case 8:case"end":return e.stop()}},e)})),t.callForOtp=(0,y.A)(k().mark(function e(){var n,r,o,a;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state&&t.state.mobile,e.next=3,(0,I.TU)(n,t.state.altchaPayload);case 3:if(r=e.sent){e.next=6;break}return e.abrupt("return");case 6:if(200!=r.code){e.next=9;break}return t.setState({step:2,error:""}),e.abrupt("return");case 9:(o=r.status&&r.status.message)&&/captcha/i.test(o)?(t.setState({error:o,altchaVerified:!1,altchaPayload:null}),(a=t.altchaWidgetRef.current)&&"function"==typeof a.reset&&a.reset()):t.setState({error:o||"Something went wrong."});case 11:case"end":return e.stop()}},e)})),t.responseFacebook=(o=(0,y.A)(k().mark(function e(n){var r,o;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n&&n.accessToken,window.location.search.includes("onlyLogin=true")||(R.A.remove("nhusv3",{path:"/",domain:P}),R.A.remove("nhuusv3",{path:"/",domain:P})),e.prev=2,e.next=5,(0,I.w9)("FACEBOOK",r);case 5:200==(o=e.sent).code?t.linkedAnotherAccount(o.data,r,"FACEBOOK"):400==o.code?"You are disabled. Please contact the support to clarify"==o.status.message?t.setState({showDisablePopup:!0}):"No DH account found"==o.status.message&&t.setState({showNoDhAccountFound:!0}
1):console.error("error arise while login with facebook ",o),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("error arise in responseFacebook",e.t0);case 12:case"end":return e.stop()}},e,null,[[2,9]])})),function(e){return o.apply(this,arguments)}),t.responseGoogle=(a=(0,y.A)(k().mark(function e(n){var r,o;return k().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return window.location.search.includes("onlyLogin=true")||(R.A.remove("nhusv3",{path:"/",domain:P}),R.A.remove("nhuusv3",{path:"/",domain:P})),e.prev=1,r=n&&n.credential,e.next=5,(0,I.w9)("GOOGLE",r);case 5:200==(o=e.sent).code?t.linkedAnotherAccount(o.data,r,"GOOGLE"):400==o.code?"You are disabled. Please contact the support to clarify"==o.status.message?t.setState({showDisablePopup:!0}):"No DH account found"==o.status.message&&t.setState({showNoDhAccountFound:!0}):console.error("error arise while login with google ",o),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.log("error in catch block of response google",e.t0);case 12:case"end":return e.stop()}},e,null,[[1,9]])})),function(e){return a.apply(this,arguments)}),t.responseFailure=function(e){console.log("failure response==>",e)},t.store=t.props.store,t.counter=null,t.altchaWidgetRef=(0,p.createRef)(),t.altchaListenerAttached=!1,t.state={currentSlide:0,mobile:"",otp:"",step:0,error:"",mobileValid:!1,otpValid:!1,currentTab:0,showNoDhAccountFound:!1,isLinkedAnotherAccount:!1,linkedAnotherAccountData:[],showDisablePopup:!1,headerText:"Login",authType:"",initialMinute:0,initialSecond:30,altchaReady:!1,altchaVerified:!1,altchaPayload:null},t.slides=[{img:"/images/icon_login_1.svg",title:"Dailyhunt Community",desc:"Engage with the Dailyhunt community, share your opinion on diverse topics and genres"},{img:"/images/icon_login_2.svg",title:"News in your Language",desc:"Get personalized News and Video for you, anytime & anywhere"},{img:"/images/icon_login_3.svg",title:"Make the most of Dailyhunt",desc:"Follow your favorite news publishers, save articles and much more.."}],t}return(0,i.A)(r,[{key:"componentDidMount",value:function(){var e=this;this.interval=setInterval(this.nextSlide,4e3),"undefined"!=typeof customElements&&("undefined"==typeof customElements?Promise.reject(Error("Not in browser")):customElements.get("altcha-widget")?Promise.resolve():S||(S=new Promise(function(e,t){var n=document.querySelector('script[src*="altcha"]');if(n){if(customElements.get("altcha-widget")){e();return}n.addEventListener("load",function(){return e()});return}var r=document.createElement("script");r.src="https://cdn.jsdelivr.net/npm/altcha/dist/altcha.min.js",r.async=!0,r.defer=!0,r.type="module",r.onload=function(){return e()},r.onerror=function(){S=null,t(Error("ALTCHA script failed to load"))},document.head.appendChild(r)}))).then(function(){e.setState({altchaReady:!0})}).catch(function(e){return console.error("ALTCHA load failed:",e)})}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(1===this.state.step&&this.state.altchaReady){var r=this.altchaWidgetRef.current;r&&!this.altchaListenerAttached&&(this.altchaStateChangeHandler=function(e){e.detail&&"verified"===e.detail.state&&e.detail.payload&&n.setState({altchaVerified:!0,altchaPayload:e.detail.payload})},r.addEventListener("statechange",this.altchaStateChangeHandler),this.altchaListenerAttached=!0)}if(1===t.step&&1!==this.state.step&&this.altchaListenerAttached){var o=this.altchaWidgetRef.current;o&&this.altchaStateChangeHandler&&o.removeEventListener("statechange",this.altchaStateChangeHandler),this.altchaListenerAttached=!1}}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval);var e=this.altchaWidgetRef.current;e&&this.altchaStateChangeHandler&&e.removeEventListener("statechange",this.altchaStateChangeHandler)}},{key:"render",value:function(){var e=this,t=this.store.selectedLang||"en",n=this.state,r=n.currentSlide,o=n.step,a=n.mobile,s=n.otp,i=n.error,c=n.mobileValid,l=n.otpValid,u=this.slides[r],d=this.state.currentTab,p=this.store.isDarkTheme,h=(0,Q.A)(t),f=h.privacyPolicy,m=(h.personalisedDetailsString,h.loginWithMobileString,h.loginWithGoogleString,h.loginWithFaceBookString,h.tcDetails),g=h.termsOfServices,b=h.andString,y=h.yourAccountIsDeletedString,w=h.yourAccountIsNotFoundString;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(j(),{children:(0,x.jsxs)("title",{children:[this.state.headerText," | Dailyhunt"]})}),(0,x.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-[#202020]",children:(0,x.jsxs)("div",{className:"flex flex-col md:flex-row items-center space-y-10 md:space-y-0 md:space-x-20 px-4 sm:px-6 py-6",children:[!Y()&&(0,x.jsxs)("div",{className:"text-center md:text-left max-w-sm w-full",children:[(0,x.jsxs)("div",{className:"mb-6 relative h-[240px] flex items-center justify-center",children:[(0,x.jsx)("img",{src:u.img,alt:u.title,className:"w-60 mx-auto transition-all duration-500 ease-in-out transform",loading:"lazy"}),(0,x.jsx)("div",{className:"absolute -bottom-[20px] left-1/2 transform -translate-x-1/2 flex space-x-2 mt-4",children:this.slides.map(function(t,n){return(0,x.jsx)("button",{onClick:function(){return e.goToSlide(n)},className:"w-2.5 h-2.5 rounded-full transition-all duration-300 ".concat(n===r?"bg-black ":"bg-gray-300 hover:bg-gray-400")},n)})})]}),(0,x.jsxs)("div",{className:"text-center transition-all duration-500 ease-in-out transform ",children:[(0,x.jsx)("h2",{className:"text-2xl font-bold mb-2 mt-[20px]",children:u.title}),(0,x.jsx)("p",{className:"text-gray-600",children:u.desc})]})]}),this.state.showDisablePopup&&(0,x.jsx)("div",{className:"absolute top-[60px] left-[0px] z-10",style:{width:"calc(100% - 40px)",height:"calc(100% - 60px)"},children:y}),this.state.showNoDhAccountFound&&(0,x.jsx)("div",{className:"absolute top-[60px] left-[0px] z-10",style:{width:"calc(100% - 40px)",height:"calc(100% - 60px)"},children:w}),0===d&&(0,x.jsxs)("div",{className:"max-w-sm w-full space-y-6",children:[p?(0,x.jsx)(v(),{src:"/images/icn_logo_dark.svg",alt:"Dailyhunt",width:100,height:32,loading:"lazy"}):(0,x.jsx)(v(),{src:"/images/icn_logo.svg",alt:"Dailyhunt",width:100,height:32,loading:"lazy"}),(0,x.jsx)("p",{className:"text-gray-600",children:"Log explore a wide range of magazines, newspapers, and premium stories in your favorite categories."}),0===o&&(0,x.jsxs)("button",{className:"w-full flex items-center justify-center bg-black text-white py-3 rounded shadow hover:bg-gray-800 transition-all duration-300 transform hover:scale-[1.02] gap-[5px]",onClick:this.handleContineSubmit,children:[(0,x.jsx)("img",{effect:"blur",src:"/images/icon_phone.svg",className:"w-[18px] h-[18px]",alt:"phone",loading:"lazy"}),"Continue with Mobile number"]}),1===o&&(0,x.jsxs)("div",{className:"transition-all duration-500 ease-in-out",children:[(0,x.jsx)("input",{type:"number",value:a,onChange:this.handleMobileChange,onWheel:function(e){return e.target.blur()},placeholder:"Enter your mobile number",className:"w-full border p-2 rounded my-2 transition-all duration-300 ".concat(a.length>0?c?"border-green-500":"border-red-500":"border-gray-300"," focus:ring-2 focus:ring-black focus:border-transparent ").concat(eh)}),this.state.altchaReady&&(0,x.jsx)("altcha-widget",{ref:this.altchaWidgetRef,challengeurl:"/api/pwa/altcha/challenge"}),(0,x.jsx)("button",{className:"w-full bg-black text-white py-2 rounded transition-all duration-300 transform hover:scale-[1.02] ".concat((!c||!this.state.altchaVerified)&&"opacity-50 cursor-not-allowed"),onClick:this.handleMobileSubmit,disabled:!c||!this.state.altchaVerified,children:"Continue"}),i&&(0,x.jsx)("p",{className:"text-red-500 mt-2 animate-fade-in",children:i})]}),2===o&&(0,x.jsxs)("div",{className:"transition-all duration-500 ease-in-out",children:[(0,x.jsx)("h3",{className:"text-xl mb-2",children:"Validate OTP"}),(0,x.jsx)("input",{type:"number",value:s,onChange:this.handleOtpChange,placeholder:"Enter your OTP",onWheel:function(e){return e.target.blur()},className:"w-full border p-2 rounded my-2 transition-all duration-300 ".concat(s.length>0?l?"border-green-500":"border-red-500":"border-gray-300"," focus:ring-2 focus:ring-black focus:border-transparent ").concat(eh)}),(0,x.jsx)("div",{className:"grid py-2",children:(0,x.jsx)(ep,{mobile:this.state.mobile,store:this.store,altchaPayload:this.state.altchaPayload,onGenerateOtpError:function(t){t&&/captcha/i.test(t)?e.setState({step:1,error:t,altchaVerified:!1,altchaPayload:null}):t&&e.setState({error:t})}})}),(0,x.jsx)("button",{className:"w-full bg-black text-white py-2 rounded transition-all duration-300 transform hover:scale-[1.02] ".concat(!l&&"opacity-50 cursor-not-allowed"),onClick:this.handleSubmit,disabled:!l,children:"Verify"}),(0,x.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-600 mb-2",children:[(0,x.jsxs)("span",{children:["+91 ",a]}),(0,x.jsx)("button",{className:"text-blue-600 hover:underline text-xs flex items-center gap-1 transition-all duration-300 hover:text-blue-800",onClick:function(){return e.setState({step:1,error:"",altchaVerified:!1,altchaPayload:null})},children:(0,x.jsx)("span",{children:"Edit"})})]}),i&&(0,x.jsx)("p",{className:"text-red-500 mt-2 animate-fade-in",children:i})]}),(0,x.jsxs)("div",{className:"flex items-center justify-between",children:[(0,x.jsx)("hr",{className:"w-full border-gray-300"}),(0,x.jsx)("span",{className:"px-4 text-gray-500",children:"or"}),(0,x.jsx)("hr",{className:"w-full border-gray-300"})]}),(0,x.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3 sm:gap-6 w-full",children:[(0,x.jsx)(D(),{appId:"131285656905938",autoLoad:!1,callback:this.responseFacebook,isMobile:!1,render:function(e){return(0,x.jsxs)("button",{className:"w-full max-w-[175px] h-[40p
1x] flex flex-row items-center justify-center p-1 border border-gray-300 rounded-sm cursor-pointer gap-2",onClick:e.onClick,children:[(0,x.jsx)("img",{src:"/images/icon_login_fb.svg",width:18,height:18,alt:"Facebook",loading:"lazy"}),(0,x.jsx)("span",{className:"text-sm",children:"Sign in with Facebook"})]})}}),(0,x.jsx)(F,{clientId:O,children:(0,x.jsx)(U,{onSuccess:this.responseGoogle,onError:this.responseFailure,render:function(e){var t=e.onclick;return(0,x.jsx)("button",{className:"w-[50px] h-[50px] rounded-full cursor-pointer transition-all duration-300 transform hover:scale-110 hover:shadow-lg",onClick:t,children:(0,x.jsx)("img",{src:"/images/icon_login_google.svg",alt:"Google",loading:"lazy"})})}})})]}),(0,x.jsxs)("p",{className:"text-center text-sm text-gray-500 mt-4",children:[m," ",(0,x.jsx)("br",{})," ",(0,x.jsx)(ed(),{href:"https://m.dailyhunt.in/terms-of-service?mode=wap",target:"_blank",className:"underline font-medium transition-all duration-300 hover:text-black",children:g})," ",b," ",(0,x.jsx)(ed(),{href:"https://m.dailyhunt.in/privacy?mode=wap",target:"_blank",className:"underline font-medium transition-all duration-300 hover:text-black",children:f})]})]}),1===d&&(0,x.jsxs)("div",{className:"max-w-sm w-full transition-all duration-500 ease-in-out",children:[(0,x.jsx)(v(),{src:p?"/images/icn_logo_dark.svg":"/images/dailyhunt_logo.svg",alt:"Dailyhunt",width:100,height:32,loading:"lazy"}),(0,x.jsx)(el,{token:this.state.token,authType:this.state.authType,linkedAccountInfo:this.state.linkedAnotherAccountData,store:this.store})]}),2===d&&(0,x.jsxs)("div",{className:"max-w-sm w-full transition-all duration-500 ease-in-out flex flex-col gap-2",children:[(0,x.jsx)(v(),{src:p?"/images/icn_logo_dark.svg":"/images/dailyhunt_logo.svg",alt:"Dailyhunt",width:100,height:32,loading:"lazy"}),(0,x.jsx)(el,{phoneNumber:this.state.mobile,authType:"MOBILE_OTP",otp:this.state.otp,linkedAccountInfo:this.state.linkedAnotherAccountData,store:this.store})]})]})})]})}}]),r}(p.Component))||r)||r;let em=(0,q.withRouter)((0,z.A)(ef));function eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}f.default.mixin(g());let eb=(0,h.inject)("store")(o=(0,h.observer)(o=function(e){(0,l.A)(r,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=(0,d.A)(r);return e=t?Reflect.construct(n,arguments,(0,d.A)(this).constructor):n.apply(this,arguments),(0,u.A)(this,e)});function r(e){var t;return(0,s.A)(this,r),(t=n.call(this,e)).store=f.default.at((0,c.A)(t),"props.store"),t.isDetailsPage=!!f.default.at((0,c.A)(t),"props.match.params.newsiddetails"),t.isDesktop=t.store.isDesktop,t}return(0,i.A)(r,[{key:"render",value:function(){return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(em,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eg(Object(n),!0).forEach(function(t){(0,a.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.props))})}}]),r}(p.Component))||o)||o}}]);
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.