prestashop-module/retailcrm/views/js/worker.umd.min.js

38 lines
7.1 KiB
JavaScript
Raw Normal View History

2022-06-28 14:45:55 +03:00
/*!
* MIT License
*
* Copyright (c) 2021 DIGITAL RETAIL TECHNOLOGIES SL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author DIGITAL RETAIL TECHNOLOGIES SL <mail@simlachat.com>
* @copyright 2021 DIGITAL RETAIL TECHNOLOGIES SL
* @license https://opensource.org/licenses/MIT The MIT License
*
* Don\'t forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*
*/
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["prestashop"]=t():e["prestashop"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fae3")}({"47bc":function(e,t,n){var r=n("9523").default;(function(){class e{constructor(){r(this,"init",()=>{this.executeJobs()}),r(this,"executeJobs",()=>{const e=new XMLHttpRequest;e.open("GET","/index.php?fc=module&module=retailcrm&controller=Jobs",!0),e.timeout=0,e.send(null)})}}(new e).init()})()},8875:function(e,t,n){var r,o,c;(function(n,i){o=[],r=i,c="function"===typeof r?r.apply(t,o):r,void 0===c||(e.exports=c)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(p.stack)||i.exec(p.stack),l=u&&u[1]||!1,s=u&&u[2]||!1,a=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");l===a&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===l)return d[f];if(l===a&&d[f].innerHTML&&d[f].innerHTML.trim()===o)return d[f]}return null}}return e}))},9523:function(e,t){function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e.exports=n,e.exports["default"]=e.exports,e.exports.__esModule=!0},d9af:function(e,t,n){var r=n("9523").default;(function(){class e{constructor(){r(this,"init",()=>{this.getCollectorConfig().then(e=>{this.initCollector(),this.has(e,"customerId")?this.executeCollector(e.siteKey,{customerId:e.customerId}):this.executeCollector(e.siteKey,{})}).catch(e=>this.isNil(e)?null:console.error(e))}),r(this,"getCollectorConfig",()=>new Promise((e,t)=>{fetch("/index.php?fc=module&module=retailcrm&controller=DaemonCollector").then(e=>e.json()).then(n=>{this.has(n,"siteKey")&&n.siteKey.length>0?e(n):t(new Error("Failed to init collector: siteKey not found"))}).catch(e=>{t(new Error("Failed to init collector: "+e))})})),r(this,"initCollector",()=>{(function(e,t,n,r,o,c,i){e.retailCRMObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,i=t.getElementsByTagName(n)[0],c=t.createElement(n),c.async=!0,c.src=r,i.parentNode.insertBefore(c,i)})(window,document,"script","https://collector.retailcrm.pro/w.js","_rc")}),r(this,"executeCollector",(e,n)=>{t("create",e,n),t("send","pageView")}),r(this,"isNil",e=>null===e),r(this,"has",(e,t)=>null!==e&&hasOwnProperty.call(e,t))}}function t(){return null}(new e).init()})()},dfc1:function(e,t,n){var r=n("9523").default;(function(){class e{constructor(){r(this,"init",()=>{this.getRcct().then(e=>{window._rcct=e,this.initConsultant()}).catch(e=>this.isNil(e)?null:c