{"version":3,"file":"scripts/chunks/src_widgets_subscribe_subscribe_js.9572c08e944b1ed15108.js","mappings":"6HAeA,SAASA,EAAUC,GACjB,MAAMC,EAAOC,KACbD,EAAKD,GAAKG,EAAEH,GAEZC,EAAKG,KAAO,WAIVH,EAAKD,GAAGK,IAAI,UAAW,GAClBJ,EAAKD,GAAGM,SAAS,YACpBL,EAAKM,cAAgB,IAAIC,IAAIC,KAAKC,YAClCT,EAAKM,cAAcH,KAAKH,EAAKD,GAAGW,KAAK,aAErCV,EAAKM,cAAcK,aAAaC,GAAG,SAAS,WAC1CZ,EAAKD,GAAGW,KAAK,eAAeG,UAAUC,QACxC,IAEAd,EAAKM,cAAcS,OAAOC,UAAU,qBAAqB,SAAUC,GAGjE,IAAIC,EAAUD,EAASA,SAASC,QAE5BA,SAAwD,IAAXA,IAC/CA,EAAUD,EAASA,SAASE,SAG9BnB,EAAKD,GAAGqB,OAAO,iCAAmCF,EAAU,SAC9D,IAEJ,CACF,CA7CAG,QAAQC,IAAI,CAAC,iWAAuC,yCAA6CC,MAAK,KACpGF,QAAQC,IAAI,CACV,iEACA,uCACA,uCACA,4CACA,2JACCC,MAAK,KACNrB,EAAE,qBAAqBsB,MAAK,SAAUC,EAAG1B,GACvCG,EAAEH,GAAI2B,KAAK,SAAU,IAAI5B,EAAUC,IACnCG,EAAEH,GAAI2B,KAAK,UAAUvB,MACvB,GAAE,GACF,G","sources":["webpack://disp0001/./src/widgets/subscribe/subscribe.js"],"sourcesContent":["Promise.all([import('../../plugins/semantic/form'), import('../../plugins/semantic/form.scss')]).then(() => {\r\n Promise.all([\r\n import('./subscribe.scss'),\r\n import('../../plugins/semantic/label.css'),\r\n import('../../plugins/semantic/transition.css'),\r\n import('../../plugins/semantic/transition'),\r\n import('../../scripts/dbs/dbs.semantic.form'),\r\n ]).then(() => {\r\n $('.widget.subscribe').each(function (i, el) {\r\n $(el).data('widget', new Subscribe(el))\r\n $(el).data('widget').init()\r\n })\r\n })\r\n})\r\n\r\nfunction Subscribe(el) {\r\n const self = this\r\n self.el = $(el)\r\n\r\n self.init = function () {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('Subscribe init', self)\r\n }\r\n self.el.css('opacity', 1)\r\n if (!self.el.hasClass('no-api')) {\r\n self.subscribeForm = new dbs.form.genericForm()\r\n self.subscribeForm.init(self.el.find('.ui.form'))\r\n\r\n self.subscribeForm.submitButton.on('click', function () {\r\n self.el.find('.ui.message').slideUp().remove()\r\n })\r\n\r\n self.subscribeForm.events.subscribe('Form:send_success', function (response) {\r\n //Add this code to make sure that the other form are not affected\r\n //with the changes.\r\n let message = response.response.message\r\n\r\n if (message === null || message === undefined || message == '') {\r\n message = response.response.Message\r\n }\r\n\r\n self.el.append('