| 1 |
(()=>{"use strict";const e=wp.element;function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t,r,n,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,l,"next",e)}function l(e){r(i,o,a,c,l,"throw",e)}c(void 0)})}}function o(){o=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,i=Object.create(o.prototype),c=new O(n||[]);return a(i,"_invoke",{value:R(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",p="suspendedYield",h="executing",v="completed",y={};function b(){}function g(){}function w(){}var E={};s(E,c,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(j([])));x&&x!==r&&n.call(x,c)&&(E=x);var L=w.prototype=b.prototype=Object.create(E);function N(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function C(e,t){function r(o,a,i,c){var l=d(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then(function(e){r("next",e,i,c)},function(e){r("throw",e,i,c)}):t.resolve(s).then(function(e){u.value=e,i(u)},function(e){return r("throw",e,i,c)})}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t(function(t,o){r(e,n,t,o)})}return o=o?o.then(a,a):a()}})}function R(t,r,n){var o=m;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?v:p,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=d(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function j(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=w,a(L,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,u,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},N(C.prototype),s(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new C(f(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},N(L),s(L,u,"Generator"),s(L,c,function(){return this}),s(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function a(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t);else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var i=function(t){var r=t.isOpen,i=t.onClose,c=t.pluginSlug,l=void 0===c?"":c,u=t.baseUrl,s=void 0===u?"":u,f=t.deactivationUrl,d=void 0===f?"":f,m=t.title,p=void 0===m?"If you still want to go — help us improve!":m,h=t.titleDescription,v=void 0===h?"Your feedback helps us make Eventin better for everyone.":h,y=t.submitButtonText,b=void 0===y?"Submit & Deactivate":y,g=t.cancelButtonText,w=void 0===g?"Cancel":g,E=t.skipButtonText,k=void 0===E?"Skip & Deactivate":E,x=t.bannerTitle,L=void 0===x?"Thank you for 200+⭐":x,N=t.bannerSubtitle,C=void 0===N?"As a thank you, enjoy a free WordPress theme from our Envato portfolio. 👉":N,R=t.bannerButtonText,S=void 0===R?"Claim free theme":R,T=t.bannerButtonLink,_=void 0===T?"https://themewinter.com/support/":T,O=t.feedBackNote,j=void 0===O?"❤️ Thank you for using Eventin. Did you know Eventin free features give you $1,000 Worth of features for 100% Free.":O,B=t.learnMoreLink,P=void 0===B?"https://themewinter.com/free-wordpress-event-plugin/":B,F=t.learnMoreText,A=void 0===F?"Learn more":F,D=t.checkboxLabel,M=void 0===D?"I'd like to help the team improve the plugin experience.":D,G=t.adminEmail,I=void 0===G?"":G,W=t.theme,U=void 0===W?{primaryColor:"#6B2EE5",dangerColor:"#ff4d4f",btnTextColor:"#fff",btnHoverBgColor:"#503296",bannerBgColor:"#067FFF",bannerGradientColor:""}:W,Y=a((0,e.useState)(""),2),$=Y[0],H=Y[1],q=a((0,e.useState)(I||""),2),V=q[0],z=q[1],J=a((0,e.useState)(!0),2),X=J[0],K=J[1],Q=a((0,e.useState)(!1),2),Z=Q[0],ee=Q[1],te=a((0,e.useState)(!0),2),re=te[0],ne=te[1],oe=(0,e.useRef)(null),ae=(0,e.useRef)(null);if((0,e.useEffect)(function(){var e=function(e){"Escape"===e.key&&r&&i()};return r&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),ae.current&&(ae.current.style.backgroundColor=U.bannerBgColor),function(){document.removeEventListener("keydown",e),document.body.style.overflow=""}},[r,i]),(0,e.useEffect)(function(){var e=function(e){oe.current&&!oe.current.contains(e.target)&&i()};return r&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[r,i]),!r)return null;var ie,ce=(ie=n(o().mark(function e(){var t,r;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,!V||t.test(V)){e.next=4;break}return ne(!1),e.abrupt("return");case 4:return r={feedback:$,customer_email:V.trim(),is_agree:X},e.prev=5,e.next=8,le(r);case 8:i(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.error("Submission error:",e.t0);case 14:case"end":return e.stop()}},e,null,[[5,11]])})),function(){return ie.apply(this,arguments)}),le=function(){var e=n(o().mark(function e(t){var r,n,a,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ee(!0),e.prev=1,n="".concat(s,"/wp-json/").concat(l,"/v1/feedback"),a=null===(r=window)||void 0===r||null===(r=r.arraytics_feedback)||void 0===r?void 0:r.nonce,e.next=6,fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":a},body:JSON.stringify(t)});case 6:if((i=e.sent).ok){e.next=9;break}throw new Error("Network response was not ok");case 9:return e.next=11,i.json();case 11:window.location.href=d;case 12:return e.prev=12,ee(!1),e.finish(12);case 15:case"end":return e.stop()}},e,null,[[1,,12,15]])}));return function(t){return e.apply(this,arguments)}}();return React.createElement("div",{className:"modal-overlay",style:{"--primary-color":U.primaryColor,"--btn-text-color":U.btnTextColor,"--danger-color":U.dangerColor,"--btn-hover-bg-color":U.btnHoverBgColor,"--banner-bg-color":U.bannerBgColor,"--banner-gradient-color":U.bannerGradientColor}},React.createElement("div",{className:"deactivation-feedback-modal plaugin-deactivation-modal",ref:oe},React.createElement("div",{className:"deactivate-banner-wrapper"},React.createElement("div",{className:"deactivate-banner"},React.createElement("div",{className:"banner-content"},React.createElement("h3",{className:"banner-title"},L),React.createElement("p",{className:"banner-subtitle"},C)),React.createElement("button",{className:"claim-btn",onClick:function(){return window.open(_,"_blank")}},S)),React.createElement("button",{className:"close-button",onClick:i,"aria-label":"Close"},"×")),React.createElement("div",{className:"modal-header-wrapper"},React.createElement("h2",{className:"modal-title"},p),React.createElement("p",{className:"deactivation-feedback-modal-subtitle"},v)),React.createElement("div",{className:"modal-body"},React.createElement("textarea",{value:$,onChange:function(e){return H(e.target.value)},placeholder:"1. Difficulty to use : Plugin setup process is confusing. \n2. Missing features : Need more features. ",className:"feedback-textarea",rows:"4"}),React.createElement("div",{className:"form-group-wrapper"},React.createElement("div",{className:"form-group input-group-items"},React.createElement("div",{className:"email-input-wrapper"},React.createElement("input",{type:"email",value:V,onChange:function(e){z(e.target.value),e.target.value?ne(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.target.value)):ne(!0)},placeholder:"Email address",className:"form-input email-input ".concat(re?"":"error"),required:!0}),!re&&React.createElement("span",{className:"validation-error"},"Please enter a valid email address"))),React.createElement("div",{className:"form-group checkbox-group"},React.createElement("label",{class:"container"},React.createElement("input",{type:"checkbox",checked:X,onChange:function(e){return K(e.target.checked)}}),React.createElement("div",{class:"checkmark"}),React.createElement("span",{class:"checkbox-label"},M)))),React.createElement("div",{className:"feedback-note"},React.createElement("p",null," ",j," ",React.createElement("a",{href:P,target:"_blank",rel:"noreferrer",className:"learn-more"},A)))),React.createElement("div",{className:"modal-footer"},React.createElement("button",{className:"btn btn-skip",onClick:function(){Z||(window.location.href=d)},"aria-label":k,disabled:Z},k),React.createElement("div",{className:"btn-group"},React.createElement("button",{className:"btn btn-cancel",onClick:i,"aria-label":w},w),React.createElement("button",{className:"btn btn-primary",onClick:ce,"aria-label":b,disabled:!$||Z},Z?"Submitting...":b)))))},c=wp.i18n.__;function l(){var t,r,n=function(){var t="Timetics - Appointment Booking Calendar & Scheduling System",r=(0,e.useRef)(!1),n=a((0,e.useState)(!1),2),o=n[0],i=n[1],c=a((0,e.useState)(null),2),l=c[0],u=c[1],s=(0,e.useCallback)(function(e){e.preventDefault(),i(!0)},[]),f=(0,e.useCallback)(function(){var e=Array.from(document.querySelectorAll('a[href*="plugins.php?action=deactivate"]')).find(function(e){return e.getAttribute("aria-label")==="Deactivate ".concat(t)});return e?(u(e.getAttribute("href")),e.addEventListener("click",s),!0):(console.warn("[WP Plugin Feedback] Deactivation link not found for plugin: ".concat(t)),!1)},[t,s,l]);return(0,e.useEffect)(function(){var e;if(!r.current&&t&&("plugins"===(null===(e=window)||void 0===e?void 0:e.pagenow)||document.body.classList.contains("plugins-php"))){if(!f()){var n=setTimeout(function(){f()&&(r.current=!0)},1e3);return function(){return clearTimeout(n)}}r.current=!0}},[t,f,s]),{isInitialized:r.current,deactivationUrl:l,isModalVisible:o,closeModal:function(){return i(!1)}}}(),o=n.isModalVisible,l=n.closeModal,u=n.deactivationUrl,s=null===(t=window)||void 0===t||null===(t=t.timetics_feedback)||void 0===t?void 0:t.site_url,f=null===(r=window)||void 0===r||null===(r=r.timetics_feedback)||void 0===r?void 0:r.admin_email;return React.createElement(i,{isOpen:o,onClose:l,pluginName:"Timetics - Appointment Booking Calendar & Scheduling System",pluginSlug:"timetics",baseUrl:s,deactivationUrl:u,bannerTitle:c("Before you go...","timetics"),bannerSubtitle:c("As a thank you, enjoy a free WordPress theme from our Envato portfolio.","timetics"),bannerButtonLink:"https://arraytics.com/support",title:c("If you still want to go — help us improve!","timetics"),titleDescription:c("Your feedback helps us make WPTimetics better for everyone.","timetics"),feedBackNote:c("️❤️ Thank you for using WPTimetics.","timetics"),learnMoreText:c("Learn more about WPTimetics","timetics"),learnMoreLink:"https://arraytics.com/timetics/",submitButtonText:c("Submit & Deactivate","timetics"),cancelButtonText:c("Cancel","timetics"),skipButtonText:c("Skip & Deactivate","timetics"),adminEmail:f,theme:{primaryColor:"#067FFF",dangerColor:"#ff4d4f",btnTextColor:"#fff",btnHoverBgColor:"#067FFF",bannerGradientColor:"#067FFF"}})}document.addEventListener("DOMContentLoaded",function(){var e=document.createElement("div");e.id="wp-deactivation-feedback-modal",document.body.appendChild(e),ReactDOM.createRoot(e).render(React.createElement(l,null))})})(); |