PageSourceSearch

https://seguridadoncor.com.co/cp/javascript/app/newsletter-subscription.js?d73dc903b1b42c397e6e

js seguridadoncor.com.co collected 2026-10-05 19:00:02 UTC 6,065 bytes, 2 lines download raw bytes

1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["app/newsletter-subscription"],{2633:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var i=t(286),s=t(285),r=t(287),o=t.n(r),a=t(89),c=t(2634),l=t.n(c),d=t(539);const u="send_announce",m="send_personalized_announce",p=a.Locale.getSection("components.newsletter-subscription"),f=a.Locale.getTranslate("components.newsletter-subscription"),v=({consents:e,email:n,reportConsent:t,onClose:r,privacyPolicyUrl:o,isOpen:a})=>{const[c,v]=(0,s.useState)(null),g=()=>p.lmsg(y()?"reconfirmConsent":"consent",{adminEmail:n,privacyPolicy:p.lmsg("privacyPolicy")}),y=()=>e.some((e=>e.enabled&&e.type===u))&&!e.some((e=>e.enabled&&e.type===m)),k=y();return(0,s.jsxs)(i.Dialog,{isOpen:a,size:"sm",banner:l(),title:(0,s.jsx)(f,{content:k?"reconfirmTitle":"title"}),form:{state:c,onSubmit:async()=>{v("submit");const e=await t(n,m,g());v(null),e?(0,d.addToast)({intent:"success",message:(0,s.jsx)(f,{content:"subscribeMessage"})}):(0,d.addToast)({intent:"danger",message:(0,s.jsx)(f,{content:"errorMessage"})}),r(!!e||void 0)},submitButton:{children:(0,s.jsx)(f,{content:k?"reconfirmButton":"subscribeButton"})},cancelButton:{children:(0,s.jsx)(f,{content:"closeButton"})},hideRequiredLegend:!0},onClose:async()=>{if(c)return;const e=y();v("cancel");const i=await t(n,e?u:"none",g());v(null),i?e&&(0,d.addToast)({intent:"success",message:(0,s.jsx)(f,{content:"noReconfirmMessage"})}):(0,d.addToast)({intent:"danger",message:(0,s.jsx)(f,{content:"errorMessage"})}),r(!i&&void 0)},children:[!k&&(0,s.jsx)("p",{children:(0,s.jsx)(f,{content:"text"})}),(()=>{if(y())return(0,s.jsx)(i.StatusMessage,{intent:"info",children:(0,s.jsx)(f,{content:"consentGivenInfo"})})})(),(0,s.jsx)("p",{children:(0,s.jsx)(f,{content:k?"reconfirmConsent":"consent",params:{privacyPolicy:(0,s.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:(0,s.jsx)(f,{content:"privacyPolicy"})}
1),adminEmail:n}})})]})};v.propTypes={isOpen:o().bool.isRequired,email:o().string.isRequired,reportConsent:o().func.isRequired,privacyPolicyUrl:o().string.isRequired,consents:o().array.isRequired,onClose:o().func.isRequired};const g=v},2632:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>v});var i=t(285),s=t(89),r=t(383),o=t(2633),a=t(287),c=t.n(a),l=t(589),d=t(2635),u=t.n(d);const m="plesk-newsletter-subscription-shown",p=async(e,n,t)=>{const i=new Date(Date.now()+864e5);r.default.set(m,1,i.toUTCString(),"/");try{const i=await s.api.post((0,s.prepareUrl)("/my-profile/report-consent"),{email:e,text:t,consent:n});return"error"!==i.status&&window.loadConsentStatus(),"error"!==i.status}catch{return!1}},f=({isShow:e,...n})=>{const[t,a]=(0,i.useState)(null),c=(0,i.useRef)([]),{data:{viewer:d,config:f}={}}=(0,l.useQuery)(u()),v=async(e,n=s.emptyFn)=>{c.current.push(n),a(await(async e=>{const{consents:n=[]}=await s.api.get((0,s.prepareUrl)("/my-profile/get-consent"),{email:e});return n})(e))};return(0,i.useEffect)((()=>{if(d?.client?.email)return e&&!r.default.get(m)&&v(d?.client?.email),(0,s.namespace)("PleskExt.Advisor").showNewsletterSubscription=e=>{v(d?.client?.email,e)},()=>{delete(0,s.namespace)("PleskExt.Advisor").showNewsletterSubscription}}),[d?.client?.email]),(0,i.jsx)(o.default,{isOpen:null!==t,consents:t||[],reportConsent:p,onClose:e=>{a(null),void 0!==e&&c.current.forEach((n=>n(e))),c.current=[]},privacyPolicyUrl:f?.product?.privacyPolicyUrl,email:d?.client?.email,...n})};f.propTypes={isShow:c().bool.isRequired};const v=f},2634:e=>{e.exports=Jsw.skinUrl+"/images/newsletter-subscription.png?b1de5a7718f72cdae8b90e2f38d2b322"},2635:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NewsletterSubscription"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"client"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"config"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"product"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"privacyPolicyUrl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216}};n.loc.source={body:"query NewsletterSubscription {\r\n    viewer {\r\n        login\r\n        client {\r\n            id\r\n            email\r\n        }\r\n    }\r\n    config {\r\n        product {\r\n            privacyPolicyUrl\r\n        }\r\n    }\r\n}\r\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var i={};function s(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}})),e.exports=n,e.exports.NewsletterSubscription=function(e,n){var t={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var r=i[n]||new Set,o=new Set,a=new Set;for(r.forEach((function(e){a.add(e)}));a.size>0;){var c=a;a=new Set,c.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){a.add(e)})))}))}return o.forEach((function(n){var i=s(e,n);i&&t.definitions.push(i)})),t}(n,"NewsletterSubscription")}}]);
2//# sourceMappingURL=newsletter-subscription.js.map?d73dc903b1b42c397e6e

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.