(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["LinkAdx"]=t():e["LinkAdx"]=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,{configurable:!1,enumerable:!0,get: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=3)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=!("undefined"==typeof window||!window.document||!window.document.createElement),e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0);var a=function(){};((r=o)&&r.__esModule?r:{default:r}).default&&(a=document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,function(t){(t=t||window.event).target=t.target||t.srcElement,t.currentTarget=e,n.call(e,t)})}:void 0),t.default=a,e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0);var a=function(){};((r=o)&&r.__esModule?r:{default:r}).default&&(a=document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0),t.default=a,e.exports=t["default"]},function(e,t,n){"use strict";var r={productUrlReg:/\/goods\/view/,buyUrlReg:/\/order\/order_result\.html/,merchantId:"cpc_planan",linkadxId:"01Eu",parseOrders:function(e){return{sale:EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.payed_amount,orderCode:EC_FRONT_EXTERNAL_SCRIPT_VARIABLE_DATA.order_id}},roasRate:0,extraUrlRegs:[{urlReg:/\/product\//,action:function(e,t){document.querySelectorAll("[id^=NPAY_BUY_LINK_IDNC_ID_]").length>0&&$(document).ready(function(){var e=document.querySelector("#totalProducts > table > tfoot > tr > td > span > strong > em");e?$("[id^=NPAY_BUY_LINK_IDNC_ID_]").live("click",function(){e=(e=document.querySelector("#totalProducts > table > tfoot > tr > td > span > strong > em").innerText).replace(/[^0-9]/gi,""),t(e,"Npay")}):$(document).ready(function(){$("[id^=NPAY_BUY_LINK_IDNC_ID_]").live("click",function(){e=(e=document.querySelector("#totalProducts > table > tfoot > tr > td > span > strong").innerText).replace(/[^0-9]/gi,""),t(e,"Npay")})})})}},{urlReg:/\/order\/basket\.html/,action:function(e,t){document.querySelectorAll("[id^=NPAY_BUY_LINK_IDNC_ID_]").length>0&&$(document).ready(function(){var e=document.querySelector(".xans-order-totalsummary > table > tbody > tr > td:nth-child(1) > div > strong > span");e?$("[id^=NPAY_BUY_LINK_IDNC_ID_]").live("click",function(){e=(e=document.querySelector(".xans-order-totalsummary > table > tbody > tr > td:nth-child(1) > div > strong > span").innerText).replace(/[^0-9]/gi,""),t(e,"Npay")}):$(document).ready(function(){$("[id^=NPAY_BUY_LINK_IDNC_ID_]").live("click",function(){var e=document.querySelector(".xans-order-totalsummary.totalSummary > div:nth-child(2) > div.total.title > p > strong").innerText;e=e.replace(/[^0-9]/gi,""),t(e,"Npay")})})})}}]},o=n(4);n(22)(function(){o.tracking(r)}),e.exports={version:o.version,merchantId:r.merchantId,linkadxId:r.linkadxId}},function(e,t,n){"use strict";var r={productUrlReg:/productUrlReg/,buyUrlReg:/buyUrlReg/,merchantId:"merchantId",linkadxId:"linkadxId",parseOrders:function(e){},sale:0,orderCode:"orderCode",roasRate:20,extraUrlRegs:[]},o="015y";n(5);var a=n(6),i=n(11),c=n(12),u=n(13);function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Npay";r.sale=e,r.orderCode=t,!1===l(r)&&f()}function l(e){return!!function(e){return e.sale===i.get(d(e.orderCode))}(e)||(function(e){var t=new Date((new Date).getTime()+6e4);i.set(d(e.orderCode),e.sale,{expires:t})}(e),!1)}function d(e){return"la_"+e}function f(){var e=new Date,t="//click.linkadx.com/cgi-bin/pelicanc.dll?adservicename=ROASCOOKIE";t+="&adverid="+r.linkadxId,t+="&rtninfo=lc",t+="&tm="+e.getTime(),a(t,{param:"jquerycallback"},p)}function p(e,t){t.cnt>0?m(t.pageid):function(){var e=Math.floor(100*Math.random());0===e&&(e=1);return e<=r.roasRate}()&&m()}function m(e){void 0===e&&(e=o);var t=new Date,n="//click.linkadx.com/cgi-bin/pelicanc.dll?adservicename=PAGE";n+="&companyid="+r.linkadxId,n+="&campaignid=",n+="&pageid="+e,n+="&cost="+r.sale,n+="&tm="+t.getTime(),n+="&info="+function(e){var t=[e];!1!==c()?t.push("mobile"):t.push("pc");return t.join("_")}(r.orderCode),a(n)}function g(e){return unescape(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+escape(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}e.exports={version:"0.63",tracking:function(e){void 0!==e.productUrlReg&&(r.productUrlReg=e.productUrlReg),void 0!==e.buyUrlReg&&(r.buyUrlReg=e.buyUrlReg),void 0!==e.merchantId&&(r.merchantId=e.merchantId),void 0!==e.linkadxId&&(r.linkadxId=e.linkadxId),"function"==typeof e.parseOrders&&(r.parseOrders=e.parseOrders),void 0!==e.roasRate&&(r.roasRate=e.roasRate),void 0!==e.extraUrlRegs&&(r.extraUrlRegs=e.extraUrlRegs);var t=location.pathname,o=function(e,t){var n={is_buy:!1,target:!1};if(e instanceof RegExp)return n.is_buy=e.test(t),n;for(var r=e.length,o=0;o0&&!1===l(v)&&(r.sale=v.sale,r.orderCode=v.orderCode,i.get("LAINFO")?m():f(),function(){var e=i.get("LAINFO");if(!e)return!1;var t=new Date,o={lpinfo:e,merchant_id:r.merchantId,sales:r.sale,order_code:r.orderCode,tm:t.getTime()};n(18)("//service.linkprice.com/lppurchase_adx.php",{method:"POST",body:o},function(){})}())):(c=g("lpinfo"),d=g("rd")||20,c&&i.set("LAINFO",c,{expires:d}),r.productUrlReg.test(t)||a("//click.linkadx.com/cgi-bin/PelicanC.dll?adservicename=CATEGORY&proc=set&nm=SITE&ids="+r.linkadxId)),function(){var e=r.extraUrlRegs.length;if(0!==e)for(var t=0;tt));r+=1);return n.removeRule(0),i},document.querySelectorAll||document.querySelector||(n=document.createStyleSheet(),document.querySelectorAll=document.body.querySelectorAll=function(e){return r(e,1/0)},document.querySelector=document.body.querySelector=function(e){return r(e,1)[0]||null})},function(e,t,n){var r=n(7)("jsonp");e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={});t||(t={});var i,c,u=t.prefix||"__jp",s=t.name||u+o++,l=t.param||"callback",d=null!=t.timeout?t.timeout:6e4,f=encodeURIComponent,p=document.getElementsByTagName("script")[0]||document.head;d&&(c=setTimeout(function(){m(),n&&n(new Error("Timeout"))},d));function m(){i.parentNode&&i.parentNode.removeChild(i),window[s]=a,c&&clearTimeout(c)}return window[s]=function(e){r("jsonp got",e),m(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+l+"="+f(s)).replace("?&","?"),r('jsonp req "%s"',e),(i=document.createElement("script")).src=e,p.parentNode.insertBefore(i,p),function(){window[s]&&m()}};var o=0;function a(){}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(9)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(a=++o)}),e.splice(a,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(t,n(8))},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}(function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}})();var u,s=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?s=u.concat(s):d=-1,s.length&&p())}function p(){if(!l){var e=c(f);l=!0;for(var t=s.length;t;){for(u=s,s=[];++d1)for(var n=1;n0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var c=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*o;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===s&&!1===isNaN(e))return t.long?c(u=e,a,"day")||c(u,o,"hour")||c(u,r,"minute")||c(u,n,"second")||u+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r,o; /*! * JavaScript Cookie v2.2.0 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */(function(a){if(void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=a(),!!0){var i=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=i,c}}})(function(){function e(){for(var e=0,t={};e1){if("number"==typeof(a=e({path:"/"},r.defaults,a)).expires){var c=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*a.expires),a.expires=c}a.expires=a.expires?a.expires.toUTCString():"";try{i=JSON.stringify(o),/^[\{\[]/.test(i)&&(o=i)}catch(e){}o=n.write?n.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var u="";for(var s in a)a[s]&&(u+="; "+s,!0!==a[s]&&(u+="="+a[s]));return document.cookie=t+"="+o+u}t||(i={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,f=0;ft;)(r=a[o]).name=void 0,r.value=void 0})(l&&"FORM"===l.nodeName?r(l,!0).body:o(l)),document.body.appendChild(i),document.body.appendChild(c),setTimeout(function(){u.click(),document.body.removeChild(c),n()},0)}},function(e,t,n){"use strict";var r=n(20),o=r.flat,a={INPUT:!0,TEXTAREA:!0,SELECT:!0,BUTTON:!0};e.exports=function(e,t){if(!e||"FORM"!==e.nodeName)throw new Error("Can only parse form elements.");for(var n,i=t?o:r,c="multipart/form-data"===e.enctype,u=e.elements,s={},l=c?{}:void 0,d=0,f=u.length;d=0&&i(s,p,m[n.selectedIndex].value);break;case"select-multiple":for(var g,v=[],h=0,y=m.length;hr&&(r=Number(n));return r+1}i.flat=function(e,t,n){return e[t=function(e,t){var n=t.split("[]");if(1===n.length)return t;for(var r=n[0],o=Object.keys(e),a=1,i=n.length;a