geno/wp-content/plugins/mailpoet/assets/dist/js/admin.js

2 lines
432 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
/*! For license information please see admin.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[328],{49868:function(){jQuery.AsyncQueue=function(){var e,t,a,s,n=this,o=[],r=!1;return s=function(){var e=o.shift();e?(e.apply(n,[n]),!1===r&&s()):t&&t.apply(n)},this.onFailure=function(t){e=t},this.onComplete=function(e){t=e},this.add=function(e){return o.push(e),this},this.storeData=function(e){return a=e,this},this.lastCallbackData=function(){return a},this.run=function(){r=!1,s()},this.pause=function(){return r=!0,this},this.failure=function(){if(r=!0,e){var t=[n];for(i=0;i<arguments.length;i++)t.push(arguments[i]);e.apply(n,t)}},this}},43359:function(e,t,i){"use strict";var a={};i.r(a),i.d(a,{hideProductDiscovery:function(){return E},hideTaskList:function(){return T},hideUpsell:function(){return A}});var s={};i.r(s),i.d(s,{getCanDisplayUpsell:function(){return Z},getCanImportWooCommerceSubscribers:function(){return L},getCurrentTask:function(){return z},getGlobalSubscriberStatsChange:function(){return B},getHasForms:function(){return q},getHasImportedSubscribers:function(){return D},getIsProductDiscoveryDone:function(){return V},getIsProductDiscoveryHidden:function(){return $},getIsTaskListHidden:function(){return R},getIsUpsellHidden:function(){return H},getIsWooCommerceActive:function(){return U},getListsSubscriberStatsChange:function(){return W},getProductDiscoveryTasksStatus:function(){return O},getTasksStatus:function(){return F}});var n=i(2226),o=i(70079),r=i(89912),l=i(14526),d=i(44259),c=i(69177),m=i(92883),p=i(82299),u=i(35250);function h(e){let{mailpoetInstalledDaysAgo:t,sendTransactionalEmails:i,mtaMethod:a,noticeDismissed:s,apiVersion:n}=e;const[r,l]=(0,o.useState)(!1),d=()=>{c.MailPoet.Ajax.post({api_version:n,endpoint:"UserFlags",action:"set",data:{transactional_emails_opt_in_notice_dismissed:"1"}})};return t<30||i||"PHPMail"===a||s||r?null:(0,u.jsxs)(p.q,{type:"success",timeout:!1,onClose:d,children:[(0,u.jsx)("h3",{children:c.MailPoet.I18n.t("transactionalEmailNoticeTitle")}),(0,u.jsxs)("p",{children:[c.MailPoet.I18n.t("transactionalEmailNoticeBody")," ",(0,u.jsx)("a",{href:"https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails",target:"_blank",rel:"noopener noreferrer",children:c.MailPoet.I18n.t("transactionalEmailNoticeBodyReadMore")})]}),(0,u.jsx)("p",{children:(0,u.jsx)("button",{type:"button",className:"button",onClick:()=>{l(!0),c.MailPoet.Ajax.post({api_version:n,endpoint:"settings",action:"set",data:{send_transactional_emails:"1"}}),d()},children:c.MailPoet.I18n.t("transactionalEmailNoticeCTA")})})]})}h.displayName="TransactionalEmailsProposeOptInNotice";var g=i(87658),_=i(34352),f=i.n(_);function b(){if(!c.MailPoet.subscribersLimitReached)return null;const e=c.MailPoet.hasValidApiKey,t=c.MailPoet.subscribersLimit.toLocaleString();let i=c.MailPoet.I18n.t("subscribersLimitNoticeTitleUnknownLimit"),a=c.MailPoet.I18n.t("subscribersLimitReachedUnknownLimit"),s="";c.MailPoet.subscribersLimit&&(i=c.MailPoet.I18n.t("subscribersLimitNoticeTitle").replace("[subscribersLimit]",t),s=c.MailPoet.I18n.t(e?"yourPlanLimit":"freeVersionLimit").replace("[subscribersLimit]",t),a=c.MailPoet.I18n.t("subscribersLimitReached").replace("[subscribersLimit]",t));const n=e?c.MailPoet.MailPoetComUrlFactory.getUpgradeUrl(c.MailPoet.pluginPartialKey):c.MailPoet.MailPoetComUrlFactory.getPurchasePlanUrl(c.MailPoet.subscribersCount+1),o=f()(c.MailPoet.I18n.t("checkHowToManageSubscribers"),/\[link](.*?)\[\/link]/g,(e=>(0,u.jsx)("a",{href:"https://kb.mailpoet.com/article/348-subscribers-limit-for-sending-plans",children:e},"checkManageSubscribers")));return(0,u.jsxs)(p.q,{type:"error",timeout:!1,closable:!1,renderInPlace:!0,children:[(0,u.jsx)("h3",{children:i}),(0,u.jsxs)("p",{children:[a," ",s," ",c.MailPoet.I18n.t("youNeedToUpgrade"),(0,u.jsx)("br",{}),"active"===c.MailPoet.wpSegmentState?o:null," ",c.MailPoet.I18n.t("actToSeamlessService")]}),(0,u.jsxs)("p",{children:[(0,u.jsx)("a",{target:"_blank",rel:"noopener noreferrer",className:"button button-primary",href:n,children:c.MailPoet.I18n.t("upgradeNow")}),e&&(0,u.jsxs)(u.Fragment,{children: