"use strict";(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")||!window.smartechclient)&&(window.smartechclient={w:window,d:document,s:"script",f:"//osjs.netcoresmartech.com/",o:"smartech",initiator:function(e,t,s,i,c){e.SmartechObject=c,e[c]=e[c]||this.preSmartech,e[c]=e[c].bind(this);let n=localStorage.getItem("__stconfig")||null;if(n){let r=JSON.parse(n),m=new Date(r.exd);if(m>new Date){if("0"===r.ps||"0"===r.js){console.log("Js blocked.");return}}else localStorage.removeItem("__stconfig")}},setCustomVariable:function(e,t){let s=window.location.href,i=new URL(s);if(!s.includes(e)&&null===sessionStorage.getItem(e))return t;{let c=i.searchParams.get(e);return/\W/g.test(c)?t:(s.includes(e)||(c=sessionStorage.getItem(e)),"null"===c)?(null!==sessionStorage.getItem(e)&&sessionStorage.removeItem(e),t):(s.includes(e)&&sessionStorage.setItem(e,c),c)}},checkLoad:function(e,t){if(e&&t){let s=sessionStorage.getItem("__stmd");["l","s","demo","dev"].includes(s)||(s=(s=Math.random())>.95?"l":"s",sessionStorage.setItem("__stmd",s)),this.loadSt(e,t,s)}},generateSrc:function(e,t,s){let i=this.setCustomVariable("smtenv","v1/js-versioning");"v1/js-versioning"!=i&&(i+=".js"),this.f="//"+this.setCustomVariable("smtdomain","osjs");let c=this.setCustomVariable("smtport","");return c.length>0&&(c=":"+c),"https:"+this.f+".netcoresmartech.com"+c+"/"+i+("?clientkey="+e+"&siteid="+t)+"&rc="+s},loadSt:function(e,t,s){let i=this.d.createElement(this.s);i.async=1,i.src=this.generateSrc(e,t,s),i.id="smartech_v4";let c=this.d.getElementById(i.id);c||this.d.head.appendChild(i)},preSmartech:function(e,t,s){let i,c;if("create"===e){i=t,t=this.setCustomVariable("smtclientid",i),sessionStorage.setItem("ck",t),sessionStorage.setItem("__smtidc",(s||"").toLowerCase()),this.checkLoad(sessionStorage.getItem("ck"),localStorage.getItem("__stsiteid"));return}if("register"===e){c=t,t=this.setCustomVariable("smtsiteid",c),localStorage.setItem("__stsiteid",t),this.checkLoad(sessionStorage.getItem("ck"),localStorage.getItem("__stsiteid"));return}(this.w[this.o].q=this.w[this.o].q||[]).push(arguments)}},window.smartechclient.initiator.bind(window.smartechclient),window.smartechclient.setCustomVariable.bind(window.smartechclient),window.smartechclient.checkLoad.bind(window.smartechclient),window.smartechclient.generateSrc.bind(window.smartechclient),window.smartechclient.loadSt.bind(window.smartechclient),window.smartechclient.preSmartech.bind(window.smartechclient),window.smartechclient.initiator(window,document,"script","//osjs.netcoresmartech.com/","smartech"),(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"))&&(module.exports=window.smartechclient));