!function(){"use strict";var t,e,r,n,o,i,a,c,u,s={},l={};function f(t){var e=l[t];if(void 0!==e)return e.exports;var r=l[t]={exports:{}};return s[t](r,r.exports,f),r.exports}f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),f.rv=function(){return"1.3.15"},f.ruid="bundler=rspack@1.3.15",(t=a||(a={})).WINDOWS_PHONE="Windows Phone",t.ANDROID="android",t.IOS="ios",t.PC="pc",(e=c||(c={})).MUSICAL_LY="musical_ly",e.MUSICALLY_GO="musically_go",e.TRILL="trill",e.ULTRALITE="ultralite",e.LEMON8="lemon8",e.TTLINK="ttlink",(i={})[c.LEMON8]={},i[c.TTLINK]={},i[c.MUSICAL_LY]=((n={})[a.IOS]="33.4.0",n[a.ANDROID]="23.1.0",n),i[c.TRILL]=((o={})[a.IOS]="33.4.0",o[a.ANDROID]="23.1.0",o);var p=function(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==f.g?f.g:Function("return this")()},h=function(){return p().TiktokAnalyticsObject||"ttq"},y=function(){return p()[h()]},d=function(t){try{var e=y()._plugins||{};if(null!=e[t])return!!e[t];return!0}catch(t){return!0}};function _(){_=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i,a,c,u,s=Object.create((e&&e.prototype instanceof p?e:p).prototype);return n(s,"_invoke",{value:(i=t,a=r,c=new E(o||[]),u="suspendedStart",function(t,e){if("executing"===u)throw Error("Generator is already running");if("completed"===u){if("throw"===t)throw e;return N()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,f)}(r,c);if(n){if(n===f)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===u)throw u="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u="executing";var o=l(i,a,c);if("normal"===o.type){if(u=c.done?"completed":"suspendedYield",o.arg===f)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u="completed",c.method="throw",c.arg=o.arg)}})}),s}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function p(){}function h(){}function y(){}var d={};u(d,i,function(){return this});var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=y.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function w(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(f).then(function(t){s.value=t,a(s)},function(t){return n("throw",t,a,c)})}c(u.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function v(t,e,r){return(v=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&g(o,r.prototype),o}:Reflect.construct.bind()).apply(null,arguments)}function g(t,e){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var m={error:[]};(r=u||(u={})).LOAD_START="load_start",r.LOAD_END="load_end",r.BEFORE_INIT="before_init",r.INIT_START="init_start",r.INIT_END="init_end",r.JSB_INIT_START="jsb_init_start",r.JSB_INIT_END="jsb_init_end",r.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",r.AD_INFO_INIT_START="ad_info_init_start",r.AD_INFO_INIT_END="ad_info_init_end",r.IDENTIFY_INIT_START="identify_init_start",r.IDENTIFY_INIT_END="identify_init_end",r.PLUGIN_INIT_START="_init_start",r.PLUGIN_INIT_END="_init_end",r.PIXEL_SEND="pixel_send",r.PIXEL_SEND_PCM="pixel_send_PCM",r.JSB_SEND="jsb_send",r.HTTP_SEND="http_send",r.HANDLE_CACHE="handle_cache",r.INIT_ERROR="init_error",r.PIXEL_EMPTY="pixel_empty",r.JSB_ERROR="jsb_error",r.API_ERROR="api_error",r.PLUGIN_ERROR="plugin_error",r.CUSTOM_INFO="custom_info",r.CUSTOM_ERROR="custom_error",r.CUSTOM_TIMER="custom_timer";try{(function(){if(/function bind\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(Function.prototype.bind.toString()))return!0;function t(){}return new(t.bind.apply(t,[void 0,1])) instanceof t})()&&!Function.prototype._ttq_bind?Object.defineProperty(Function.prototype,"_ttq_bind",{value:Function.prototype.bind,enumerable:!1,writable:!1,configurable:!1}):Function.prototype._ttq_bind||Object.defineProperty(Function.prototype,"_ttq_bind",{value:function(t){if("function"!=typeof this)throw TypeError("What is being called by bind is not a function.");var e=t||window,r=Array.prototype.slice.call(arguments).slice(1),n=Symbol("key");return e[n]=this,function t(){return this instanceof t?v(e[n],r.concat(Array.prototype.slice.call(arguments))):e[n].apply(e,r.concat(Array.prototype.slice.call(arguments)))}},enumerable:!1,writable:!1,configurable:!1}),Object._ttq_keys||(Object._ttq_keys=function(t){try{if(Array.isArray(t))return Object.keys(t).filter(function(t){return -1===["each","eachSlice","all","any","collect","detect","findAll","grep","include","inGroupsOf","inject","invoke","max","min","partition","pluck","reject","sortBy","toArray","zip","size","inspect","select","member","_reverse","_each","clear","first","last","compact","flatten","without","uniq","intersect","clone","toJSON","remove","swap","putAll"].indexOf(t)});return Object.keys(t)}catch(e){return Object.keys(t)}});var b=h();function w(t){return null===t?"NULL":void 0===t?"UNDEFINED":"[object Object]"===Object.prototype.toString.call(t)||"[object Array]"===Object.prototype.toString.call(t)?JSON.stringify(t):t.toString()}/function Map\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(Map.toString())?window[b]._ttq_map=Map:window[b]._ttq_map||(window[b]._ttq_map=function(){this.items={},this.size=0},window[b]._ttq_map.prototype.set=function(t,e){return!this.has(t)&&(this.items[w(t)]=e,this.size++),this},window[b]._ttq_map.prototype.get=function(t){return this.items[w(t)]},window[b]._ttq_map.prototype.has=function(t){return void 0!==this.items[w(t)]},window[b]._ttq_map.prototype.delete=function(t){return this.has(t)&&(delete this.items[w(t)],this.size--),this},window[b]._ttq_map.prototype.clear=function(){this.items={},this.size=0},window[b]._ttq_map.prototype.keys=function(){var t=_().mark(n),e=[];for(var r in this.items)this.has(r)&&e.push(r);function n(){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e,"t0",1);case 1:case"end":return t.stop()}},t)}return n()},window[b]._ttq_map.prototype.values=function(){var t=_().mark(n),e=[];for(var r in this.items)this.has(r)&&e.push(this.items[r]);function n(){return _().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e,"t0",1);case 1:case"end":return t.stop()}},t)}return n()}),function(){if(/function create\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(Map.toString())){Object._ttq_create=Object.create;return}Object._ttq_create=function(){function t(){}var e=Object.prototype.hasOwnProperty;return function(r,n){if("object"!=typeof r&&"function"!=typeof r)throw TypeError("Object prototype may only be an Object or null");t.prototype=r;var o=new t;return t.prototype=null,null!=n&&Object.keys(n).forEach(function(t){var r=n[t];if("object"==typeof r&&null!==r)e.call(r,"value")?o[t]=r.value:("function"==typeof r.get||"function"==typeof r.set)&&Object.defineProperty(o,t,r);else throw TypeError("Property description must be an object: "+r)}),o}}()}()}catch(t){!function(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n=!1);try{var o=y(),i=null==o.getPlugin?void 0:o.getPlugin("Monitor");i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):d("Monitor")&&m.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}(u.INIT_ERROR,t)}}();!function(){var t={278:function(t,e,r){t=r.nmd(t);var n,o="__lodash_hash_undefined__",i="[object Arguments]",a="[object Boolean]",c="[object Date]",s="[object Function]",u="[object GeneratorFunction]",f="[object Map]",l="[object Number]",p="[object Object]",h="[object Promise]",d="[object RegExp]",v="[object Set]",_="[object String]",g="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",b="[object Float64Array]",I="[object Int8Array]",O="[object Int16Array]",T="[object Int32Array]",R="[object Uint8Array]",S="[object Uint8ClampedArray]",N="[object Uint16Array]",P="[object Uint32Array]",A=/\w*$/,L=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,C={};C[i]=C["[object Array]"]=C[y]=C[E]=C[a]=C[c]=C[w]=C[b]=C[I]=C[O]=C[T]=C[f]=C[l]=C[p]=C[d]=C[v]=C[_]=C[g]=C[R]=C[S]=C[N]=C[P]=!0,C["[object Error]"]=C[s]=C[m]=!1;var D="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,k="object"==typeof self&&self&&self.Object===Object&&self,M=D||k||Function("return this")(),j=e&&!e.nodeType&&e,F=j&&t&&!t.nodeType&&t,U=F&&F.exports===j;function q(t,e){return t.set(e[0],e[1]),t}function G(t,e){return t.add(e),t}function H(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o-1},tR.prototype.set=function(t,e){var r=this.__data__,n=tA(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},tS.prototype.clear=function(){this.__data__={hash:new tT,map:new(th||tR),string:new tT}},tS.prototype.delete=function(t){return tC(this,t).delete(t)},tS.prototype.get=function(t){return tC(this,t).get(t)},tS.prototype.has=function(t){return tC(this,t).has(t)},tS.prototype.set=function(t,e){return tC(this,t).set(t,e),this},tN.prototype.clear=function(){this.__data__=new tR},tN.prototype.delete=function(t){return this.__data__.delete(t)},tN.prototype.get=function(t){return this.__data__.get(t)},tN.prototype.has=function(t){return this.__data__.has(t)},tN.prototype.set=function(t,e){var r=this.__data__;if(r instanceof tR){var n=r.__data__;if(!th||n.length<199)return n.push([t,e]),this;r=this.__data__=new tS(n)}return r.set(t,e),this};var tk=tu?Y(tu,Object):function(){return[]},tM=function(t){return tt.call(t)};function tj(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||X)}function tF(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function tU(t,e){return t===e||t!=t&&e!=e}(tp&&tM(new tp(new ArrayBuffer(1)))!=E||th&&tM(new th)!=f||td&&tM(td.resolve())!=h||tv&&tM(new tv)!=v||t_&&tM(new t_)!=m)&&(tM=function(t){var e=tt.call(t),r=e==p?t.constructor:void 0,n=r?tF(r):void 0;if(n)switch(n){case tm:return E;case ty:return f;case tE:return h;case tw:return v;case tb:return m}return e});var tq=Array.isArray;function tG(t){var e;return null!=t&&"number"==typeof(e=t.length)&&e>-1&&e%1==0&&e<=0x1fffffffffffff&&!tV(t)}var tH=tf||function(){return!1};function tV(t){var e=tB(t)?tt.call(t):"";return e==s||e==u}function tB(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function tY(t){return tG(t)?function(t,e){var r,n,o,a,c,s=tq(t)||(o=n=r=t)&&"object"==typeof o&&tG(n)&&$.call(r,"callee")&&(!tc.call(r,"callee")||tt.call(r)==i)?function(t,e){for(var r=-1,n=Array(t);++r-1&&a%1==0&&a0||e._partner===t},R=function(t){try{var e=m()._plugins||{};if(null!=e[t])return!!e[t];return!0}catch(t){return!0}},S=function(){try{var t=m()._ppf;return null==t.printAndClear?void 0:t.printAndClear()}catch(t){}},N={info:[],error:[]};function P(t,e,r){void 0===e&&(e={}),void 0===r&&(r=!1);try{var n=m(),o=null==n.getPlugin?void 0:n.getPlugin("Monitor");o&&o.info&&"function"==typeof o.info?o.info.call(o,t,e,r):R("Monitor")&&N.info.push({event:t,detail:e,withoutJSB:r})}catch(t){}}function A(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n=!1);try{var o=m(),i=null==o.getPlugin?void 0:o.getPlugin("Monitor");i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):R("Monitor")&&N.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}function L(t,e){try{var r=m(),n=null==r.getPlugin?void 0:r.getPlugin("DiagnosticsConsole");n&&n.warn.apply(n,[t,e])}catch(t){}}function x(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"getPixelDetail",start:performance.now()}}catch(t){}var e={lib:"ttq",pixelCode:"MOCK_SHOP_ID"};try{var r=document&&document.currentScript,n=r&&r.getAttribute("data-id")||"",o=g()||"ttq";e={pixelCode:n,lib:o}}catch(t){e={lib:"ttq",pixelCode:""}}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(t){}return e}var C=function(){try{var t=m();if(!(t&&t._legacy&&0!==t._legacy.length))return!1;return Object.keys(t._t).length>Object.keys(t._legacy||[]).length||t.reporters.length>Object.keys(t._legacy||[]).length}catch(t){return!1}};function D(t){var e=Error(t);return e.source="ulid",e}(ao=a1||(a1={})).LOAD_START="load_start",ao.LOAD_END="load_end",ao.BEFORE_INIT="before_init",ao.INIT_START="init_start",ao.INIT_END="init_end",ao.JSB_INIT_START="jsb_init_start",ao.JSB_INIT_END="jsb_init_end",ao.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",ao.AD_INFO_INIT_START="ad_info_init_start",ao.AD_INFO_INIT_END="ad_info_init_end",ao.IDENTIFY_INIT_START="identify_init_start",ao.IDENTIFY_INIT_END="identify_init_end",ao.PLUGIN_INIT_START="_init_start",ao.PLUGIN_INIT_END="_init_end",ao.PIXEL_SEND="pixel_send",ao.PIXEL_SEND_PCM="pixel_send_PCM",ao.JSB_SEND="jsb_send",ao.HTTP_SEND="http_send",ao.HANDLE_CACHE="handle_cache",ao.INIT_ERROR="init_error",ao.PIXEL_EMPTY="pixel_empty",ao.JSB_ERROR="jsb_error",ao.API_ERROR="api_error",ao.PLUGIN_ERROR="plugin_error",ao.CUSTOM_INFO="custom_info",ao.CUSTOM_ERROR="custom_error",ao.CUSTOM_TIMER="custom_timer",(ai=a2||(a2={}))[ai.NOT_SURE=0]="NOT_SURE",ai[ai.INVOKE_METHOD_ENABLED=1]="INVOKE_METHOD_ENABLED",ai[ai.INVOKE_METHOD_NOT_ENABLED=2]="INVOKE_METHOD_NOT_ENABLED",(aa=a3||(a3={})).NORMAL="1",aa.NOT_CROSS_DOMAIN_IFRAME="2",aa.CROSS_DOMAIN_IFRAME="3",aa.WEB_WORKER="4",aa.SANDBOX_IFRAME="5",aa.GTM_IFRAME="6",aa.URL_IN_QUERY_IFRAME="7",aa.UNKNOWN_IFRAME="8";var k="0123456789ABCDEFGHJKMNPQRSTVWXYZ",M=k.length,j=(ac||(ac=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments[1];e||(e="undefined"!=typeof window?window:null);var n=e&&(e.crypto||e.msCrypto);if(n)return function(){var t=new Uint8Array(1);return n.getRandomValues(t),t[0]/255};try{var o=r(616);return function(){return o.randomBytes(1).readUInt8()/255}}catch(t){}if(t)return function(){return Math.random()};throw D("secure crypto unusable, insecure Math.random not allowed")}()),function(t){return isNaN(t)&&(t=Date.now()),function(t,e){if(isNaN(t))throw Error(t+" must be a number");if(t>0xffffffffffff)throw D("cannot encode time greater than 281474976710655");if(t<0)throw D("time must be positive");if(!1===Number.isInteger(t))throw D("time must be an integer");for(var r=void 0,n="";e>0;e--)r=t%M,n=k.charAt(r)+n,t=(t-r)/M;return n}(t,10)+function(t,e){for(var r="";t>0;t--)r=function(t){var e=Math.floor(t()*M);return e===M&&(e=M-1),k.charAt(e)}(e)+r;return r}(16,ac)});(as=a6||(a6={})).EMPTY_VALUE="empty_value",as.WRONG_FORMAT="wrong_format",as.CORRECT_FORMAT="correct_format",as.HASHED="hashed",as.HASHED_ERR="hashed_err",as.HASHED_CORRECT="hashed_correct",as.PLAINTEXT_EMAIL="plaintext_email",as.PLAINTEXT_PHONE="plaintext_phone",(au=a5||(a5={})).EMPTY_VALUE="empty_value",au.PLAIN_EMAIL="plain_email",au.PLAIN_PHONE="plain_phone",au.HASHED="hashed",au.FILTER_EVENTS="filter_events",au.UNKNOWN_INVALID="unknown_invalid",au.BASE64_STRING_HASHED="base64_string_hashed",au.BASE64_HEX_HASHED="base64_hex_hashed",au.PLAIN_MDN_EMAIL="plain_mdn_email",au.ZIP_CODE_IS_NOT_HASHED="zip_code_is_not_hashed",au.ZIP_CODE_IS_NOT_US="zip_code_is_not_us",au.ZIP_CODE_IS_HASHED="zip_code_is_hashed",au.ZIP_CODE_IS_US="zip_code_is_us",(af=a4||(a4={})).Manual="manual",af.ManualV2="manual_v2",af.Auto="auto",af.EBManual="eb_manual",(al=a8||(a8={})).empty="empty",al.whitespace="whitespace",al.hardcode="hardcode",al.encode="encode",(ap=a9||(a9={})).letterCase="letter_case",ap.isNotValidEmail="is_not_valid_email",ap.isNotPossibleEmail="is_not_possible_email",ap.domainTypo="domain_typo",ap.addressFormat="address_format",(ah=a7||(a7={})).invalidCountry="invalid_country",ah.notANumber="not_a_number",ah.tooShort="too_short",ah.tooLong="too_long",ah.invalidLength="invalid_length",ah.emptyCountryCodeThroughIP="empty_country_code_through_ip",ah.invalidCountryAfterInjectPlus="invalid_country_after_inject_plus",ah.notANumberAfterInjectPlus="not_a_number_after_inject_plus",ah.tooShortAfterInjectPlus="too_short_after_inject_plus",ah.tooLongAfterInjectPlus="too_long_after_inject_plus",ah.invalidLengthAfterInjectPlus="invalid_length_after_inject_plus",ah.invalidCountryAfterInjectCountry="invalid_country_after_inject_country",ah.notANumberAfterInjectCountry="not_a_number_after_inject_country",ah.tooShortAfterInjectCountry="too_short_after_inject_country",ah.tooLongAfterInjectCountry="too_long_after_inject_country",ah.invalidLengthAfterInjectCountry="invalid_length_after_inject_country",(ad=ct||(ct={})).missing="missing",ad.valid="valid",ad.invalid="invalid";var F={raw_email:{label:ct.missing},raw_auto_email:{label:ct.missing},raw_phone:{label:ct.missing},raw_auto_phone:{label:ct.missing},hashed_email:{label:ct.missing},hashed_phone:{label:ct.missing},raw_eb_email:{label:ct.missing},raw_eb_phone:{label:ct.missing}};(av=ce||(ce={}))[av.UNKNOWN=0]="UNKNOWN",av[av.HOLD=1]="HOLD",av[av.REVOKE=2]="REVOKE",av[av.GRANT=3]="GRANT";var U=["phone_number","email","external_id"],q={EMAIL_IS_HASHED:"email_is_hashed",PHONE_IS_HASHED:"phone_is_hashed",SHA256_EMAIL:"sha256_email",SHA256_PHONE:"sha256_phone"},G="auto_trigger_type",H=function(t){return"[object Object]"===Object.prototype.toString.call(t)},V=function(t){return t+"-"+Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12)},B=function(t,e,r){return void 0===r&&(r="-"),""+t+r+e};function Y(t,e,r){void 0===e&&(e=500);var n=-1,o=r?t.bind(r):t;return function(){var t=Array.prototype.slice.apply(arguments);Date.now()-n>=e&&(o.apply(void 0,t),n=Date.now())}}var K=function(t){return/^(0|([1-9]\d*))$/.test(""+t)};function W(){W=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function J(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}var X=function(t){},Q=function(t){return!!t},Z=function(t){return void 0!==t.metric_name},z=function(t){return"CompletePayment"===t||"Purchase"===t},$=function(t){var e;return Object.keys((null==t||null==(e=t.context)?void 0:e.user)||{}).some(function(t){return -1!==U.indexOf(t)})};function tt(t,e){var r,n=t;return function(){if(n){for(var o=arguments.length,i=Array(o),a=0;a62?t+="-":t+="_",t},"")},tr=function(){for(var t=j(Date.now());27!==t.length;)t.length>27?t=t.slice(0,27):t+="_";return t},tn=function(t,e){if(0===Object.keys(t).length)return{};var r={identity_params:{}},n={email:["email_is_hashed","sha256_email"],phone_number:["phone_is_hashed","sha256_phone"],zip_code:["zip_code"]};return Object.entries(e).forEach(function(e){var o=e[0];e[1]&&n[o]&&n[o].forEach(function(e){if(r.identity_params[e]=[a6.EMPTY_VALUE],t[e]){var n=t[e]||[a6.EMPTY_VALUE];r.identity_params&&(r.identity_params[e]=[].concat(n))}})}),r},to=function(t,e){var r={identity_params:{}};return 0===Object.keys(t).length?{}:(Object.entries(e).forEach(function(e){var n=e[0];if(e[1])if(t[n]&&t[n].length){var o=t[n]||[a6.EMPTY_VALUE];r.identity_params[n]=[].concat(o)}else r.identity_params[n]=[a6.EMPTY_VALUE]}),r)};function ti(t,e){var r=Object.assign({},t);return e.forEach(function(t){null!==r[t]&&void 0!==r[t]&&delete r[t]}),r}var ta=function(t,e){if(!t)return{};var r={};return Object.keys(t).forEach(function(n){e[n]&&(r[n]=t[n])}),r};function tc(t,e,r){var n,o=r?t.bind(r):t;return function(){for(var t=arguments.length,r=Array(t),i=0;i-1){e=i;break}}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(t){}return e},tv=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"getPixelInstalledPosition",start:performance.now()}}catch(t){}var r="unknown";try{var n=t&&td(t);n&&(t_(n)&&(r="isInHead"),tm(n)&&(r="isInBodyTop10"))}catch(t){}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}return r},t_=function t(e){var r=e.parentElement;return!!r&&("HEAD"===r.tagName||t(r))},tg=function(t,e){for(var r=[document.body],n=0;n<=t&&r.length;){var o,i=r.pop();if(i===e)return!0;if(!((null==i?void 0:i.tagName.toLowerCase())==="script"&&(null==(o=i.src)?void 0:o.indexOf("analytics.tiktok.com"))>-1)){if(n++,"object"==typeof i&&i.children)for(var a=i.children.length-1;a>=0;a--)r.push(i.children[a])}}return!1},tm=function(t){return tg(10,t)},ty=/function WeakSet\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(WeakSet.toString());(a_=cr||(cr={})).EXTERNAL="external",a_.APP="app",a_.TIKTOK="tiktok";var tE={ID:Symbol.for("ID"),Type:Symbol.for("type"),Partner:Symbol.for("partner"),Options:Symbol.for("Options"),Plugins:Symbol.for("Plugins"),Rules:Symbol.for("Rules"),Info:Symbol.for("Info"),ExtraParams:Symbol.for("extraParams"),WebLibraryInfo:Symbol.for("WebLibraryInfo"),SignalType:Symbol.for("SignalType"),IsOnsitePage:Symbol.for("IsOnsitePage")};(ag=cn||(cn={}))[ag.OFFSITE=0]="OFFSITE",ag[ag.ONSITE=1]="ONSITE";var tw=function(){var t,e;return(null==(t=m())||null==(e=t._env)?void 0:e.env)||cr.EXTERNAL},tb=function(){var t,e;return null!=(t=null==(e=m())?void 0:e._is_onsite)?t:cn.OFFSITE},tI=function(t){return(t||tw())!==cr.EXTERNAL},tO=function(t){return(t||tw())===cr.TIKTOK},tT=function(){var t=w();return/windows phone/i.test(t)?a$.WINDOWS_PHONE:/android/i.test(t)?a$.ANDROID:/iPad|iPhone|iPod/.test(t)?a$.IOS:a$.PC},tR=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(t){return Promise.resolve({})}},tS=function(){return"android"===tT()},tN=function(){return"ios"===tT()},tP=function(){return!1},tA=function(){return window.top!==window},tL=tt(function(){return/open_news/i.test(w())}),tx=tt(function(){return/ultralite/i.test(w())}),tC=function(){try{return window&&window.top&&window.top.location.href,!1}catch(t){return!0}},tD=function(){try{var t=new URL(decodeURIComponent(window.location.href)),e=/https?:\/\/[^\s/$.?#].[^\s]*/i;return e.test(t.search)||e.test(t.pathname)}catch(t){return!1}},tk=function(){try{if(!tC())return a3.NOT_CROSS_DOMAIN_IFRAME;if(tD())return a3.URL_IN_QUERY_IFRAME;if(window.google_tag_manager)return a3.GTM_IFRAME;if(window.name&&"web-pixel-sandbox"===window.name)return a3.SANDBOX_IFRAME;return a3.CROSS_DOMAIN_IFRAME}catch(t){return a3.UNKNOWN_IFRAME}},tM=function(){return y()?a3.WEB_WORKER:tA()?tk():a3.NORMAL},tj=function(){var t=w();if(t)for(var e=0,r=Object.values(a0);ea)return!1}return!0},tV=function(t){var e=tj();return void 0!==e&&t.has(e)},tB=function(){var t=_();try{return!!(t.Shopify&&t.Shopify.shop&&t.Shopify.shop.indexOf(".myshopify.com")>0||t.name&&t.name.startsWith("web-pixel-sandbox-CUSTOM-shopify"))}catch(t){}return!1},tY=function(){var t=m();return"object"==typeof t&&t._i?t._i:{}},tK=function(t,e){var r=tY()||{};Object.keys(r).forEach(function(n){var o=r[n];o._init||o.push([t].concat(e))})},tW=function(t,e,r){var n=(tY()||{})[t];if(n){if(n._init)return;n.push([e].concat(r))}};function tJ(t,e){try{var r=new URL(t).searchParams.getAll(e);return r[r.length-1]||""}catch(t){return""}}var tX=function(t,e,r){try{var n=tJ(e,t);if(n)return n;return tJ(r||"",t)}catch(t){}return""},tQ=function(){if(!tA())return{url:window.location.href,referrer:document.referrer,title:document.title};if(!tC()){var t,e,r,n,o,i;return{url:(null==(t=window)||null==(e=t.top)?void 0:e.location.href)||"",referrer:(null==(r=window)||null==(n=r.top)?void 0:n.document.referrer)||"",title:(null==(o=window)||null==(i=o.top)?void 0:i.document.title)||""}}var a=document.title,c=window.location.href,s=document.referrer;if(/doubleclick\.net/.test(window.location.hostname)){var u=window.location.pathname,f={};return u.split(";").forEach(function(t){var e=t.split("="),r=e[0],n=e[1];r&&n&&(f[r]=decodeURIComponent(n))}),{url:f["~oref"]||c,referrer:s,title:a}}return{url:c,referrer:s,title:a}},tZ=function(t){var e=tQ().url;try{return new URL(t||e)}catch(t){}return null};function tz(){return tQ().url.indexOf("disneyplus.com")>-1||tG("74641798")}(am=co||(co={})).PIXEL_CODE="pixelCode",am.EVENT_SOURCE_ID="eventSourceId",am.SHOP_ID="shopId",(ay=ci||(ci={})).CLICK="click",ay.TOUNCH_START="touchStart",ay.POINTER_DOWN="pointerDown",(aE=ca||(ca={})).BEFORE_REPORT="beforeReport",aE.QUEUE="queue",(cc||(cc={})).UPDATE_CONFIG="observer:updateConfig";var t$={TTQ:Symbol.for("TTQ"),GLOBAL_TTQ:Symbol.for("GLOBAL_TTQ"),SHOPIFY_TTQ:Symbol.for("SHOPIFY_TTQ"),ENV:Symbol.for("ENV"),CONTEXT:Symbol.for("CONTEXT"),REPORTER:Symbol.for("REPORTER"),REPORTERS:Symbol.for("REPORTERS"),PLUGIN:Symbol.for("PLUGIN"),PLUGINS:Symbol.for("PLUGINS"),TTQ_GLOBAL_OPTIONS:Symbol.for("TTQ_GLOBAL_OPTIONS"),EVENT_EMITTER:Symbol.for("EVENT_EMITTER"),PERFORMANCE_PLUGIN:Symbol.for("PERFORMANCE_PLUGIN"),INTERACTION_PLUGIN:Symbol.for("INTERACTION_PLUGIN"),INTERACTION_PLUGIN_MONITOR:Symbol.for("INTERACTION_PLUGIN_MONITOR"),PERFORMANCE_PLUGIN_MONITOR:Symbol.for("PERFORMANCE_PLUGIN_MONITOR"),ADVANCED_MATCHING_PLUGIN:Symbol.for("ADVANCED_MATCHING_PLUGIN"),AUTO_ADVANCED_MATCHING_PLUGIN:Symbol.for("AUTO_ADVANCED_MATCHING_PLUGIN"),CALLBACK_PLUGIN:Symbol.for("CALLBACK_PLUGIN"),IDENTIFY_PLUGIN:Symbol.for("IDENTIFY_PLUGIN"),MONITOR_PLUGIN:Symbol.for("MONITOR_PLUGIN"),WEB_FL_PLUGIN:Symbol.for("WEB_FL_PLUGIN"),SHOPIFY_PLUGIN:Symbol.for("SHOPIFY_PLUGIN"),AUTO_CONFIG_PLUGIN:Symbol.for("AUTO_CONFIG_PLUGIN"),DIAGNOSTICS_CONSOLE_PLUGIN:Symbol.for("DIAGNOSTICS_CONSOLE_PLUGIN"),COMPETITOR_INSIGHT_PLUGIN:Symbol.for("COMPETITOR_INSIGHT_PLUGIN"),PANGLE_COOKIE_MATCHING_PLUGIN:Symbol.for("PANGLE_COOKIE_MATCHING_PLUGIN"),EVENT_BUILDER_PLUGIN:Symbol.for("EVENT_BUILDER_PLUGIN"),ENRICH_IPV6_PLUGIN:Symbol.for("ENRICH_IPV6_PLUGIN"),LPV_PLUGIN:Symbol.for("LPV_PLUGIN"),RUNTIME_MEASUREMENT_PLUGIN:Symbol.for("RUNTIME_MEASUREMENT_PLUGIN"),PAGE_PERFORMANCE_MONITOR:Symbol.for("PAGE_PERFORMANCE_MONITOR"),PAGE_INTERACTION_MONITOR:Symbol.for("PAGE_INTERACTION_MONITOR"),PAGEDATA_PLUGIN:Symbol.for("PAGEDATA_PLUGIN"),HISTORY_OBSERVER:Symbol.for("HISTORY_OBSERVER"),INTERACTION_OBSERVER:Symbol.for("INTERACTION_OBSERVER"),BATCH_SERVICE:Symbol.for("BATCH_SERVICE"),REPORT_SERVICE:Symbol.for("REPORT_SERVICE"),AD_SERVICE:Symbol.for("AD_SERVICE"),APP_SERVICE:Symbol.for("APP_SERVICE"),BRIDGE_SERVICE:Symbol.for("BRIDGE"),HTTP_SERVICE:Symbol.for("HTTP_SERVICE"),COOKIE_SERVICE:Symbol.for("COOKIE_SERVICE"),CONSENT_SERVICE:Symbol.for("CONSENT_SERVICE"),JS_BRIDGE:Symbol.for("JS_BRIDGE"),TTQ_REPORTERS:Symbol.for("TTQ_REPORTERS"),INTERACTION_MONITOR:Symbol.for("INTERACTION_MONITOR"),PERFORMANCE_MONITOR:Symbol.for("PERFORMANCE_MONITOR"),SANDBOX_PIXEL_API:Symbol("SANDBOX_PIXEL_API")};(aw=cs||(cs={})).INIT_START="initStart",aw.INIT_END="initEnd",aw.PATCH_END="patchEnd",aw.CONTEXT_INIT_START="contextInitStart",aw.CONTEXT_INIT_END="contextInitEnd",aw.PAGE_URL_WILL_CHANGE="pageUrlWillChange",aw.PAGE_URL_DID_CHANGE="pageUrlDidChange",aw.PAGE_DID_LOAD="pageDidLoad",aw.PAGE_WILL_LEAVE="pageWillLeave",aw.AD_INFO_INIT_START="adInfoInitStart",aw.AD_INFO_INIT_END="adInfoInitEnd",aw.BEFORE_AD_INFO_INIT_START="beforeAdInfoInitStart",aw.PIXEL_SEND="pixelSend",aw.PIXEL_DID_MOUNT="pixelDidMount",(ab=cu||(cu={})).UNKNOWN="-1",ab.LOADING="0",ab.INTERACTIVE="1",ab.COMPLETE="2",(aI=cf||(cf={})).HISTORY_CHANGE="hc",aI.URL_CHANGE="uc";var t0=["page","track","identify"],t1=["holdConsent","revokeConsent","grantConsent"],t2=["identify"],t3=["instance","instances","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"];(aO=cl||(cl={})).EMPTY_EVENT_TYPE_NAME="EMPTY_EVENT_TYPE_NAME",aO.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT="MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT",aO.LONG_EVENT_TYPE_NAME="LONG_EVENT_TYPE_NAME",aO.MISSING_VALUE_PARAMETER="MISSING_VALUE_PARAMETER",aO.MISSING_CURRENCY_PARAMETER="MISSING_CURRENCY_PARAMETER",aO.MISSING_CONTENT_ID="MISSING_CONTENT_ID",aO.MISSING_EMAIL_AND_PHONE="MISSING_EMAIL_AND_PHONE",aO.INVALID_EVENT_PARAMETER_VALUE="INVALID_EVENT_PARAMETER_VALUE",aO.INVALID_CURRENCY_CODE="INVALID_CURRENCY_CODE",aO.INVALID_CONTENT_ID="INVALID_CONTENT_ID",aO.INVALID_CONTENT_TYPE="INVALID_CONTENT_TYPE",aO.INVALID_EMAIL_FORMAT="INVALID_EMAIL_FORMAT",aO.INVALID_PHONE_NUMBER_FORMAT="INVALID_PHONE_NUMBER_FORMAT",aO.INVALID_EMAIL_INFORMATION="INVALID_EMAIL_INFORMATION",aO.INVALID_PHONE_NUMBER_INFORMATION="INVALID_PHONE_NUMBER_INFORMATION",aO.DUPLICATE_PIXEL_CODE="DUPLICATE_PIXEL_CODE",aO.MISSING_PIXEL_CODE="MISSING_PIXEL_CODE",aO.INVALID_PIXEL_CODE="INVALID_PIXEL_CODE";var t6=function(t,e,r){t.isBound(e)?t.rebind(e).toConstantValue(r):t.bind(e).toConstantValue(r)},t5=function(){var t=m();return t&&t._i||{}},t4=function(t,e,r){void 0===r&&(r=cn.OFFSITE);try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"webTtqFactory",start:performance.now()}}catch(t){}t6(t,t$.ENV,e),t6(t,tE.SignalType,r);var o=t.get(t$.TTQ);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(t){}return o},t8=function(t,e){var r,n=e.id,o=e.type,i=void 0===o?co.PIXEL_CODE:o,a=e.info,c=e.options,s=e.plugins,u=void 0===s?{}:s,f=e.rules;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var l={taskName:window.ttq._pf_tn,functionName:"webReporterFactory",start:performance.now()}}catch(t){}var p=t.get(t$.TTQ),h=t.get(t$.TTQ_REPORTERS);if(!h.some(function(t){return t.getReporterId()===n})){t6(t,tE.ID,n),t6(t,tE.Type,i),t6(t,tE.Info,a||((r={})[i]=n,r)),t6(t,tE.Options,void 0===c?{}:c),t6(t,tE.Plugins,u),t6(t,tE.Rules,void 0===f?[]:f),p.enableFirstPartyCookie((null==a?void 0:a.firstPartyCookieEnabled)||!1);var d=t.get(t$.REPORTER);if(u){var v=u.AdvancedMatching,_=u.AutoAdvancedMatching,g={};v&&Object.assign(g,v),_&&Object.assign(g,_),d.setAdvancedMatchingAvailableProperties(g)}d.on(ca.BEFORE_REPORT,function(t,e,r,n,o){p.dispatch(cs.PIXEL_SEND,t,e,r,n,o)},{}),h.push(d),t.rebind(t$.TTQ_REPORTERS).toConstantValue(h),p.dispatch(cs.PIXEL_DID_MOUNT,d);try{window.ttq&&window.ttq._ppf&&(l.end=performance.now(),window.ttq._ppf.push(l))}catch(t){}return d}},t9=function(t,e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"mergeWebGlobalTtq",start:performance.now()}}catch(t){}["getReporter","usePlugin","getPlugin","resetCookieExpires","getEmitter"].forEach(function(r){t[r]=function(){for(var t=arguments.length,n=Array(t),o=0;o-1&&setTimeout(function(){P(a1.CUSTOM_INFO,{pixelCode:a,custom_name:e})}),t[e].apply(t,r)}catch(t){return A(a1.API_ERROR,t,{extJSON:{api:e}}),{}}}},set:function(){}})}),t0.forEach(function(e){Object.defineProperty(o,e,{get:function(){return function(){try{var r=1==arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return tK(e,r),t[e].apply(t,r)}catch(t){return A(a1.API_ERROR,t,{extJSON:{api:e}}),{}}}},set:function(){}})}),r[n]._mounted=!0,r[n].initialize=!0,v(r[n]);try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}},er=function(t,e,r){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"handleCache",start:performance.now()}}catch(t){}en(e),Object.entries(t5()).forEach(function(n){var o=n[0],i=n[1];if(!i._init&&("Tealium"===O(o)||E()||i.info)&&(e.getReporter(o)?L(cl.DUPLICATE_PIXEL_CODE):(r||t8)(t,{id:o,type:co.PIXEL_CODE,info:i.info,options:i.options,rules:i.rules,plugins:i.plugins}),i._init=!0,i.length>0))for(;i.length;){var a=i.shift();if(a){var c=a[0],s=a.slice(1),u=e.instance(o);if(u)switch(c){case"identify":tz()?u.identify(s[0],s[1]):e.identify(s[0],s[1]);break;case"page":e.page(s[0]);break;case"track":u.track(s[0],s[1],s[2]||{});break;default:u[c]?u[c](s[0],s[1],s[2]||{}):A(a1.CUSTOM_ERROR,Error("action not find: "+u[c]))}}}}),eo(e);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(t){}},en=function(t){try{var e=m();[].concat(t1,t2).forEach(function(r){e.find(function(n,o){var i=n[0],a=n.slice(1);if(i===r)return t[r].apply(t,a),e.splice(o,1),!0})})}catch(t){A(a1.API_ERROR,t,{extJSON:{api:"handleP0APICache"}})}},eo=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"handleGlobalCache",start:performance.now()}}catch(t){}var r=m();if(r.length>0)for(;r.length;){var n=r.shift();if(n){var o=n[0],i=n.slice(1);switch(!T("Tealium")&&tK(o,i),o){case"identify":t.identify(i[0],i[1]);break;case"page":t.page(i[0]);break;case"track":t.track(i[0],i[1],i[2]||{});break;case"enableCookie":t.enableCookie();break;case"disableCookie":t.disableCookie();break;case"holdConsent":t.holdConsent();break;case"revokeConsent":t.revokeConsent();break;case"grantConsent":t.grantConsent()}}}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}};function ei(t,e,r){return(ei=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&ea(o,r.prototype),o}:Reflect.construct.bind()).apply(null,arguments)}function ea(t,e){return(ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ec="_ttq_inject",es=function(){function t(){this.bindings={},this.rebind=this.bind}var e=t.prototype;return e.bind=function(t){var e=this;return{to:function(r){return e.bindings[t.toString()]={constructor:r,singleton:!1},e},toConstantValue:function(r){return e.bindings[t.toString()]={value:r,singleton:!0},e}}},e.isBound=function(t){return!!this.bindings[t.toString()]},e.inSingletonScope=function(){var t=Object.keys(this.bindings),e=t[t.length-1];if(e){var r=this.bindings[e];r&&(this.bindings[e]=Object.assign(Object.assign({},r),{singleton:!0}))}return this},e.get=function(t){var e=this.bindings[t.toString()];if(!e)throw Error("No binding found for identifier: "+String(t));return void 0!==e.value?e.value:e.singleton?(e.instance||(e.instance=this.createInstance(e.constructor)),e.instance):this.createInstance(e.constructor)},e.createInstance=function(t){var e=this;if(!t)throw Error("Cannot create instance because constructor is not defined.");var r=(t[ec]||[]).map(function(t){try{return e.get(t.identifier)}catch(e){if(t.optional)return;throw e}});return ei(t,r)},t}();function eu(){return function(t){}}function ef(t){return function(e,r,n){e[ec]=e[ec]||[],e[ec][n]=Object.assign({},e[ec][n],{identifier:t})}}function el(){return function(t,e,r){t[ec]=t[ec]||[],t[ec][r]=Object.assign({},t[ec][r],{optional:!0})}}(aT=cp||(cp={})).BIND="bind",aT.REBIND="rebind";var ep=function(t){try{var e=window.sessionStorage.getItem(t);if(!e)return null;return JSON.parse(e)}catch(t){return null}},eh=function(t){try{window.sessionStorage.removeItem(t)}catch(t){}},ed=function(t,e){try{var r=JSON.stringify(e);window.sessionStorage.setItem(t,r)}catch(t){}},ev="https://analytics.tiktok.com/api/v2",e_=ev+"/pixel",eg=ev+"/performance",em=ev+"/interaction",ey=ev+"/performance_interaction",eE=ev+"/pixel/perf",ew=ev+"/pixel/inter",eb=ev+"/pixel/act",eI=ev+"/monitor",eO="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",eT="ttclid",eR="_toutiao_params",eS=function(t,e){try{var r=tX(eT,t,e)||void 0,n=tX("ext_params",t,e)||void 0,o=tX(eR,t,e)||void 0,i=parseInt(tX("ttuts",t,e),10)||void 0,a=o?JSON.parse(o):{},c=a.log_extra,s=void 0===c?void 0:c,u=a.idc,f=void 0===u?void 0:u,l=a.cid,p=void 0===l?void 0:l;return{callback:r,ext_params:n,log_extra:s,creative_id:p,idc:f,ttuts:i,ad_info_from:(s||f||p)&&"url"}}catch(t){return{}}},eN=function(t,e){try{var r=t.log_extra,n=t.ttuts;if(!tN())return!0;if(!tO(e)){if(null!=n)return 1!==n;return!0}if(r){var o=JSON.parse(r);return 1!==o.user_tracking_status}if(null===t.ATTStatus||void 0===t.ATTStatus)return!0;return 3===t.ATTStatus}catch(t){return!1}},eP=function(t,e){var r={};try{var n=t.creative_id,o=(t.callback,t.idc),i=t.convert_id,a=t.ad_info_from,c=t.ad_info_status,s=t.log_extra,u=t.ext_params,f=t.ATTStatus;if(n&&(r.creative_id=n),o&&(r.idc=o),i&&(r.convert_id=i),a&&(r.ad_info_from=a),c&&(r.ad_info_status=c),u&&(r.ext_params=u),f&&(r.ATTStatus=f),s){var l=JSON.parse(s),p=l.ad_user_agent,h=l.ad_id,d=l.rit,v=l.ocbs,_=l.vid,g=l.idc,m=l.country_id;h&&(r.ad_id=h),d&&(r.rit=d),p&&(r.ad_user_agent=p),v&&(r.ocbs=v),_&&(r.vid=_),g&&(r.idc=g),m&&(r.country_id=m)}return r}catch(t){return e&&e(t),r}},eA=function(t){void 0===t&&(t={});var e=Object.assign({},{path:"/"},t);"number"==typeof e.expires&&(e.expires=new Date(Date.now()+864e5*e.expires)),e.expires instanceof Date&&(e.expires=e.expires.toUTCString());var r="";for(var n in e)e[n]&&(r+="; "+n,!0!==e[n]&&(r+="="+e[n].split(";")[0]));return r},eL=function(t,e,r,n){void 0===r&&(r="/"),void 0===n&&(n=new Date(Date.now()+864e5).toUTCString()),eF(t,e,{path:r,expires:n})},ex=function(t){return t&&t.cde?Object.assign({},l,{expires:t.cde}):l},eC=function(){var t=ej(a);if(t&&eq(t)){var e=eG(),r=window.location.hostname.split("."),n="."+r.slice(r.length-e-1).join(".");return null!=n?n:void 0}},eD=0,ek=0,eM=function(t){var e={};return document.cookie.split(";").forEach(function(t){var r=t.split("=");e[r[0].trim()]=r.slice(1).join("=")}),e[t]||""},ej=function(t){if(0===document.cookie.length)return"";var e=eM(t);return e?unescape(e):""},eF=function(t,e,r){try{if(r){var n=window.location.hostname.split(".");if(ek=n.length,(eD=eG())&&eD=3&&e.includes("tt")&&!isNaN(Number(e[2]))&&Number(e[2])>0},eG=function(){if(eD)return eD;var t=ej(a);return t&&eq(t)?Number(t.split(".")[2]):0},eH=function(t,e,r){var n;return t!==a||eq(e)||(e=(n=e)?n.split(".")[0]+".tt."+(tB()?0:eG()):""),document.cookie=t+"="+e+eA(r),e===ej(t)},eV=function(t,e,r){void 0===t&&(t=""),void 0===e&&(e="");try{var n=tX("tt_test_id",t,r);return n&&n!==e&&eL("tt_test_id",n,void 0,"session"),n||e}catch(t){return""}};function eB(){return(eB=Object.assign?Object.assign.bind():function(t){for(var e=1;e18e5?{sessionId:n.toString()+"::"+te(20),sessionCount:e+1,lastEventTS:n,isSessionStart:!0}:eB({},t,{lastEventTS:n,isSessionStart:!1})},eX=function(t){var e=t.sessionId,r=t.sessionCount,n=t.lastEventTS,o=t.hasReportedES;return e+"."+r+"."+n+"."+(null!=o?o:0)},eQ=function(t,e,r){var n=t.sessionId,o=t.sessionCount,i=t.isSessionStart;return Object.assign({csid:n,page_csid:e.sessionId,csct:o},i?{css:1}:{},r?{pixel_code:r}:{})},eZ=function(){function t(t){this.pixelCode="",this.loaded=!1,this.status=1,this.name="",this.advertiserID="",this.setupMode=0,this.partner="",this.reporterInfo={},this.plugins={},this.options={},this.rules=[],this.pixelCode=t}var e=t.prototype;return e.getParameterInfo=function(){return Promise.resolve({pixelCode:this.pixelCode,name:this.name,status:this.status,setupMode:this.setupMode,advertiserID:this.advertiserID,partner:this.partner,is_onsite:!1,advancedMatchingAvailableProperties:{}})},e.getReporterId=function(){return""},e.getReporterUniqueLoadId=function(){return""},e.getReporterPartner=function(){},e.getReporterInfo=function(){return{reporter:{}}},e.getReportResultSet=function(){return[]},e.isOnsite=function(){return!1},e.isPartnerReporter=function(){return!1},e.setAdvancedMatchingAvailableProperties=function(t){},e.clearHistory=function(){},e.page=function(t){},e.identify=function(t,e){},e.track=function(t,e,r){return Promise.resolve(null)},e.getUserInfo=function(t){return{}},e.getReporterMatchedUserFormatInfo=function(){return{}},e.getReporterMatchedUserFormatInfoV2=function(){return{}},e.assemblyData=function(){return{event:"",message_id:"",event_id:"",is_onsite:!1,properties:{},context:{ad:{},device:{},library:{name:"",version:""},page:{url:""},pageview_id:"",session_id:"",variation_id:"",user:{}},partner:"",timestamp:""}},e.assemblySelfHostData=function(){return this.assemblyData()},e.trackSync=function(){},e.getReportEventHistoryKey=function(t){return"tiktok"},e.hasReportEventHistory=function(t,e){return!1},e.getCookieBasedSession=function(){return eK()},e.setCookieBasedSession=function(t){},t}();new eZ("empty");var ez=function(){function t(t,e,r){this.initialize=!1,this.plugins=[],this.observers=[],this.reporters=[],this.context=t,this.reportService=e,r&&(this.emitter=r)}var e=t.prototype;return e.init=function(t,e){this.initContextInfo(t,e),this.initialize=!0},e.initContextInfo=function(t,e){var r=this;this.dispatch(cs.CONTEXT_INIT_START),this.initAdInfo(t,e),this.initAppInfo(t,e),this.initLocalServiceInfo(),this.reportService.pushPreposition(Promise.resolve().then(function(){return r.initUserInfo()})),this.initTestId(t,e),this.dispatch(cs.CONTEXT_INIT_END)},e.setPageIndex=function(t){},e.setPageInfo=function(t,e){var r=this.context.getPageInfo().url;if(r!==t){this.dispatch(cs.PAGE_URL_WILL_CHANGE,e||r,t);var n=this.context.setPageInfo(t,e||r);(null==n?void 0:n.pageIndex)&&this.setPageIndex(n.pageIndex),this.dispatch(cs.PAGE_URL_DID_CHANGE,t,r)}},e.initAdInfo=function(t,e){},e.initOffsiteAdInfo=function(t){},e.initAppInfo=function(t,e){},e.initUserInfo=function(){},e.initTestId=function(t,e){},e.usePlugin=function(t){try{if(!this.plugins.find(function(e){return e.name===t.name})){this.plugins.push(t);var e=t.name;e&&(this[e[0].toLowerCase()+e.slice(1)+"Plugin"]=t)}}catch(t){}},e.useObserver=function(t){try{if(!this.observers.find(function(e){return e.name===t.name})){this.observers.push(t);var e=t.name;e&&(this[""+(e[0].toLowerCase()+e.slice(1))]=t)}}catch(t){}},e.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})||null},e.getReporter=function(t){return this.reporters.find(function(e){return e.getReporterId()===t})},e.instance=function(t){var e=this.getReporter(t);return e||(A(a1.PIXEL_EMPTY,Error(""),{pixelCode:t}),new eZ(t))},e.instances=function(){return this.reporters},e.identify=function(t,e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:window.ttq._pf_tn||"identify_api_handler",functionName:window.ttq._pf_tn&&"identify_api_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="identify_api_handler")}}catch(t){}var n=th(t,e);this.context.setUserInfo(n);try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"identify_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},e.page=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var e={taskName:window.ttq._pf_tn||"page_api_handler",functionName:window.ttq._pf_tn&&"page_api_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="page_api_handler")}}catch(t){}t.url!==this.context.getPageInfo().url&&(this.setPageInfo(t.url,t.referrer),this.reporters.forEach(function(t){t.clearHistory()}));var r=Object.assign({},t);delete r.url,delete r.referrer,this.reporters.forEach(function(t){t.page(r)});try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e),"page_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},e.isOnsitePage=function(){return this.context.getSignalType()===cn.ONSITE||this.reporters.every(function(t){return t.isOnsite()})},e.track=function(t,e,r){void 0===e&&(e={}),void 0===r&&(r={});try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={taskName:window.ttq._pf_tn||"track_api_handler",functionName:window.ttq._pf_tn&&"track_api_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="track_api_handler")}}catch(t){}this.instances().forEach(function(n,o){n.track(t,e,Object.assign({_i:o},r))});try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),"track_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},e.dispatch=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function e0(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}ez=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],ez);var e1=(aR=e$().mark(function t(e,r){return e$().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===r&&(r=1),!(r>=0)){t.next=13;break}return t.prev=2,t.next=5,function(t){return new Promise(function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=t;var o=document.getElementsByTagName("script")[0];o&&o.parentNode?o.parentNode.insertBefore(n,o):r("none element"),n.onload=function(){e(!0)},n.onerror=r})}(e);case 5:return t.abrupt("return",Promise.resolve(!0));case 8:return t.prev=8,t.t0=t.catch(2),t.abrupt("return",e1.call(null,e,r-1));case 11:t.next=14;break;case 13:throw Error;case 14:case"end":return t.stop()}},t,null,[[2,8]])}),aS=function(){var t=this,e=arguments;return new Promise(function(r,n){var o=aR.apply(t,e);function i(t){e0(o,r,n,i,a,"next",t)}function a(t){e0(o,r,n,i,a,"throw",t)}i(void 0)})},function(t,e){return aS.apply(this,arguments)});(aN=ch||(ch={})).TRACK="track",aN.PERFORMANCE="performance",aN.INTERACTION="interaction",aN.PCM="PCM",aN.PERFORMANCE_INTERACTION="performance_interaction",aN.SELFHOST="selfhost",aN.AUTO_CONFIG="auto_config",aN.PAGE="Pf",aN.PAGE_PERFORMANCE="page_performance",aN.PAGE_INTERACTION="page_interaction";var e2=["EnrichAM"];(aP=cd||(cd={})).LDU="limited_data_use",aP.EVENTID="eventID",aP.EVENT_ID="event_id",(aA=cv||(cv={}))[aA.defaultReport=0]="defaultReport",aA[aA.httpReport=1]="httpReport",aA[aA.htmlHttpReport=2]="htmlHttpReport",(aL=c_||(c_={}))[aL.P0=0]="P0",aL[aL.P1=1]="P1",aL[aL.P2=2]="P2";var e3=["ttuts","ad_info_from"],e6="Pageview",e5=[],e4="EngagedSession",e8=["AED","ALL","AMD","ARS","AUD","AZN","BDT","BGN","BHD","BIF","BOB","BRL","BYN","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DOP","DZD","EGP","EUR","GBP","GEL","GTQ","HKD","HNL","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KHR","KRW","KWD","KZT","LBP","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","OMR","PAB","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","SAR","SEK","SGD","THB","TND","TRY","TWD","TZS","UAH","USD","UZS","VES","VND","ZAR"],e9=function(){function t(){this.subscriberMap=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map}var e=t.prototype;return e.on=function(t,e,r,n){try{n&&(n.emitterType=n.emitterType||t,this.emit(cc.UPDATE_CONFIG,n));var o=Object.assign({throttle:!1,debounce:!1,once:!1,interval:500},r),i=this.subscriberMap.get(t)||[];if(i.some(function(t){return t.originalCallback===e}))return;i.push({originalCallback:e,wrappedCallback:this.wrapCallback(e,o),options:o,observerConfig:n}),this.subscriberMap.set(t,i)}catch(e){A(a1.CUSTOM_ERROR,e,{custom_name:"EventEmitter",custom_enum:t})}},e.emit=function(t){for(var e=this,r=arguments.length,n=Array(r>1?r-1:0),o=1;o=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],e9);var e7=function(t,e){if("selfhost"===t&&e&&b(e))return"https://"+b(e)+"/api/v2/pixel";var r={track:e_,performance:eg,interaction:em,performance_interaction:ey,auto_config:eb,page_performance:eE,page_interaction:ew}[t];return r||null};function rt(){return(rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],rr);var rn={ViewForm:"ViewContent",ViewConsultationPage:"ViewContent",ViewDownloadPage:"ViewContent",Checkout:"PlaceAnOrder",Registration:"CompleteRegistration",AddBilling:"AddPaymentInfo",StartCheckout:"InitiateCheckout",ClickInDownloadPage:"ClickButton",ClickInConsultationPage:"ClickButton",ClickForm:"ClickButton",ClickToDownload:"Download",Consult:"Contact",ConsultByPhone:"Contact",CompletePayment:"Purchase",SubmitForm:"Lead"},ro=["event_experiment","dynamic_parameter_config","eb_version","eb_rule_id","tf","trigger_source"],ri=function(t){var e=t.getUserInfo().anonymous_id,r=ej(a);e!==r&&t.setUserInfoWithoutIdentifyPlugin({anonymous_id:r})},ra=function(t,e,r){try{var n=window.location.hostname.split(".");if(void 0!==cg&&cg=0;o--){var i="."+n.slice(o).join(".");if(document.cookie=t+"="+e+eA(Object.assign({},r,{domain:i})),ej(t)===e){cg=o;break}}}catch(t){}},rc=function(t,e,r){var n=eK();return e&&(n=eJ(e)),ra(t?u+"_"+t:u,eX(n),ex(r)),n};function rs(){return(rs=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],ru);var rl=function(t,e){return function(r,n){e(r,n,t)}},rp=function(t){function e(e,r,n,o,i){var a;return(a=t.call(this,e)||this).userInfoFieldAllowlist={},a.setSignalType(i||cn.OFFSITE),a.pageSign={sessionId:"",pageId:"",variationId:"",vids:"",pageIndex:{main:-1,sub:-1,index:-1}},a.legacy=n.legacy||[],a.variationId=n.variation_id||"",a.vids=n.vids||"",a.serverUniqueId=n.server_unqiue_id||"",a.ttqOptions=n,a.reportService=r,a.initPageSign(),tO(o)&&tN()&&(a.enableAdTracking=!1),a.data=function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(a),a}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rf(e,t);var r=e.prototype;return r.getSessionIdFromCache=function(){var t=null;try{t=JSON.parse(sessionStorage.getItem(c)||"")}catch(t){}return t},r.setSessionIdToCache=function(t){ed(c,t)},r.getVariationId=function(){return this.variationId},r.getVids=function(){return this.vids},r.isLegacyPixel=function(t){return I(t,this.legacy)},r.assignPageInfo=function(t){Object.assign(this.pageInfo,t)},r.getSessionIndex=function(){var t={main:-1,sub:-1,index:-1};try{var e=JSON.parse(sessionStorage.getItem(s)||"{}");if(e)return Object.assign({},t,e)}catch(t){}return t},r.setUserInfo=function(t,e){var r=this;if(void 0===t&&(t={}),0!==Object.keys(t).length){var n={};Object.entries(t).forEach(function(t){var o,i=t[0],a=t[1];if(a){if(tz()&&(r.userInfoFieldAllowlist[i]||(r.userInfoFieldAllowlist[i]=[]),e?r.userInfoFieldAllowlist[i].push(e):r.userInfoFieldAllowlist[i].push("all")),i===G)return void r.setUserInfoWithoutIdentifyPlugin(((o={})[G]=a,o));n[i]=String(a).trim()}});var o=m(),i=null==o?void 0:o.getPlugin("Identify");i&&this.reportService.pushPreposition(i.handleUserProperties(n,t).then(function(t){void 0===t&&(t={});try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var o,a={taskName:window.ttq._pf_tn||"identify_after_encryption",functionName:window.ttq._pf_tn&&"identify_after_encryption",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="identify_after_encryption")}}catch(t){}var c=t,s=c.userProperties,u=c.userDataFormat,f=c.userDataFormatV2;if(s){Object.assign(r.userInfo,s);var l=r.getUserFormatInfo()||{},p=r.getUserFormatInfoV2()||{},h=r.getSignalDiagnosticLabels()||{};r.setUserFormatInfo(Object.assign({},l,u)),r.setUserFormatInfoV2(Object.assign({},p,f)),r.setSignalDiagnosticLabels(Object.assign({},h,t.identifierLabel||{}));var d=Object.keys(r.userInfo);if(0===d.length||1===Object.keys(n).length&&Object.keys(n).includes("external_id"))return;var v=i.reporters[0];tz()&&(e?v=i.reporters.find(function(t){return t.getReporterId()===e}):(null==(o=String(d))?void 0:o.includes("auto_"))?d.map(function(t){v||(v=i.reporters.find(function(e){var r,n;return null==(n=null==(r=null==e?void 0:e.plugins)?void 0:r.AutoAdvancedMatching)?void 0:n[t]}))}):v=i.reporters.find(function(t){if(Object.keys(t.getUserInfo(a4.Manual)).length)return!0}));var _=v?Object.keys(Object.assign({},v.getUserInfo(a4.Manual),v.getUserInfo(a4.Auto),v.getUserInfo(a4.EBManual))):[];v&&_.length&&v.track("EnrichAM",{},{},ch.TRACK)}try{window.ttq&&window.ttq._ppf&&(a.end=performance.now(),window.ttq._ppf.push(a),"identify_after_encryption"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}}).catch(function(t){A(a1.API_ERROR,t,{extJSON:{api:"identify"}})}))}},r.initPageSign=function(){var t,e,r=this.getSessionIdFromCache();null===r&&(r=(t=this.serverUniqueId)?""+t+"::"+te(20):V("sessionId"),this.setSessionIdToCache(r));var n=this.getPageId((e=r)?e.split("::")[0]:""),o=this.getVariationId(),i=this.getSessionIndex(),a=eC();i.main++,this.pageSign={sessionId:r,pageId:n,variationId:o,pageIndex:i,etldPlusOne:a}},r.setPageCookieBasedSession=function(e){var r=rc("",e,this.ttqOptions);t.prototype.setPageCookieBasedSession.call(this,r)},e}(ru);function rh(t,e){return(rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}rp=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),rl(0,ef(tE.WebLibraryInfo)),rl(1,ef(t$.REPORT_SERVICE)),rl(2,ef(t$.TTQ_GLOBAL_OPTIONS)),rl(3,ef(t$.ENV)),rl(3,el()),rl(4,ef(tE.SignalType)),rl(4,el())],rp);var rd=function(t){function e(e){var r,n,o=e.id,i=e.type,a=e.isOnsitePage,c=e.context,s=e.reporterInfo,u=e.ttqOptions,f=e.reportService,l=e.plugins,p=e.rules,h=e.options;return(n=t.call(this,c,f)||this).ttp="",n.loaded=!1,n.id=o,n.pixelCode=o,n.type=i,n.isOnsitePage=a,n.options=(void 0===h?{}:h)||{},n.plugins=(void 0===l?{}:l)||{},n.rules=(void 0===p?[]:p)||[],n.reporterInfo=Object.assign(s||{},((r={})[i]=o,r)),n.ttp=u.ttp||"",n.currency_list=u.currency_list||null,n.ttqPartner=u.partner||"",n.selfHostConfig=u.self_host_config||{},n.ttqOptions=u,n.pixelPromise=n.getInstance(),n}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rh(e,t);var r=e.prototype;return r.identify=function(t,e){var r=th(t,e);this.context.setUserInfo(r,this.id)},r.getReporterId=function(){return this.id||""},r.getReporterUniqueLoadId=function(){return this.reporterInfo.loadId+"-"+this.getReporterId()},r.getReporterPartner=function(){var t;return(null==(t=this.reporterInfo)?void 0:t.partner)||""},r.setPixelInfo=function(t,e,r){var n,o=this.type;this.reporterInfo=Object.assign(this.reporterInfo,Object.assign({},t),((n={})[o]=this.getReporterId(),n)),e&&(this.rules=e),r&&(this.plugins=r)},r.getInstance=function(){return Promise.resolve(this)},r.getReporterInfo=function(){return this.reporterInfo.pixelCode?t.prototype.getReporterInfo.call(this):{shop_id:this.reporterInfo.shopId,eventSourceId:this.reporterInfo.eventSourceId}},r.getUserInfo=function(t){var e=this.context.getUserInfo(),r=ta(e,Object.assign({},this.advancedMatchingAvailableProperties));switch(t){case a4.Manual:return ta(this.isPartnerReporter()?r:e,{external_id:!0,email:!0,phone_number:!0,ttoclid:!0});case a4.ManualV2:return ta(this.isPartnerReporter()?r:e,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0,ttoclid:!0});case a4.EBManual:return ta(e,{eb_email:!0,eb_phone_number:!0});case a4.Auto:var n=ta(r,{external_id:!0,auto_email:!0,auto_phone_number:!0,ttoclid:!0});return Object.assign(n,(n.auto_email||n.auto_phone_number)&&e.auto_trigger_type?{auto_trigger_type:e.auto_trigger_type}:{});default:return r}},r.getReporterMatchedUserFormatInfo=function(){var t=this.context.getUserFormatInfo(),e=to(t,this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),r=ta(t,{auto_email:!0,auto_phone_number:!0});return Object.keys(r).length>0&&(e.identity_params||(e.identity_params={}),Object.assign(e.identity_params,r)),e},r.getReporterMatchedUserFormatInfoV2=function(){return tn(this.context.getUserFormatInfoV2(),this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0,first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0})},r.isOnsite=function(){var t;return!!(null==(t=this.reporterInfo)?void 0:t.is_onsite)},r.isPartnerReporter=function(){var t=this.getReporterPartner();return!!(t&&"None"!==t)},r.getSignalDiagnosticLabels=function(){var t=this.context.getSignalDiagnosticLabels();if(!t)return Object.assign({},F);var e=this.advancedMatchingAvailableProperties,r=e.email,n=e.phone_number,o=e.auto_email,i=e.auto_phone_number;return Object.assign({},F,ta(t,{raw_email:r=!this.isPartnerReporter()||r,raw_phone:n=!this.isPartnerReporter()||n,hashed_email:r,hashed_phone:n,raw_auto_email:o,raw_auto_phone:i,raw_eb_email:!0,raw_eb_phone:!0}))},r.setCookieBasedSession=function(t){t&&(this.session=t)},r.convertCookieBasedSession=function(t){return eY(this.reporterInfo,this.ttqOptions)&&t!==ch.AUTO_CONFIG?eQ(this.getCookieBasedSession(),this.context.getPageCookieBasedSession()):{}},r.assemblyData=function(e,r,n,o,i){void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=ch.TRACK);var a,c,s=t.prototype.assemblyData.call(this,e,r,n,o,i);s.is_onsite=this.isOnsitePage.value;var u=O(e)||this.ttqPartner;u&&(s.partner=u),s.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var f=w();f&&(s.context.userAgent=f);var l=function(){try{var t=document.readyState;if("loading"==t)return cu.LOADING;if("interactive"==t)return cu.INTERACTIVE;if("complete"==t)return cu.COMPLETE;return cu.UNKNOWN}catch(t){return cu.UNKNOWN}}();if(l&&(s.context.page.load_progress=l),tz()&&this.context instanceof rp&&this.context.userInfoFieldAllowlist){var p=Object.entries(this.context.userInfoFieldAllowlist).filter(function(t){var r=t[1];return -1===r.indexOf("all")&&-1==r.indexOf(e)}).map(function(t){return t[0]});s.context.user=ti(s.context.user,p)}return a=s.properties,void 0===(c=s._inspection)&&(c={}),ro.forEach(function(t){a.hasOwnProperty(t)&&(c[t]=a[t],delete a[t])}),s._inspection=c,i!==ch.PAGE&&(s._inspection.ppf=S()),s._inspection.vids=this.context.getVids(),s.context.ad.sdk_env=tw(),s.context.ad.jsb_status=function(){try{var t,e;return[a2.INVOKE_METHOD_ENABLED,a2.INVOKE_METHOD_NOT_ENABLED][[!!(null!=(t=window)&&null!=(e=t.ToutiaoJSBridge)&&e.invokeMethod),!0].findIndex(function(t){return t})]}catch(t){return a2.NOT_SURE}}(),i!==ch.INTERACTION&&i!==ch.PERFORMANCE&&i!==ch.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(s.context.user={},s.context.ad=this.context.getOffsiteAdInfo(),s.context.ad=ti(s.context.ad,e3)),s},r.page=function(t){void 0===t&&(t={});var e=tQ().url;e!==this.currentHref&&(this.currentHref=e,this.track(e6,t,{}))},r.track=function(e,r,n,o,i){var a=this;void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o=ch.TRACK),void 0===i&&(i=cv.defaultReport);var c=function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var c={taskName:window.ttq._pf_tn||"track_after_reporter_init",functionName:window.ttq._pf_tn&&"track_after_reporter_init",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="track_after_reporter_init")}}catch(t){}var s=a.getReporterId();if(e2.includes(e))return t.prototype.track.call(a,e,r,n,o,i);var u=Object.assign({},n);a.selfHostConfig[s]&&!n.eventID&&(u=Object.assign({},u,{eventID:B(V("default_eventId"),s)}));try{window.ttq&&window.ttq._ppf&&(c.end=performance.now(),window.ttq._ppf.push(c),"track_after_reporter_init"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}return t.prototype.track.call(a,e,r,u,o,i)};return this.loaded?c():this.getInstance().then(c)},r.getEventType=function(t){return rn[t]||t},r.trackSync=function(e,r,n,o,i,a,c){if(void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=ch.TRACK),void 0===a&&(a=cv.defaultReport),"track"===i&&P(a1.PIXEL_SEND,{pixelCode:e,extJSON:{event:r}}),i!==ch.TRACK)return void t.prototype.trackSync.call(this,e,r,n,o,i,a,c);n&&"string"==typeof n.currency&&(n.currency=n.currency.toUpperCase());var s,u=this.context.getTestID();if(u){var f=this.assemblyData(e,r,n,o);return f.tt_test_id=u,f.context.ad={},null==(s=this===null||void 0===this?void 0:this.reportService)||s.report(c||e_,f,cv.htmlHttpReport,c_.P0),f}if(n&&"object"==typeof n){var l,p=n,h=p.value,d=p.currency;void 0===h||!isNaN(h)&&h>=0||P(a1.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:r,value:h,currency:d}}),void 0===d||(void 0===(l=this.currency_list)&&(l=null),(l||e8).includes(d))||P(a1.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:r,value:h,currency:d}})}return t.prototype.trackSync.call(this,e,r,n,o,i,a,c)},r.trackPostTask=function(t){var e=t.reporterId,r=t.eventType,n=t.properties,o=t.eventConfig;e2.includes(r)||this.selfHostConfig[e]&&!this.hasReportEventHistory(r,cv.htmlHttpReport)&&(this.pushReport(r,this.getReportEventHistoryKey(cv.htmlHttpReport)),this.trackSync(e,r,n,o,ch.SELFHOST,cv.htmlHttpReport))},r.getReportEventHistoryKey=function(t){return t===cv.htmlHttpReport?this.selfHostConfig[this.getReporterId()]:"tiktok"},r.assemblySelfHostData=function(t,e,r,n,o){void 0===r&&(r={}),void 0===n&&(n={});var i=this.assemblyData(t,e,r,n,o),a=this.ttp;return a&&(i.context.user.ttp=a),i},e}(rr);function rv(t,e){return(rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var r_=function(t,e){return function(r,n){e(r,n,t)}},rg=function(t){function e(e,r,n,o,i,a,c,s,u,f){return t.call(this,{id:e,type:r,isOnsitePage:n,context:o,reporterInfo:i,ttqOptions:a,reportService:c,plugins:s,rules:u,options:f})||this}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rv(e,t);var r=e.prototype;return r.getInstance=function(){var t,e=this;if(this.pixelPromise)return this.pixelPromise;var r=(t=this.id,tY()[t]||{});return E()||r&&r.info?(this.loaded=!0,this.pixelPromise=Promise.resolve(this)):(this.pixelPromise=new Promise(function(t,r){var n,o,i=tZ();e1((n=e.id,o=(null==i?void 0:i.hostname)||"",(tP()?"/static/config.js":"https://analytics.tiktok.com/i18n/pixel/config.js")+"?sdkid="+n+"&hostname="+o)).then(function(){e.loaded=!0,t(e)}).catch(function(t){e.pixelPromise=null,r(t)})}),this.pixelPromise)},r.setCookieBasedSession=function(e){var r=rc(this.pixelCode,e,this.ttqOptions);t.prototype.setCookieBasedSession.call(this,r)},r.track=function(e,r,n,o,i){if(void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o=ch.TRACK),void 0===i&&(i=cv.defaultReport),n&&n.pixel_code&&this.getReporterId()!==n.pixel_code)return Promise.resolve(null);if(eY(this.reporterInfo,this.ttqOptions)){var a=eW(document.cookie);this.setCookieBasedSession(a[this.getReporterId()]),this.context.setPageCookieBasedSession(a[""])}return t.prototype.track.call(this,e,r,n,o,i)},e}(rd);function rm(t,e){return(rm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ry=function(t){function e(){return t.apply(this,arguments)||this}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rm(e,t);var r=e.prototype;return r.getInstance=function(){return this.pixelPromise=Promise.resolve(this),this.pixelPromise},r.track=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),tW(this.getReporterId(),"track",[t,e,r]),Promise.resolve(null)},e}(rg=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),r_(0,ef(tE.ID)),r_(1,ef(tE.Type)),r_(2,ef(tE.IsOnsitePage)),r_(3,ef(t$.CONTEXT)),r_(4,ef(tE.Info)),r_(5,ef(t$.TTQ_GLOBAL_OPTIONS)),r_(6,ef(t$.REPORT_SERVICE)),r_(7,ef(tE.Plugins)),r_(7,el()),r_(8,ef(tE.Rules)),r_(8,el()),r_(9,ef(tE.Options)),r_(9,el())],rg));function rE(){rE=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function rw(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function rb(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){rw(i,n,o,a,c,"next",t)}function c(t){rw(i,n,o,a,c,"throw",t)}a(void 0)})}}function rI(t,e){return(rI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var rO=function(t,e){return function(r,n){e(r,n,t)}},rT=function(t){function e(e,r,n,o,i,a,c,s,u,f,l,p,h,d,v,_,g,m,y,E,w,b,I,O){(T=t.call(this,e,i,u)||this).context=e,T.env=s,T.reporters=r,T.cookieService=a,T.reportService=i,T.consentService=c,T.adService=n,T.appService=o,T.eventEmitter=u,T.historyObserver=b,T.interactionObserver=I,T.autoAdvancedMatchingPlugin=l,T.callbackPlugin=p,T.identifyPlugin=h,T.monitorPlugin=f,T.shopifyPlugin=d,T.autoConfigPlugin=v,T.diagnosticsConsolePlugin=_,T.pangleCookieMatchingPlugin=g,T.eventBuilderPlugin=m,T.pagedataPlugin=w,T.enrichIpv6Plugin=y,T.lpvPlugin=E,T.runtimeMeasurementPlugin=O,T.eventEmitter=u,T.historyObserver&&T.useObserver(T.historyObserver),T.interactionObserver&&T.useObserver(T.interactionObserver),T.autoAdvancedMatchingPlugin&&T.usePlugin(T.autoAdvancedMatchingPlugin),T.callbackPlugin&&T.usePlugin(T.callbackPlugin),T.identifyPlugin&&T.usePlugin(T.identifyPlugin),T.monitorPlugin&&T.usePlugin(T.monitorPlugin),T.shopifyPlugin&&T.usePlugin(T.shopifyPlugin),T.autoConfigPlugin&&T.usePlugin(T.autoConfigPlugin),T.diagnosticsConsolePlugin&&T.usePlugin(T.diagnosticsConsolePlugin),T.pangleCookieMatchingPlugin&&T.usePlugin(T.pangleCookieMatchingPlugin),T.eventBuilderPlugin&&T.usePlugin(T.eventBuilderPlugin),T.enrichIpv6Plugin&&T.usePlugin(T.enrichIpv6Plugin),T.lpvPlugin&&T.usePlugin(T.lpvPlugin),T.runtimeMeasurementPlugin&&T.usePlugin(T.runtimeMeasurementPlugin),T.monitorPlugin&&(N.info.forEach(function(t){var e;null==(e=T.monitorPlugin)||e.info(t.event,t.detail,t.withoutJSB)}),N.error.forEach(function(t){var e;null==(e=T.monitorPlugin)||e.error(t.event,t.err,t.detail,t.withoutJSB)}),N.info=[],N.error=[]),T.dispatch(cs.INIT_START),T.pagedataPlugin&&T.usePlugin(T.pagedataPlugin),T.onPageLoaded(),T.onPageLeave();var T,R=tQ(),S=R.url,P=R.referrer;return T.init(S,P),T.setPageInfo(S,P),T.dispatch(cs.INIT_END),T}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rI(e,t);var r,i=e.prototype;return i.initAdInfo=function(t,e){this.dispatch(cs.BEFORE_AD_INFO_INIT_START);var r=ep(n);if(r)return void this.initAdCache(r);if(tq()){var o=eS(t,e);o&&(o.creative_id&&o.log_extra||o.callback)&&(this.dispatch(cs.AD_INFO_INIT_START),ed(n,o),this.setAdInfo(o),this.initOffsiteAdInfo(o));return}this.initBaseAdInfo(t,e)},i.initAdCache=function(t){this.dispatch(cs.AD_INFO_INIT_START),t.ad_info_from="cache",t.ad_info_status="fulfilled(cache)",this.setAdInfo(t),this.initOffsiteAdInfo(t)},i.initBaseAdInfo=function(t,e){var r=this;this.adService.webBridgeService.jsbridge&&this.dispatch(cs.AD_INFO_INIT_START),this.reportService.pushPreposition(rb(rE().mark(function n(){var o;return rE().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,r.adService.getAdInfo(t,e);case 3:o=n.sent,r.context.setAdInfo(o),r.initOffsiteAdInfo(o),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),A(a1.INIT_ERROR,n.t0,{extJSON:{position:"initAdInfo"}});case 11:case"end":return n.stop()}},n,null,[[0,8]])}))())},i.initOffsiteAdInfo=function(t){var e=eP(t,function(t){A(a1.INIT_ERROR,t,{extJSON:{position:"handleAdInfoOfficial"}})});this.context.setOffsiteAdInfo(e);var r=eN(t,this.env);this.context.setEnableAdTracking(r),this.dispatch(cs.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:r}})},i.initAppInfo=function(t,e){var r=this,n=ep(o);if(n)return void this.context.setAppInfo(n);this.reportService.pushPreposition(rb(rE().mark(function n(){var o;return rE().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.initBaseAppInfo(t,e);case 2:return o=n.sent,n.abrupt("return",o);case 4:case"end":return n.stop()}},n)}))())},r=rb(rE().mark(function t(e,r){var n;return rE().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appService.getAppInfo(e,r);case 2:return n=t.sent,this.context.setAppInfo(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)})),i.initBaseAppInfo=function(t,e){return r.apply(this,arguments)},i.initTestId=function(t,e){if(!this.context.getTestID()){var r=eV(t,ej("tt_test_id"),e);this.context.setTestID(r)}},i.initUserInfo=function(){this.setCookieInfo()},i.initLocalServiceInfo=function(){var t,e,r=ep(p);if(r)return void this.context.setUserInfoWithoutIdentifyPlugin(((t={})[p]=r,t));var n=tQ(),o=n.url,i=n.referrer,a=tX(h[location.hostname]?h[location.hostname]:p,o,i);a&&(ed(p,a),this.context.setUserInfoWithoutIdentifyPlugin(((e={})[p]=a,e)))},i.setPageIndex=function(t){t&&eU(t)},i.instance=function(t){this.beforeAPIExecution();var e=this.getReporter(t);return e||new ry(t,co.PIXEL_CODE,{value:!1},this.context,{pixelCode:t},{},{})},i.instances=function(){return this.beforeAPIExecution(),this.reporters},i.page=function(e){this.beforeAPIExecution();var r=tQ(),n=r.url,o=r.referrer;t.prototype.page.call(this,Object.assign({url:(null==e?void 0:e.page)||n,referrer:(null==e?void 0:e.referrer)||o},e))},i.track=function(e,r,n){void 0===r&&(r={}),void 0===n&&(n={});try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var o={taskName:window.ttq._pf_tn,functionName:"web_track_handler",start:performance.now()}}catch(t){}this.beforeAPIExecution();var i=n.pixel_code;if(void 0===i&&t.prototype.track.call(this,e,r,n),void 0!==i){var a=this.instance(i);a instanceof ry||a.track(e,r,n)}try{window.ttq&&window.ttq._ppf&&(o.end=performance.now(),window.ttq._ppf.push(o))}catch(t){}},i.identify=function(e,r){this.beforeAPIExecution(),t.prototype.identify.call(this,e,r)},i.setAdInfo=function(t){this.context.setAdInfo(t)},i.enableFirstPartyCookie=function(t){this.cookieService.enableFirstPartyCookie(t),t&&this.setCookieInfo()},i.enableCookie=function(){this.cookieService.enableFirstPartyCookie(!0),this.setCookieInfo(),this.cookieService.enableCookie()},i.disableCookie=function(){this.cookieService.disableCookie(),this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:void 0}),this.disablePangleCookie()},i.holdConsent=function(){this.consentService.setConsentMode(ce.HOLD)},i.revokeConsent=function(){this.consentService.setConsentMode(ce.REVOKE)},i.grantConsent=function(){this.consentService.setConsentMode(ce.GRANT)},i.disablePangleCookie=function(){this.pangleCookieMatchingPlugin&&this.pangleCookieMatchingPlugin.disablePangleCookie()},i.setAnonymousId=function(t){this.cookieService.setAnonymousId(t),this.initUserInfo()},i.resetCookieExpires=function(){this.cookieService.resetExpires()},i.setCookieInfo=function(){if(this.cookieService.canUseCookie()){var t=this.cookieService.getAnonymousId();t&&this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:t})}},i.onPageLoaded=function(){var t=this;window.addEventListener("load",function(){t.dispatch(cs.PAGE_DID_LOAD)},{once:!0})},i.onPageLeave=function(){var t=this,e=tt(function(){var e=Date.now();t.dispatch(cs.PAGE_WILL_LEAVE,e),t.consentService.updateCache()});document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()}),"onpagehide"in window&&window.addEventListener("pagehide",function(){e()}),window.addEventListener("beforeunload",function(){return e},{once:!0})},i.beforeAPIExecution=function(){try{var t,e;t=this.context,tQ().url===t.getPageInfo().url||this.setPageInfo(tQ().url),e=this.context,ej(a)===e.getUserInfo().anonymous_id||ri(this.context)}catch(t){A(a1.API_ERROR,t,{extJSON:{position:"beforeAPIExecution"}})}},i.loadPixel=function(t,e){if(t){if(this.reporters.find(function(e){return e.getReporterId()===t}))return void L(cl.DUPLICATE_PIXEL_CODE);m().load(t,e||{})}},e}(ez),rR=rT=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),rO(0,ef(t$.CONTEXT)),rO(1,ef(t$.TTQ_REPORTERS)),rO(2,ef(t$.AD_SERVICE)),rO(3,ef(t$.APP_SERVICE)),rO(4,ef(t$.REPORT_SERVICE)),rO(5,ef(t$.COOKIE_SERVICE)),rO(6,ef(t$.CONSENT_SERVICE)),rO(7,ef(t$.ENV)),rO(8,ef(t$.EVENT_EMITTER)),rO(9,ef(t$.MONITOR_PLUGIN)),rO(9,el()),rO(10,ef(t$.AUTO_ADVANCED_MATCHING_PLUGIN)),rO(10,el()),rO(11,ef(t$.CALLBACK_PLUGIN)),rO(11,el()),rO(12,ef(t$.IDENTIFY_PLUGIN)),rO(12,el()),rO(13,ef(t$.SHOPIFY_PLUGIN)),rO(13,el()),rO(14,ef(t$.AUTO_CONFIG_PLUGIN)),rO(14,el()),rO(15,ef(t$.DIAGNOSTICS_CONSOLE_PLUGIN)),rO(15,el()),rO(16,ef(t$.PANGLE_COOKIE_MATCHING_PLUGIN)),rO(16,el()),rO(17,ef(t$.EVENT_BUILDER_PLUGIN)),rO(17,el()),rO(18,ef(t$.ENRICH_IPV6_PLUGIN)),rO(18,el()),rO(19,ef(t$.LPV_PLUGIN)),rO(19,el()),rO(20,ef(t$.PAGEDATA_PLUGIN)),rO(20,el()),rO(21,ef(t$.HISTORY_OBSERVER)),rO(21,el()),rO(22,ef(t$.INTERACTION_OBSERVER)),rO(22,el()),rO(23,ef(t$.RUNTIME_MEASUREMENT_PLUGIN)),rO(23,el())],rT),rS=String.fromCharCode.bind(String),rN=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),rP=function(t){for(var e,r,n,o,i="",a=t.length%3,c=0;c255||(n=t.charCodeAt(c++))>255||(o=t.charCodeAt(c++))>255)throw TypeError("invalid character found");i+=rN[(e=r<<16|n<<8|o)>>18&63]+rN[e>>12&63]+rN[e>>6&63]+rN[63&e]}return a?i.slice(0,a-3)+"===".substring(a):i},rA=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?rS(192|e>>>6)+rS(128|63&e):rS(224|e>>>12&15)+rS(128|e>>>6&63)+rS(128|63&e)}var r=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return rS(240|r>>>18&7)+rS(128|r>>>12&63)+rS(128|r>>>6&63)+rS(128|63&r)},rL=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rx=function(t){return rP(JSON.stringify(t).replace(rL,rA)).replace(/=/g,"").replace(/[+\/]/g,function(t){return"+"===t?"-":"_"})};function rC(){rC=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function rD(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}var rk=function(){function t(t,e,r){this.httpService=t,this.bridgeService=e,this.reportPreTasks=r}var e,r,n=t.prototype;return n.pushPreposition=function(t){this.reportPreTasks.push(t)},e=rC().mark(function t(e,r,n,o){return rC().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve());case 1:case"end":return t.stop()}},t)}),r=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(t){rD(i,n,o,a,c,"next",t)}function c(t){rD(i,n,o,a,c,"throw",t)}a(void 0)})},n.report=function(t,e,n,o){return r.apply(this,arguments)},t}();rk=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],rk);var rM=function(t,e){var r=new URL(t);return Object.keys(e).forEach(function(t){var n=e[t].toJSON?e[t].toJSON():String(e[t]);r.searchParams.set(t,n)}),r.toString()},rj=function(t){var e=Array(t.length),r=0;return new Promise(function(n,o){for(var i=function(o){var i=t[o];i&&"function"==typeof i.then?i.then(function(i){e[o]={status:"fulfilled",value:i},++r===t.length&&n(e)}).catch(function(i){e[o]={status:"rejected",reason:i},++r===t.length&&n(e)}):(e[o]={status:"fulfilled",value:i},++r===t.length&&n(e))},a=0;a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function rq(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function rG(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){rq(i,n,o,a,c,"next",t)}function c(t){rq(i,n,o,a,c,"throw",t)}a(void 0)})}}function rH(t,e){return(rH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var rV=function(t,e){return function(r,n){e(r,n,t)}},rB=function(t){function e(e,r,n,o){var i;return(i=t.call(this,e,r,new rF)||this).supportSendAnalyticsEvent=!0,i.consentService=n,i.consentService.on(ca.QUEUE,function(t){t.forEach(function(t){var e=t.url,r=t.data,n=t.type;i.report(e,r,n,c_.P0)})}),i.env=o,i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,rH(e,t);var r,n,o,i=e.prototype;return r=rG(rU().mark(function t(e,r,n){var o,i,a,c,s,u,f;return rU().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.bridgeService.jsbridge){t.next=2;break}return t.abrupt("return");case 2:return u=!!(s=r).context&&(null==(i=null==(o=s.context)?void 0:o.ad)?void 0:i.ad_info_status)==="timeout",f={},t.prev=5,t.next=8,this.bridgeService.send(s,u);case 8:if(!(!(f=t.sent)||1!==f.code)){t.next=11;break}throw Error("[fetch bridge] sendLog error: code "+(f&&f.code)+", data: "+(f&&JSON.stringify(f)));case 11:return Q(s.event)&&P(a1.JSB_SEND,{pixelCode:null==(a=s.context.pixel)?void 0:a.code,app_name:tx()?"ultralite":"",extJSON:{event:s.event,event_id:s.event_id,need_inject_ad_info:u}}),t.abrupt("return",f);case 15:t.prev=15,t.t0=t.catch(5),Q(s.event)&&A(a1.JSB_ERROR,t.t0,{pixelCode:null==(c=s.context.pixel)?void 0:c.code,custom_name:"sendReportData",custom_enum:f&&f.code?""+f.code:"non",app_name:tj()||"",extJSON:{position:"sendReportData"}}),tx()&&tS()&&this.sendHttpReport(e,s,n);case 19:case"end":return t.stop()}},t,this,[[5,15]])})),i.send=function(t,e,n){return r.apply(this,arguments)},n=rG(rU().mark(function t(e,r,n,o,i){var a;return rU().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===o&&(o=!0),t.next=3,this.httpService.send(e,r,i);case 3:t.sent||this.httpService.sendByImage(e,{analytics_message:n}),o&&P(a1.HTTP_SEND,{pixelCode:null==(a=r.context.pixel)?void 0:a.code,extJSON:{event:r.event,event_id:r.event_id}});case 6:case"end":return t.stop()}},t,this)})),i.sendHttpReport=function(t,e,r,o,i){return n.apply(this,arguments)},i.beforeReport=function(t,e,r){void 0===r&&(r=cv.defaultReport);var n=this.consentService.getConsentMode();return n!==ce.REVOKE&&(n!==ce.HOLD||(this.consentService.cacheReportTask(t,e,r),!1))},o=rG(rU().mark(function t(e,r,n,o){var i,a,c,s;return rU().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===n&&(n=cv.defaultReport),void 0===o&&(o=c_.P0),o===c_.P0){t.next=8;break}return t.next=5,ts(0);case 5:return t.next=7,this.report(e,r,n,c_.P0);case 7:case 15:return t.abrupt("return",t.sent);case 8:if(this.beforeReport(e,r,n)){t.next=11;break}return t.abrupt("return");case 11:if(i=rx(r),!(n===cv.defaultReport&&this.bridgeService.jsbridge)){t.next=16;break}return t.next=15,this.send(e,r,i);case 16:if(!(n===cv.httpReport&&this.bridgeService.jsbridge&&tO(this.env)&&!tL()&&this.supportSendAnalyticsEvent)){t.next=35;break}return a=e,t.prev=18,a=new URL(e).pathname,t.next=22,this.bridgeService.sendAnalyticsEvent({path:a,method:"POST",data:r});case 22:if(s=Error("sendAnalyticsEvent not support: code "+(c=t.sent)+", path: "+a+", data: "+JSON.stringify(r)),null!=c&&-2!==c){t.next=27;break}throw this.supportSendAnalyticsEvent=!1,s;case 27:if(1!==c){t.next=29;break}return t.abrupt("return");case 29:throw s;case 32:t.prev=32,t.t0=t.catch(18),A(a1.CUSTOM_ERROR,t.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 35:this.sendHttpReport(e,r,i,!!(Q(r.event)&&$(r)),r.action?3:void 0);case 36:case"end":return t.stop()}},t,this,[[18,32]])})),i.report=function(t,e,r,n){return o.apply(this,arguments)},i.reportFL=function(t){this.bridgeService.jsbridge&&this.bridgeService.updateWebFlData(t)},e}(rk);function rY(){rY=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function rK(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}rB=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),rV(0,ef(t$.HTTP_SERVICE)),rV(1,ef(t$.BRIDGE_SERVICE)),rV(2,ef(t$.CONSENT_SERVICE)),rV(3,ef(t$.ENV)),rV(3,el())],rB);var rW=function(){function t(t){this.webBridgeService=t}var e,r,o=t.prototype;return e=rY().mark(function t(e,r){var o,i,a;return rY().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.getAdInfoFromURL(e,r),!this.webBridgeService.jsbridge){t.next=7;break}return t.next=4,this.webBridgeService.getAdInfo();case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0={};case 8:return i=t.t0,(a=Object.assign({},o,i))&&(a.creative_id&&a.log_extra||a.callback)&&ed(n,a),t.abrupt("return",a);case 12:case"end":return t.stop()}},t,this)}),r=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(t){rK(i,n,o,a,c,"next",t)}function c(t){rK(i,n,o,a,c,"throw",t)}a(void 0)})},o.getAdInfo=function(t,e){return r.apply(this,arguments)},o.getAdInfoFromURL=function(t,e){return eS(t,e)},t}();function rJ(){rJ=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function rX(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}rW=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),(aC=ef(t$.BRIDGE_SERVICE),function(t,e){aC(t,e,0)})],rW);var rQ=function(){function t(t){this.webBridgeService=t}var e,r,n=t.prototype;return e=rJ().mark(function t(e,r){var n,i,a,c;return rJ().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getAppInfoFromURL(e,r)).platform=tT(),!tS()){t.next=10;break}return t.next=5,tR();case 5:a=(i=t.sent).model,c=i.platformVersion,n.device_model=a,n.android_version=c;case 10:return"{}"!==JSON.stringify(n)&&ed(o,n),t.abrupt("return",n);case 12:case"end":return t.stop()}},t,this)}),r=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(t){rX(i,n,o,a,c,"next",t)}function c(t){rX(i,n,o,a,c,"throw",t)}a(void 0)})},n.getAppInfo=function(t,e){return r.apply(this,arguments)},n.getAppInfoFromURL=function(t,e){try{var r=tX(eR,t,e),n=r&&JSON.parse(r),o=n.device_id,i=n.uid;return{device_id:o,user_id:i}}catch(t){return{}}},t}();rQ=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),(aD=ef(t$.BRIDGE_SERVICE),function(t,e){aD(t,e,0)})],rQ);var rZ="ad_analytics_msg";function rz(){rz=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function r$(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function r0(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){r$(i,n,o,a,c,"next",t)}function c(t){r$(i,n,o,a,c,"throw",t)}a(void 0)})}}var r1=function(t,e){return function(r,n){e(r,n,t)}},r2=function(){function t(t,e){this.env=t,tI(this.env)&&(this.jsbridge=e),this.bridgeTimeout=400}var e,r,n,o,i,a,c,s=t.prototype;return e=r0(rz().mark(function t(){var e=this;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jsbridge){t.next=3;break}return A(a1.JSB_ERROR,Error("tt bridge error when getting ad info"),{extJSON:{position:"getAdInfo"}}),t.abrupt("return",Promise.resolve({}));case 3:return t.abrupt("return",new Promise(function(){var t=r0(rz().mark(function t(r){var n;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.callAdInfo();case 3:(n=t.sent).ad_info_from="jsb",n.ad_info_status=n.ad_info_status||"fulfilled",r(n),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),r({}),A(a1.JSB_ERROR,t.t0,{extJSON:{position:"getAdInfo"}});case 13:case"end":return t.stop()}},t,null,[[0,9]])}));return function(e){return t.apply(this,arguments)}}()));case 4:case"end":return t.stop()}},t,this)})),s.getAdInfo=function(){return e.apply(this,arguments)},r=r0(rz().mark(function t(){var e,r;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.call("adInfo",{},tA()?3500:5e3);case 3:if((e=t.sent).data){t.next=6;break}return t.abrupt("return",Promise.reject("adInfo no data"));case 6:return r={creative_id:e.data.cid,log_extra:e.data.log_extra},t.abrupt("return",r);case 10:if(t.prev=10,t.t0=t.catch(0),"JSBRIDGE TIMEOUT"!==t.t0){t.next=17;break}return P(a1.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),t.abrupt("return",{ad_info_status:"timeout"});case 17:return A(a1.JSB_ERROR,t.t0,{extJSON:{position:"getAdInfo"}}),t.abrupt("return",{});case 19:case"end":return t.stop()}},t,this,[[0,10]])})),s.callAdInfo=function(){return r.apply(this,arguments)},n=r0(rz().mark(function t(){return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve({}));case 1:case"end":return t.stop()}},t)})),s.getAppInfo=function(){return n.apply(this,arguments)},o=r0(rz().mark(function t(e,r){var n,o,i,a,c,s,u,f,l,p,h,d;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jsbridge){t.next=2;break}return t.abrupt("return",Promise.resolve());case 2:return i=(null==(o=null==(n=null==e?void 0:e.context)?void 0:n.ad)?void 0:o.creative_id)||"0",a=rx(e),c=Z(e)?"insight_log_monitor":"insight_log",s={analytics_message:a,trackLogData:JSON.stringify(e),category:"ad_analytics_msg",tag:rZ,label:c},tL()&&(s.is_ad_event=1),l={eventName:rZ,labelName:c,value:i,extValue:"0",extJson:s},"insight_log_monitor"===c&&tV(new Set([a0.MUSICAL_LY,a0.TRILL,a0.ULTRALITE]))?(f="x.reportAppLog",p={eventName:"insight_log_monitor",params:s},u=this.call("x.reportAppLog",p,this.bridgeTimeout)):tq()||Z(e)?(f="sendLog",u=this.call("sendLog",l,this.bridgeTimeout)):tO(this.env)?tN()&&r?(h={eventName:c,params:s},f="sendLogWithAdInfo",u=this.call("sendLogWithAdInfo",h,this.bridgeTimeout)):(f="sendLog",u=this.call("sendLog",l,this.bridgeTimeout)):(d={event_name:c,version:2,properties:s},f="track_event",u=this.call("track_event",d,400)),setTimeout(function(){P(a1.CUSTOM_INFO,{custom_name:"send_report_data",extJSON:{api_name:f}})}),t.abrupt("return",u);case 11:case"end":return t.stop()}},t,this)})),s.send=function(t,e){return o.apply(this,arguments)},i=r0(rz().mark(function t(e,r,n,o){var i=this;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===n&&(n=400),void 0===o&&(o=!0),t.abrupt("return",new Promise(function(t,a){var c;if(!i.jsbridge){a("JSBRIDGE ERROR"),o&&A(a1.JSB_ERROR,Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}});return}n>0&&(c=window.setTimeout(function(){a("JSBRIDGE TIMEOUT"),o&&A(a1.JSB_ERROR,Error("JSBRIDGE TIMEOUT"),{extJSON:{position:"getCallPromise",method:e}})},n)),i.jsbridge&&i.jsbridge.call&&i.jsbridge.call(e,r,function(e){t(function(t,e){void 0===e&&(e=!0);var r={};try{if("string"==typeof t)r.data=JSON.parse(t);else if(t.code&&t.data&&t.ret?0:1)if(void 0!==t.code){var n=Object.assign({},t),o=n.code;r.code=o,delete n.code,n.data?r.data=n.data:r.data=n}else r.data=t;else(r=t).__data&&(r.data=r.__data)}catch(t){e&&A(a1.JSB_ERROR,t,{extJSON:{position:"getCallPromise bridge.call"}})}return r}(e,o)),window.clearTimeout(c)})}));case 4:case"end":return t.stop()}},t)})),s.call=function(t,e,r,n){return i.apply(this,arguments)},a=r0(rz().mark(function t(e){var r,n,o,i,a;return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.method,n=e.path,o=e.params,i=e.data,t.next=3,this.call("sendAnalyticsEvent",{method:r,path:n,params:o,data:i,header:{"Content-Type":"application/json"}},0,!1);case 3:return a=t.sent,t.abrupt("return",null==a?void 0:a.code);case 5:case"end":return t.stop()}},t,this)})),s.sendAnalyticsEvent=function(t){return a.apply(this,arguments)},c=r0(rz().mark(function t(e){return rz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(tO(this.env)&&tN())){t.next=2;break}return t.abrupt("return",this.call("updateFLLocalConv",e,this.bridgeTimeout));case 2:case"end":return t.stop()}},t,this)})),s.updateWebFlData=function(t){return c.apply(this,arguments)},t}();function r3(){r3=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function r6(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}r2=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),r1(0,ef(t$.ENV)),r1(0,el()),r1(1,ef(t$.JS_BRIDGE)),r1(1,el())],r2);var r5=function(){function t(){}var e,r,n=t.prototype;return e=r3().mark(function t(e,r,n){var o;return r3().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===n&&(n=0),t.prev=1,!(!navigator||!navigator.sendBeacon)){t.next=4;break}return t.abrupt("return",!1);case 4:if(!(!(o=navigator.sendBeacon(e,JSON.stringify(r)))&&"number"==typeof n&&n>0)){t.next=10;break}return n--,t.next=9,ts(200);case 9:return t.abrupt("return",this.send(e,r,n));case 10:return t.abrupt("return",o);case 13:return t.prev=13,t.t0=t.catch(1),t.abrupt("return",!1);case 16:case"end":return t.stop()}},t,this,[[1,13]])}),r=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(t){r6(i,n,o,a,c,"next",t)}function c(t){r6(i,n,o,a,c,"throw",t)}a(void 0)})},n.send=function(t,e,n){return r.apply(this,arguments)},n.sendByImage=function(t,e){new Image().src=rM(t,e)},t}();function r4(){r4=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function r8(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}r5=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],r5);var r9=function(){function t(t){this.cookieExpireOption=ex(t)}var e,r,n=t.prototype;return n.genCookieID=function(){return tr()},e=r4().mark(function t(){return r4().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return eF(i,"1",this.cookieExpireOption),t.abrupt("return",e1(tP()?"/static/enable_cookie.js":"https://analytics.tiktok.com/i18n/pixel/enable_cookie"));case 2:case"end":return t.stop()}},t,this)}),r=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(t){r8(i,n,o,a,c,"next",t)}function c(t){r8(i,n,o,a,c,"throw",t)}a(void 0)})},n.enableCookie=function(){return r.apply(this,arguments)},n.enableFirstPartyCookie=function(t){if(t){eF(i,"1",this.cookieExpireOption);var e=this.getAnonymousId();this.setAnonymousId(e||this.genCookieID())}},n.disableCookie=function(){eF(i,"0",this.cookieExpireOption),eF(a,"",Object.assign(this.cookieExpireOption,{expires:-1})),e1(tP()?"/static/disable_cookie.js":"https://analytics.tiktok.com/i18n/pixel/disable_cookie")},n.setAnonymousId=function(t){var e=this.getAnonymousId()||t;e&&eF(a,e.split(".")[0],this.cookieExpireOption)},n.getAnonymousId=function(){return ej(a)||""},n.canUseCookie=function(){try{return"0"!==ej(i)}catch(t){}return!1},n.resetExpires=function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"resetExpires",start:performance.now()}}catch(t){}var e=ej(i);e&&eF(i,e,this.cookieExpireOption);var r=this.getAnonymousId();r&&this.setAnonymousId(r);try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(t){}},t}();function r7(t,e){return(r7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r9=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),(ak=ef(t$.TTQ_GLOBAL_OPTIONS),function(t,e){ak(t,e,0)})],r9),(aM=cy||(cy={}))[aM.P0=4]="P0",aM[aM.P1=3]="P1",aM[aM.P2=2]="P2",aM[aM.P3=1]="P3";var nt="tt_hold_events",ne=function(t){function e(){var e;return e=t.apply(this,arguments)||this,e.consentMode=ce.UNKNOWN,e.queue=[],e.debounceUpdateCache=tc(function(){e.updateCache()},200,function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)),e.handleHistoryQueue=tt(function(){var t=ep(nt);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())}),e}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,r7(e,t);var r=e.prototype;return r.on=function(e,r){t.prototype.on.call(this,e,r,{}),this.handleHistoryQueue()},r.setConsentMode=function(t){this.consentMode=t,this.changeQueueWithConsent()},r.changeQueueWithConsent=function(){switch(this.consentMode){case ce.REVOKE:this.cleanQueue();break;case ce.GRANT:this.releaseQueue(),this.cleanQueue();case ce.HOLD:case ce.UNKNOWN:}},r.getConsentMode=function(){return this.consentMode},r.cacheReportTask=function(t,e,r){void 0===r&&(r=cv.defaultReport),this.queue.push({url:t,data:e,type:r}),this.debounceUpdateCache()},r.cleanQueue=function(){this.queue=[],eh(nt)},r.updateCache=function(){this.queue&&this.queue.length>0&&ed(nt,this.queue)},r.releaseQueue=function(){var t=this;this.queue.sort(function(e,r){return t.getEventPriority(r.data)-t.getEventPriority(e.data)}),this.emit(ca.QUEUE,this.queue)},r.getEventPriority=function(t){return t.event&&t.event.length>0?cy.P0:t.action&&t.action.length>0?cy.P1:""===t.event?cy.P2:cy.P3},e}(e9);ne=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],ne);var nr=function(){function t(t){var e=t.name,r=t.context,n=t.reporters;this.reporters=[],this.context=r,this.reporters=n,this.name=e}var e=t.prototype;return e.initStart=function(){},e.initEnd=function(){},e.adInfoInitStart=function(){},e.adInfoInitEnd=function(){},e.contextInitStart=function(){},e.contextInitEnd=function(){},e.pageUrlWillChange=function(t,e){},e.pageUrlDidChange=function(t,e){},e.pageDidLoad=function(){},e.pageWillLeave=function(t){},e.pixelSend=function(t,e,r,n,o){},e.pixelDidMount=function(t){},e.patchEnd=function(){},t}();function nn(t,e){return(nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var no=function(t){function e(){return t.apply(this,arguments)||this}return e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,nn(e,t),e}(nr=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu()],nr));function ni(t,e){return(ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var na=function(t,e){return function(r,n){e(r,n,t)}},nc=function(t){function e(e,r){var n;return(n=t.call(this,{name:"Callback",reporters:r,context:e})||this).ttclidCookieValue="undefined"!=typeof document?ej(eT):"",n}return e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,ni(e,t),e.prototype.pixelDidMount=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"callback_plugin_pixelDidMount",start:performance.now()}}catch(t){}var r=tQ(),n=tX(eT,r.url,r.referrer);n&&this.ttclidCookieValue!==n&&eL(eT,n);try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}},e}(no);nc=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),na(0,ef(t$.CONTEXT)),na(1,ef(t$.TTQ_REPORTERS))],nc);var ns={isHash:function(t){return!1},genIdentifierLabelByUserProperties:function(t){return{}}},nu={validatePhoneNumberLength:function(t){},parsePhoneNumberFromString:function(t){}},nf={tryDecodeHashedBase64String:function(t){return null},tryDecodeHashedBase64Hex:function(t){return null}},nl={checkEmailFormat:function(t){return!1},checkMDNEmailFormat:function(t){return!1}},np=function(t){var e=t.parsePhoneNumberFromString,r=t.validatePhoneNumberLength;nu.parsePhoneNumberFromString=e,nu.validatePhoneNumberLength=r},nh=function(t){var e=t.isHash,r=t.genIdentifierLabelByUserProperties;ns.isHash=e,ns.genIdentifierLabelByUserProperties=r},nd=function(t){var e=t.tryDecodeHashedBase64String,r=t.tryDecodeHashedBase64Hex;nf.tryDecodeHashedBase64String=e,nf.tryDecodeHashedBase64Hex=r},nv=function(t){var e=t.checkEmailFormat,r=t.checkMDNEmailFormat;nl.checkEmailFormat=e,nl.checkMDNEmailFormat=r},n_=function(t){var e=t.parsePhoneNumberFromString,r=t.validatePhoneNumberLength,n=t.isHash,o=t.genIdentifierLabelByUserProperties,i=t.tryDecodeHashedBase64String,a=t.tryDecodeHashedBase64Hex,c=t.checkEmailFormat,s=t.checkMDNEmailFormat,u=t.sha256;nv({checkEmailFormat:c,checkMDNEmailFormat:s}),nd({tryDecodeHashedBase64String:i,tryDecodeHashedBase64Hex:a}),nh({isHash:n,genIdentifierLabelByUserProperties:o}),np({parsePhoneNumberFromString:e,validatePhoneNumberLength:r}),X(u)},ng=function(t,e,r){void 0===e&&(e=""),void 0===r&&(r=nu.parsePhoneNumberFromString);var n=t,o=e?r(t,e):r(t);return o?n="86"===o.countryCallingCode?o.nationalNumber:o.number:t.replace(/[^0-9]/g,"").length>0&&(n=t.replace(/[^0-9]/g,"")),n},nm=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"];function ny(t,e){return(ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var nE=function(t){function e(e){var r=e.name,n=e.context,o=e.reporters;return t.call(this,{name:r,reporters:o,context:n})||this}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,ny(e,t);var r=e.prototype;return r.setIdentifyUtils=function(t){var e=t.isHash,r=t.sha256,n=t.genIdentifierLabelByUserProperties,o=t.tryDecodeHashedBase64String,i=t.tryDecodeHashedBase64Hex,a=t.validatePhoneNumberLength,c=t.parsePhoneNumberFromString,s=t.checkEmailFormat,u=t.checkMDNEmailFormat,f=t.getCookieDeprecationLabel,l=t.getAllTopics;n_({isHash:e,sha256:r,genIdentifierLabelByUserProperties:n,tryDecodeHashedBase64String:o,tryDecodeHashedBase64Hex:i,validatePhoneNumberLength:a,parsePhoneNumberFromString:c,checkEmailFormat:s,checkMDNEmailFormat:u}),this.parsePhoneNumberFromString=c,this.checkMDNEmailFormat=u,this.checkEmailFormat=s,this.sha256=r,this.getCookieDeprecationLabel=void 0===f?function(){}:f,this.getAllTopics=void 0===l?function(){}:l},r.baseHandleUserProperties=function(t,e){var r=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={taskName:window.ttq._pf_tn||"identify_encryption",functionName:window.ttq._pf_tn&&"identify_encryption",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="identify_encryption")}}catch(t){}if(t){var o=this.identifyParamsFormattedInfo(t),i=this.identifyParamsFormattedInfoV2(t),a=ns.genIdentifierLabelByUserProperties(e);this.handlePIIDiagnostics(i),Object.entries(t).forEach(function(e){var n=e[0],o=e[1],a=void 0===o?"":o;if(a){var c=String(a);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(n)){var s=r.getUserDataFormatInfoV2KeyName(n),u=nf.tryDecodeHashedBase64Hex(c);if(null!==u)t[n]=u,null!==s&&(i=r.updateUserDataFormatV2Label(s,a5.BASE64_HEX_HASHED,i));else{var f=nf.tryDecodeHashedBase64String(c);f&&(t[n]=f,null!==s&&(i=r.updateUserDataFormatV2Label(s,a5.BASE64_STRING_HASHED,i)))}}switch("zip_code"===n&&c&&(ns.isHash(c)?i=r.updateUserDataFormatV2Label("zip_code",a5.ZIP_CODE_IS_HASHED,i):(i=r.updateUserDataFormatV2Label("zip_code",a5.ZIP_CODE_IS_NOT_HASHED,i),r.isZipFromUs(t)?(t.zip_code=r.sha256(r.truncateString(c,5)),i=r.updateUserDataFormatV2Label("zip_code",a5.ZIP_CODE_IS_US,i)):(t.zip_code=r.sha256(c),i=r.updateUserDataFormatV2Label("zip_code",a5.ZIP_CODE_IS_NOT_US,i)))),n){case"email":t.email=ns.isHash(c)&&!r.checkEmailFormat(c)?c:r.sha256(r.handleEmail(c));break;case"eb_email":t.eb_email=r.sha256(r.handleEmail(c));break;case"phone_number":t.phone_number=ns.isHash(c)?c:r.sha256(r.handlePhoneNumber(c));break;case"eb_phone_number":t.eb_phone_number=r.sha256(r.handlePhoneNumber(c));break;case"auto_email":t.auto_email=r.sha256(r.handleEmail(c));break;case"auto_phone_number":t.auto_phone_number=r.sha256(r.handlePhoneNumber(c));break;case"first_name":t.first_name=ns.isHash(c)?c:r.sha256(c);break;case"last_name":t.last_name=ns.isHash(c)?c:r.sha256(c);break;case"city":t.city=r.truncateString(c,80);break;case"state":t.state=r.truncateString(c,80);break;case"country":t.country=r.truncateString(c,80);break;default:return}}}),t.sha256_email&&(t.email=this.handleCheckHashedEmailValue(String(t.sha256_email),o)),t.sha256_phone_number&&(t.phone_number=this.handleCheckHashedPhoneValue(String(t.sha256_phone_number),o));try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),"identify_encryption"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}return{userProperties:t,userDataFormat:o,userDataFormatV2:i,identifierLabel:a}}},r.identifyParamsFormattedInfo=function(t){var e=this,r={},n=/^sha256_(.*)$/;return Object.entries(t).forEach(function(t){var o=t[0],i=t[1],a=String(void 0===i?"":i),c=o.match(n);switch(o){case"email":e.handleEmailFormat(a,o,r);break;case"phone_number":e.handlePhoneNumberFormat(a,"phone_number",r);break;case"auto_email":e.handleEmailFormat(a,"auto_email",r);break;case"auto_phone_number":e.handlePhoneNumberFormat(a,"auto_phone_number",r);break;case(c||{}).input:var s=null==c?void 0:c.pop();s&&U.includes(s)&&(r[s]=[a6.HASHED]);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":e.handleNewPiisFormat(a,o,r);break;default:r[o]=[a6.CORRECT_FORMAT]}}),r},r.identifyParamsFormattedInfoV2=function(t){var e=this,r={};return Object.entries(t).forEach(function(t){var n=t[0],o=t[1],i=String(void 0===o?"":o);switch(n){case"email":e.handlePixelValidation(i,q.EMAIL_IS_HASHED,r);break;case"phone_number":e.handlePixelValidation(i,q.PHONE_IS_HASHED,r);break;case"sha256_email":e.handlePixelValidation(i,q.SHA256_EMAIL,r);break;case"sha256_phone_number":e.handlePixelValidation(i,q.SHA256_PHONE,r);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":break;default:r[n]=[a5.UNKNOWN_INVALID]}}),r},r.updateUserDataFormatV2Label=function(t,e,r){var n,o;return(null===r[t]||void 0===r[t]||(null==(n=r[t])?void 0:n.includes(a5.UNKNOWN_INVALID)))&&(r[t]=[]),null==(o=r[t])||o.push(e),r},r.getUserDataFormatInfoV2KeyName=function(t){return({email:"email_is_hashed",phone_number:"phone_is_hashed",sha256_email:"sha256_email",sha256_phone_number:"sha256_phone",zip_code:"zip_code"})[t]||null},r.handlePIIDiagnostics=function(t){},r.handleEmail=function(t){return t.toLowerCase()},r.handlePhoneNumber=function(t,e){return void 0===e&&(e=this.parsePhoneNumberFromString),ng(t,"",e)},r.handleCheckHashedEmailValue=function(t,e,r){return(void 0===r&&(r=this.checkEmailFormat),e.email=e.email||[],ns.isHash(t))?(null==e||e.email.push(a6.HASHED_CORRECT),t):r(t)?(null==e||e.email.push(a6.PLAINTEXT_EMAIL),this.sha256(this.handleEmail(String(t)))):(null==e||e.email.push(a6.HASHED_ERR),this.sha256(t))},r.handleCheckHashedPhoneValue=function(t,e,r){return(void 0===r&&(r=this.parsePhoneNumberFromString),e.phone_number=e.phone_number||[],ns.isHash(t))?(null==e||e.phone_number.push(a6.HASHED_CORRECT),t):r(t)?(e.phone_number.push(a6.PLAINTEXT_PHONE),this.sha256(this.handlePhoneNumber(String(t),r))):(null==e||e.phone_number.push(a6.HASHED_ERR),this.sha256(t))},r.handlePixelValidation=function(t,e,r){r[e]=[],nm.includes(t)&&r[e].push(a5.FILTER_EVENTS),t&&ns.isHash(t)&&r[e].push(a5.HASHED),t&&this.checkEmailFormat(t)&&r[e].push(a5.PLAIN_EMAIL),t&&this.checkMDNEmailFormat(t)&&r[e].push(a5.PLAIN_MDN_EMAIL),t&&this.parsePhoneNumberFromString(t)&&r[e].push(a5.PLAIN_PHONE),t&&0===r[e].length&&r[e].push(a5.UNKNOWN_INVALID)},r.isZipFromUs=function(t){var e;return(null==(e=t.country)?void 0:e.toLowerCase())==="us"},r.truncateString=function(t,e){var r=Array.from(t);return r.length<=e?t:r.slice(0,e).join("")},r.handlePhoneNumberFormat=function(t,e,r){var n=this.handleCheckPhoneNumber(String(t),this.parsePhoneNumberFromString);r[e]=n},r.handleCheckPhoneNumber=function(t,e){void 0===e&&(e=this.parsePhoneNumberFromString);var r=[];return t?ns.isHash(t)?r.push(a6.HASHED):e(t)?r.push(a6.CORRECT_FORMAT):r.push(a6.WRONG_FORMAT):r.push(a6.EMPTY_VALUE),r},r.handleCheckEmail=function(t,e){void 0===e&&(e=this.checkEmailFormat);var r=[];return t?ns.isHash(t)?r.push(a6.HASHED):e(t)?r.push(a6.CORRECT_FORMAT):r.push(a6.WRONG_FORMAT):r.push(a6.EMPTY_VALUE),r},r.handleEmailFormat=function(t,e,r){var n=this.handleCheckEmail(String(t),this.checkEmailFormat);r&&r[e]&&(r[e]||[]).includes(a6.HASHED)||(r[e]=n)},r.handleNewPiisFormat=function(t,e,r){t&&(r[e]=[a6.CORRECT_FORMAT])},e}(no);function nw(){nw=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function nb(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function nI(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){nb(i,n,o,a,c,"next",t)}function c(t){nb(i,n,o,a,c,"throw",t)}a(void 0)})}}function nO(t,e){return(nO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var nT=function(t,e){return function(r,n){e(r,n,t)}},nR=function(t){function e(e,r){var n;return(n=t.call(this,{name:"Identify",reporters:r,context:e})||this).init(),n}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,nO(e,t);var r,n,o=e.prototype;return o.init=function(){var t=this;return this.pluginPromise||(P(a1.IDENTIFY_INIT_START),this.pluginPromise=e1(tP()?"/static/identify.js":"https://analytics.tiktok.com/i18n/pixel/static/identify_47d087f9.js").then(function(){t.detectTopics(),P(a1.IDENTIFY_INIT_END)}).catch(function(){var t=Error("Loading chunk identify failed.\n(error: "+window.location.host+"/static/identify.js)");return t.name="ChunkLoadError",Promise.reject(t)})),this.pluginPromise},r=nI(nw().mark(function t(e,r){return nw().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",void 0);case 2:return t.next=4,this.init();case 4:return t.abrupt("return",this.baseHandleUserProperties(e,r));case 5:case"end":return t.stop()}},t,this)})),o.handleUserProperties=function(t,e){return r.apply(this,arguments)},o.handlePIIDiagnostics=function(t){try{var e=t.email_is_hashed,r=void 0===e?[]:e,n=t.sha256_email,o=void 0===n?[]:n,i=t.phone_is_hashed,a=void 0===i?[]:i,c=t.sha256_phone,s=void 0===c?[]:c;if(r.includes(a5.UNKNOWN_INVALID)||o.includes(a5.UNKNOWN_INVALID))return void L(cl.INVALID_EMAIL_FORMAT);if(a.includes(a5.UNKNOWN_INVALID)||s.includes(a5.UNKNOWN_INVALID))return void L(cl.INVALID_PHONE_NUMBER_FORMAT);if(r.includes(a5.FILTER_EVENTS)||o.includes(a5.FILTER_EVENTS))return void L(cl.INVALID_EMAIL_INFORMATION);if(a.includes(a5.FILTER_EVENTS)||s.includes(a5.FILTER_EVENTS))return void L(cl.INVALID_PHONE_NUMBER_INFORMATION)}catch(t){}},n=nI(nw().mark(function t(){var e,r;return nw().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getCookieDeprecationLabel();case 3:return e=t.sent,t.next=6,this.getAllTopics();case 6:(r=t.sent)&&P(a1.CUSTOM_INFO,{custom_name:"topics",extJSON:{cookie_label:String(e),stack:r.toString()}}),t.next=12;break;case 10:t.prev=10,t.t0=t.catch(0);case 12:case"end":return t.stop()}},t,this,[[0,10]])})),o.detectTopics=function(){return n.apply(this,arguments)},e}(nE);nR=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),nT(0,ef(t$.CONTEXT)),nT(1,ef(t$.TTQ_REPORTERS))],nR);var nS=function(t,e,r,n){try{var o=m().getEmitter();if(!o)return;var i=r.throttle,a=r.interval;o.on(t,e,{throttle:i,interval:a},{emitterType:t,listenEventTypes:[ci.CLICK],environment:"window",pluginVersion:n||"v1"})}catch(e){A(a1.CUSTOM_ERROR,e,{custom_name:"addEventListener",custom_enum:t})}};(aj=cE||(cE={})).ERROR_FORMAT="error_format",aj.OVER_LENGTH="over_length_3e4",aj.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields";var nN="form_detail_error";(aF=cw||(cw={})).GET_ELEMENTS_ERROR="get_elements_error",aF.INIT_ERROR="init_error",aF.ASSEMBLE_FORM_DETAIL_ERROR="assemble_form_detail_error",aF.DETECT_FORM_ELEMENT_ERROR="detect_form_element_error",aF.GET_OVERALL_FORM_DETAIL_ERROR="get_overall_form_detail_error",aF.FORM_OBSERVER_ERROR="form_observer_error",aF.OVER_LENGTH="over_length_3e4",(aU=cb||(cb={})).METADATA="Metadata",aU.CLICK="Click",(aq=cI||(cI={})).AUTO_COLLECTION="AUTO_COLLECTION",aq.AUTO_FORM="AUTO_FORM",aq.AUTO_CLICK="AUTO_CLICK",aq.AUTO_VC="AUTO_VC",aq.AUTO_VC_REVERSE="AUTO_VC_REVERSE",(aG=cO||(cO={})).AUTO_FORM="form_rules",aG.AUTO_VC="vc_rules",aG.AUTO_VC_REVERSE="vc_rules_reverse",(aH=cT||(cT={})).PAGE_LEAVE="PageLeave",aH.PAGE_VIEW="PageView",aH.DOM_CHANGE="DomChange",aH.URL_CHANGE="UrlChange",aH.CLICK="Click",aH.SCROLL="Scroll";var nP=["AnatomicalStructure","AnatomicalSystem","ApprovedIndication","ArriveAction","Artery","BioChemEntity","BloodTest","Bone","BorrowAction","BrainStructure","BrokerageAccount","CDCPMDRecord","ChemicalSubstance","CovidTestingFacility","DDxElement","DepartAction","DepositAccount","DiagnosticLab","DiagnosticProcedure","Diet","DietarySupplement","DoseSchedule","ElementarySchool","HighSchool","ExercisePlan","Gene","GovernmentBenefitsType","GovernmentService","HealthAspectEnumeration","HealthInsurancePlan","HealthPlanCostSharingSpecification","HealthTopicContent","Hospital","ImagingTest","InfectiousAgentClass","InvestmentFund","InvestmentOrDeposit","Invoice","Joint","LendAction","LifestyleModification","Ligament","LoanOrCredit","LymphaticVessel","MaximumDoseSchedule","MedicalAudience","MedicalAudienceType","MedicalCause","MedicalCode","MedicalCondition","MedicalConditionStage","MedicalContraindication","MedicalDevice","MedicalEntity","MedicalEvidenceLevel","MedicalGuidelineContraindication","MedicalIndication","MedicalIntangible","MedicalObservationalStudy","MedicalOrganization","MedicalProcedure","MedicalProcedureType","MedicalRiskCalculator","MedicalRiskFactor","MedicalRiskScore","MedicalSign","MedicalSignOrSymptom","MedicalStudy","MedicalSymptom","MedicalTest","MedicalTestPanel","MedicalTherapy","MedicalTrial","MiddleSchool","MoneyTransfer","Muscle","Nerve","OccupationalTherapy","Order","PalliativeProcedure","ParentAudience","PathologyTest","Patient","PeopleAudience","Person","Pharmacy","PhysicalActivity","PhysicalTherapy","Physician","PoliticalParty","Preschool","PreventionIndication","Protein","PsychologicalTreatment","RadiationTherapy","RecommendedDoseSchedule","ReportedDoseSchedule","School","Substance","SuperficialAnatomy","SurgicalProcedure","Text","TherapeuticProcedure","TreatmentIndication","URL","Vein","Vessel","VitalSign","WorkersUnion"];(aV=cR||(cR={})).V1="v1",aV.V2="v2";var nA={IRRELEVANT_KEYWORDS:new Set(["CLOSE","OPEN"]),TERMINATION_TAGS:new Set(["UL","OL","BODY","HTML","DOCUMENT","MAIN"]),VALID_IMG_KEYWORDS:new Set(["https","http","product","goods","img","image","jpg","jpeg","png","webp"]),INVALID_IMG_KEYWORDS:new Set(["icon","logo","svg","gif"]),DYNAMIC_IMAGE_ATTRS:["data-src","data-original"],INVALID_LINK_PATTERNS:[/^java/i,/^#/,/^$/,/^mailto:/i,/^tel:/i,/^\/$/],EXCLUDE_CLASSES:new Set(["hover","active","focus","current","first","last"]),MAIN_IMG_MIN_SIZE:100,MAX_TRAVERSE_LAYERS:10,MAX_IMG_COUNT:6,HIGH_SIZE_THRESHOLD:.8,SKIP_ELEMENT:new Set(["SVG","POLYGON"]),SIBLING_SIMILARITY_THRESHOLD:.7,SIBLING_NODE_COUNT_THRESHOLD:10,SIMILAR_WIDTH_THRESHOLD:.1,SIMILAR_HEIGHT_THRESHOLD:.4,PRIORITY_CONFIG:{destination:["composedPath","container"],image_url:["composedPath","container"],inner_text:["container","composedPath"]},MIN_SIZE_ABSOLUTE_VALUE:100},nL={MONEY_SYMBOLS:new Set(["$","\xa5","\xa3","₩","₫","﷼","€","฿","₹","₽","zł","₦","د.إ","₱","TL","JPY","EUR","GBP","INR","BRL","CAD ","AUD","RUB","MXN","KRW","TRY","RM","SEK","THB","SGD","ARS",":-"]),MIN_IMG_SIZE:30,MAX_COMPRESS_STRING_LENGTH:200,INVALID_DATA_SIMILARITY_THRESHOLD:.6,MAX_PRODUCTS_COUNT:8};(aB=cS||(cS={})).COMPOSED_PATH="composedPath",aB.FIND_PRODUCT_CARD="findProductCard",aB.CHECKOUT="checkout";var nx="checkout",nC=["destination","image_url","from"],nD=new Set(["x","y","num_child_buttons","timestamp","xpath","tag","from"]);function nk(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return nM(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nM(t,e)}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nM(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<-==&_\/\?\.,0-9:; \]\[%~\"\{\}\)\(\+\@\^\`]/g.test(t)||nP.some(function(e){return t.toLowerCase().indexOf(e.toLowerCase())>-1})}var nF=function t(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(e===document.documentElement)return"/HTML";for(var r=1,n=e.previousSibling;n;)n.nodeType===Node.ELEMENT_NODE&&n.tagName===e.tagName&&r++,n=n.previousSibling;var o=e.tagName.toLowerCase();return t(e.parentNode)+"/"+o+"["+r+"]"};function nU(t,e){return function(){for(var r=arguments.length,n=Array(r),o=0;o=function(t,e){if(!t||!e)return 0;for(var r=t.length,n=e.length,o=Array.from({length:r+1},function(){return Array(n+1).fill(0)}),i=0;i<=r;i++)o[i][0]=i;for(var a=0;a<=n;a++)o[0][a]=a;for(var c=1;c<=r;c++)for(var s=1;s<=n;s++)t[c-1]===e[s-1]?o[c][s]=o[c-1][s-1]:o[c][s]=Math.min(o[c-1][s]+1,o[c][s-1]+1,o[c-1][s-1]+1);return o[r][n]}(o.value,i.value)?(f++,l+=1):l+=2}while(!o.done||!i.done);return f/l}function nK(t){if(!t)return null;for(var e,r=nk(nA.DYNAMIC_IMAGE_ATTRS);!(e=r()).done;){var n=e.value,o=t.getAttribute(n);if(o&&nH(o))return o}if(t.src&&nH(t.src))return t.src;var i=t.getAttribute("srcset");if(i){var a=i.split(",").find(function(t){return nH(t.trim().split(" ")[0])});if(a)return a.split(" ")[0]}return null}function nW(t){return t instanceof HTMLAnchorElement&&function(t){if(!t)return!1;var e=t.trim();return!nA.INVALID_LINK_PATTERNS.some(function(t){return new RegExp(t).test(e)})}(t.getAttribute("href"))?t.href:null}function nJ(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return nX(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nX(t,e)}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nX(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=nA.SIBLING_SIMILARITY_THRESHOLD?t+1:t-1:s>=nA.SIBLING_SIMILARITY_THRESHOLD?t+1:t-1},0),c=t.getElementsByTagName("a").length>0,s=t.getElementsByTagName("img").length>0;return e.RequiredLinkData?a>=0&&c:e.RequiredImageData?a>=0&&s:a>=0&&(c||s)}function n3(t){var e=window.innerHeight||document.documentElement.clientHeight;return t.offsetHeight/e>nA.HIGH_SIZE_THRESHOLD?2:t.offsetHeight0&&e.some(function(e){return t.toLowerCase()===e.toLowerCase()})}(n,e)&&(r[n]=n8(t[n],e));return r}function n9(t){return Array.isArray(t)?t.some(function(t){return n9(t)}):"string"==typeof t&&(t=t.toLowerCase().replace(/https?:\/\/schema\.org\//,""),nP.some(function(e){return t===e.toLowerCase()}))}var n7=["form","[id*=form], [class*=form]"],ot=["label"],oe=["input,select,textarea"],or=["radio","checkbox"],on=["hidden","reset","submit","password"];function oo(t,e){try{for(var r=0;r0)return Array.from(n)}return[]}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.GET_ELEMENTS_ERROR}),[]}}function oi(t){var e="";return!function t(r){for(;r;)r.nodeType===Node.TEXT_NODE?e+=r.textContent:"SELECT"!==r.nodeName&&r.firstChild&&t(r.firstChild),r=r.nextSibling}(t.firstChild),e.replace(/[\t\n]/g,"").trim()}function oa(t){if(!t)return!1;var e=window.getComputedStyle(t);return!("none"===e.display||"visible"!==e.visibility||function t(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||t(e.parentElement))}(t))&&(0!==t.offsetWidth||0!==t.offsetHeight)}function oc(t){var e=t.getAttribute("type");return!!e&&on.indexOf(e)>-1}function os(t){return t&&nj(t)?"__Text__":t}(aY=cN||(cN={}))[aY.CONTAIN=0]="CONTAIN",aY[aY.ID=1]="ID",aY[aY.SELECTOR=2]="SELECTOR";var ou=function(){function t(t){var e=this;this.formUpdateHandlers=[],this.answerMap={},t.find(function(t){var r=e.getRules(t);return!!r&&(e.rules=r,!0)}),this.init()}var e=t.prototype;return e.getRules=function(t){var e=t.plugins&&t.plugins.AutoConfig;return e&&e[cO.AUTO_FORM]},e.init=function(){var t=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"initAutoForm_init",start:performance.now()}}catch(t){}try{this.forms=this.detectFormElement(),this.forms&&this.forms.forEach(function(e){e.formDetail=t.assembleFormDetail(e),t.startFormObserver(e,t.formUpdateHandlers)})}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.INIT_ERROR})}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}},e.getOverallFormDetail=function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"initAutoForm_getOverallFormDetail",start:performance.now()}}catch(t){}var e="[]";try{this.forms&&this.forms.length>0&&(this.forms.some(function(t){var e=t.el;return!document.body.contains(e)})&&this.init(),e=JSON.stringify(this.forms.map(function(t){return t.formDetail}).filter(function(t){return t})))}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.GET_OVERALL_FORM_DETAIL_ERROR})}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(t){}return e},e.addFormUpdateHandler=function(t){this.formUpdateHandlers.push(t)},e.startFormObserver=function(t,e){var r=this;try{var n=tc(function(){var n,o=r.assembleFormDetail(t);(!t.formDetail||o&&(n=t.formDetail,Object.keys(function t(e,r){var n={};for(var o in e)if(e.hasOwnProperty(o)&&!r.hasOwnProperty(o))n[o]=e[o];else if(e.hasOwnProperty(o)&&r.hasOwnProperty(o)&&e[o]!==r[o])if("object"==typeof e[o]&&"object"==typeof r[o]){var i=t(e[o],r[o]);Object.keys(i).length>0&&(n[o]=i)}else n[o]=e[o];for(var a in r)r.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(n[a]=r[a]);return n}(o,n)).length>0))&&(t.formDetail=o,e.forEach(function(e){return e.call(r,t.formDetail)}))},2e3,this);if(t.el.parentNode){var o=t.el.parentNode;this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(n),this.observer.observe(o,{attributes:!0,childList:!0,subtree:!0}),o.addEventListener("click",n,{capture:!0})}}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.FORM_OBSERVER_ERROR})}},e.detectFormElement=function(){try{var t,e,r=[0,0,0],n=(t=this.rules,(e=oo(t||n7,document)).filter(function(t){return!e.some(function(e){return e.contains(t)&&e!==t})}));if(!n)return[];var o=n.map(function(t){return{el:t,questions:[]}});return o.forEach(function(t){var e,n,o=(e=t.el,oo(ot,e)),i=new Set([]);o.forEach(function(e){var n=function(t,e){var r=oo(oe,t);if(r&&r.length)return{els:r,from:cN.CONTAIN};var n=t.getAttribute("for");if(n&&(r=oo(["input[id='"+n+"'],select[id='"+n+"'],textarea[id='"+n+"']"],e)))return{els:r,from:cN.ID};return!1}(e,t.el);if(n){var o=n.els,a=n.from,c=o.filter(function(t){return!oc(t)}).map(function(t){return i.add(t),{el:t,from:a}});c&&c.length&&(r[a]=1,t.questions.push({el:e,answers:c}))}}),(n=t.el,oo(oe,n)).filter(function(t){return!oc(t)}).forEach(function(e){if(!i.has(e)){r[cN.SELECTOR]=1;var n,o=(n=t.el,function t(e){return null==e||e.isSameNode(n)?n:oi(e).length>0?e:t(e.parentNode)}(e.parentNode));t.questions.push({el:o,answers:[{el:e,from:cN.SELECTOR}]})}})}),P(a1.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:r.join("")}),o}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.DETECT_FORM_ELEMENT_ERROR}),[]}},e.calculateQuestionFilledTime=function(t){var e=t.el,r=t.answers,n=nF(e),o=r.reduce(function(t,e){var r=e.el,n=r.getAttribute("type");return n&&or.indexOf(n.toLowerCase())>-1?t+","+r.checked:t+","+r.value},"");this.answerMap[n]||(this.answerMap[n]={defaultValue:o,value:o});var i=this.answerMap[n],a=i.defaultValue,c=i.filledTime;return(this.answerMap[n].value=o,a===o)?void delete this.answerMap[n].filledTime:c||(this.answerMap[n].filledTime=+new Date)},e.assembleFormDetail=function(t){var e=this,r=t.el,n=t.questions;try{var o={xpath:nF(r),id:r.id,name:os(r.getAttribute("name")),tag:r.tagName.toLowerCase(),class_name:r.className,questions:[],width:r.offsetWidth,height:r.offsetHeight,is_visible:oa(r)};return o.questions=n.map(function(t){var r=t.el,n=t.answers,o={xpath:nF(r),id:r.id,name:os(oi(r)),tag:r.tagName.toLowerCase(),class_name:r.className,filled_time:e.calculateQuestionFilledTime(t),answers:[],width:r.offsetWidth,height:r.offsetHeight,is_visible:oa(r)};return n.forEach(function(t){var e=t.el,r=t.from;e&&"SELECT"===e.tagName.toUpperCase()?o.answers=o.answers.concat(Array.from(e.querySelectorAll("option")).map(function(t){return{xpath:nF(t),id:t.id,name:os(t.value||t.innerText),tag:t.tagName.toLowerCase(),class_name:t.className,from:r,width:t.offsetWidth,height:t.offsetHeight,is_visible:oa(e)}})):o.answers.push({xpath:nF(e),id:e.id,name:os(e.getAttribute("name")),tag:e.tagName.toLowerCase(),class_name:e.className,input_type:e.getAttribute("type"),placeholder:os(e.getAttribute("placeholder")),from:r,width:e.offsetWidth,height:e.offsetHeight,is_visible:oa(e)})}),o}),o}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:nN,custom_enum:cw.ASSEMBLE_FORM_DETAIL_ERROR});return}},t}(),of=["United States","US","Canada","CA","Australia","AU","Mexico","MX","Argentina","AR","Chile","CL","Colombia","CO","Fiji","FJ","Liberia","LR","Namibia","NA","New Zealand","NZ","Singapore","SG","Solomon Islands","SB","Suriname","SR","South Africa","ZA","Barbados","BB","Belize","BZ","Cuba","CU","Dominican Republic","DO","Guyana","GY","Jamaica","JM","Cayman Islands","KY","Trinidad and Tobago","TT","Tuvalu","TV","Zimbabwe","ZW","United Kingdom","GB","Egypt","EG","Falkland Islands","FK","Gibraltar","GI","Guernsey","GG","Isle of Man","IM","Jersey","JE","Lebanon","LB","Saint Helena","SH","Syria","SY","Sudan","SD","Japan","JP","China","CN","Japan","JP","CN","South Korea","KR","Philippines","PH","Cuba","CU","Sweden","SE","Norway","NO","Denmark","DK","Iceland","IS","Costa Rica","CR","El Salvador","SV","Bolivia","BO","Venezuela","VE","Bahamas","BS","Brunei","BN","Ethiopia","ET","Eritrea","ER","Iran","IR","Oman","OM","Qatar","QA","Saudi Arabia","SA","Yemen","YE","Bulgaria","BG","Kyrgyzstan","KG","Central African CFA franc zone","XAF","West African CFA franc zone","XOF"].map(function(t){return t.toUpperCase()}),ol=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTC","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNH","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","ETH","EUR","FJD","FKP","GBP","GEL","GGP","GHC","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTC","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RMB","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRL","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VES","VND","VUV","WST","XAF","XBT","XCD","XOF","XPF","XSU","XUA","YER","ZAR","ZMW","ZWD","ZWL"];function op(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return oh(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oh(t,e)}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?r:null}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:"updateParameterInferenceData",custom_enum:"enhancement_parameter_inference"}),null}},oI=function(t,e){var r=null;for(var n in e)if(t.includes(n))return e[n];return null},oO=function(t,e){var r=function(t,e){try{for(var r,n=document.evaluate(t,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),o=null;r=n.iterateNext();)/\d/.test(r.innerText)&&(o=r);if(!o&&e)for(var i=document.getElementsByClassName(e),a=0;a=a.length-3&&(o=!0),o&&(r=r.slice(0,n-(a.length-1))+"."+r.slice(n-(a.length-1))),r}return null}(n):null,textContent:n}},oT=function(t){if(!t)return{currencyCode:null,currencyCodeFromeXpath:null};var e,r=null==(e=document.evaluate(t,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)?void 0:e.textContent,n=((null==r?void 0:r.trim())?ol.includes(r.toUpperCase().trim()):null)?null==r?void 0:r.toUpperCase().trim():null;return{currencyCode:r,currencyCodeFromeXpath:n}},oR=function(t){if(!t)return{countryCode:null,countryCodeFromXpath:null};var e,r=null==(e=document.evaluate(t,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)?void 0:e.textContent,n=((null==r?void 0:r.trim())?of.includes(r.toUpperCase().trim()):null)?null==r?void 0:r.toUpperCase().trim():null;return{countryCode:r,countryCodeFromXpath:n}},oS=function(t){try{var e=new URL(t).hostname.split(".");for(var r in e)if(of.includes(e[r].toUpperCase()))return e[r].toUpperCase()}catch(t){}return null},oN=function(t,e,r){try{if(t)for(var n,o=op(t);!(n=o()).done;){var i=n.value;if(i.valueXpath&&i.currency&&i.currency.val){var a=i.currency.val,c=oO(i.valueXpath,i.currency.val),s=c.textContent,u=c.priceNumberString;if(u&&s){var f=oT(i.currency.xpath),l=f.currencyCode,p=f.currencyCodeFromeXpath;l&&P(a1.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:e,currencyCode:l,vcConfig:r}});var h=oR(i.countryCodeXpath),d=h.countryCode,v=h.countryCodeFromXpath;d&&P(a1.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:e,country:d,vcConfig:r}});var _={value:u,currency:p||a,ori_value:s,rule_key:i.rule_key,country_code:v};return v||(_.country_code=oS(e)),P(a1.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:e,autoProperties:_,vcConfig:r}}),oP(ox,_),_}}}return null}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:"updateParameterInferenceData",custom_enum:"updateAutoVCData"}),null}},oP=function(t,e){try{sessionStorage.setItem(t,JSON.stringify(e))}catch(t){}},oA=function(t){try{var e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(t){return null}},oL=function(t){try{sessionStorage.removeItem(t)}catch(t){}},ox="value_currency_rule",oC="parameter_inference_rule",oD=[cT.CLICK,cT.SCROLL],ok=function(){function t(t){var e=this;this.handlerArray=t,oD.forEach(function(t){window.addEventListener(t.toLowerCase(),tc(function(){e.interactionHandler(t)},2e3,e),{capture:!0,passive:!0})})}var e=t.prototype;return e.iterateHandlerArray=function(t){this.handlerArray.forEach(function(e){return e(t)})},e.interactionHandler=function(t){var e=this;this.timeoutId&&clearTimeout(this.timeoutId),this.iterateHandlerArray(t),this.timeoutId=setTimeout(function(){e.iterateHandlerArray(t)},2e3)},t}(),oM=function(){function t(){this.history={}}var e=t.prototype;return e.hasReport=function(t,e,r){var n=this.genHistoryKey(t,e);return this.history[n]&&this.history[n].indexOf(r)>-1},e.addHistory=function(t,e,r){var n=this.genHistoryKey(t,e);this.history[n]||(this.history[n]=[]),this.history[n].push(r)},e.clearHistory=function(){this.history={}},e.genHistoryKey=function(t,e){return t+":"+e},t}(),oj=function(){function t(t,e,r,n){this.context=t,this.reportHistory=new oM,this.reporters=e,this.reportService=r,this.ttqOptions=n}var e=t.prototype;return e.report=function(t,e,r){var n=this,o=e7(ch.AUTO_CONFIG),i=this.getReportPixelList(e,r),a=this.assemblyReportData(t,r,i);a&&o&&this.reportService.reportPreTasks.then(function(){n.reportService.report(o,a,cv.defaultReport,c_.P0)})},e.clearHistory=function(){this.reportHistory.clearHistory()},e.getReportPixelList=function(t,e){var r=this,n=JSON.stringify(Object.assign({},e,{page_trigger:void 0}));return this.reporters.filter(function(e){return!!nq(e)&&nG(e,t)}).filter(function(e){var o=e.getReporterId();return!([cI.AUTO_COLLECTION,cI.AUTO_FORM].indexOf(t)>-1&&r.reportHistory.hasReport(t,o,n))&&(r.reportHistory.addHistory(t,o,n),e)})},e.getCookieBasedSessions=function(t){var e=[],r=eW(document.cookie),n=t.filter(function(t){var e;return!!(null==(e=null==t?void 0:t.reporterInfo)?void 0:e.firstPartyCookieEnabled)});if(0===n.length)return e;var o=this.context.getPageCookieBasedSession();return n.forEach(function(t){var n=t.getReporterId();t.setCookieBasedSession(r[n]),e.push(eQ(t.getCookieBasedSession(),o,n))}),e},e.assemblyReportData=function(t,e,r){if(0!==r.length){var n,o,i,a=r.map(function(t){return t.getReporterId()}),c=this.context.getPageSign(),s=(null==(o=null==(n=this.ttqOptions)?void 0:n.cookieBasedSessionConfig)?void 0:o.enable)?this.getCookieBasedSessions(r):[],u=r[0],f=u.assemblyData(u.getReporterId(),"",{},{},ch.AUTO_CONFIG);return delete f.event,f.action=t,f.auto_collected_properties=e,f.context.pixel||(f.context.pixel={}),f.context.pixel.code=a[0],f.context.pixel.codes=a.join("|"),f.context.index=null==(i=c.pageIndex)?void 0:i.index,f.context.session_id=c.sessionId,f.context.pageview_id=B(this.context.getPageViewId(),u.reporterInfo.loadId,"::"),f.context.sessions=s,f.message_id=f.message_id.replace(/-[^-]*$/,""),f}},t}(),oF=new Set([",","?",";","!","、",",","。","?",";","!",":",":"]);(aK=cA||(cA={})).ID_SSN="ID_SSN",aK.PASSPORT="PASSPORT",aK.DRIVING_LICENSE="DRIVING_LICENSE",aK.PHONE="PHONE",aK.EMAIL="EMAIL",aK.CREDIT_CARD="CREDIT_CARD",aK.RACE_ETHNIC="RACE_ETHNIC",aK.RELIGION="RELIGION",aK.SEXUAL_ORIENTATION="SEXUAL_ORIENTATION",aK.POLITICAL_AFFILIATION="POLITICAL_AFFILIATION",aK.UNION_MEMBERSHIP="UNION_MEMBERSHIP",aK.CRIMINAL_RECORD="CRIMINAL_RECORD",aK.DEFAULT="***";var oU=((cP={})[cA.RACE_ETHNIC]=["asian","black","white","caucasian","hispanic","latino","arab","middle eastern","african american","native american","indigenous","pacific islander","jewish","afro","mulatto","mestizo","racial","ethnicity","ethnic group"],cP[cA.RELIGION]=["christian","catholic","protestant","baptist","orthodox","muslim","islam","islamic","sunni","shia","jewish","judaism","synagogue","hebrew","hindu","hinduism","vedic","bhagavad","buddhist","buddhism","taoism","shinto","atheist","agnostic","secular","religious belief"],cP[cA.SEXUAL_ORIENTATION]=["heterosexual","homosexual","bisexual","pansexual","gay","lesbian","lgbt","lgbtq","queer","asexual","sexual orientation","gender identity","trans","transgender","nonbinary","non-binary"],cP[cA.POLITICAL_AFFILIATION]=["democrat","democratic","republican","libertarian","conservative","liberal","progressive","nationalist","communist","socialism","socialist","marxist","left-wing","right-wing","maga","antifa","alt-right","green party","political party","political ideology"],cP[cA.UNION_MEMBERSHIP]=["labor union","trade union","union member","collective bargaining","strike","unionized","organized labor","workers' union","teamsters","AFL-CIO","IBEW","union dues","union card"],cP[cA.CRIMINAL_RECORD]=["arrest","arrested","convicted","conviction","felony","felon","misdemeanor","parole","probation","criminal record","jail","prison","inmate","suspect","indictment","charged with","mugshot"],cP),oq=Object.values(cA).reduce(function(t,e){return t[e]="<#"+e+"#>",t},{}),oG={prefix:"(?|[^>]*<))"},oH=oz([/(?:\+?\d{1,3}[\s-]?|\(\+?\d{1,3}\)[\s-]?)?(?:\d{2,4}[\s-]?|\(\d{2,4}\)[\s-]?)?(?:\d[\s-]?){5,}/g],oG),oV=oz([/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi],oG),oB=oz([/(?:(?:4[0-9]{3}|5[1-5][0-9]{2}|6011|65[0-9]{2}|3[47][0-9]{2}|3(?:0[0-5]|[68][0-9])|2131|1800|35\d{2})[-\s]?(?:[0-9]{4}[-\s]?){2}[0-9]{3,4}|62[0-9]{3}[-\s]?(?:[0-9]{4}[-\s]?){2,3}[0-9]{3,4})$(?![\d])/g],oG),oY=oz([/\d{3}-\d{2}-\d{4}|\d{9}/g,/\d{17}(\d|X|x)$/g,/[A-CEGHJ-PR-TW-Z]{2}\d{6}[A-D]?/g,/(?:[A-Z]\d{10}|\d{10})/g,/[A-Z0-9]{12}/g],oG),oK=oz([/[EDS]\d{8}/g,/[A-HJ-NP-Z][A-HJ-NP-Z0-9]{8}/g,/[A-Z]{2}\d{6}/g],oG),oW=oz([/\d{17}[\dXx]/g,/[A-Z0-9]{16}/g,/[A-Z0-9]{10,12}/g,/[A-Z0-9]{12}/g],oG),oJ=function(t,e){if("string"!=typeof t)throw TypeError("text must be a non-empty string");if("number"!=typeof e||e<=0)throw TypeError("targetLength must be a positive integer");for(var r=[],n=0,o=t.length;n0&&oX(t[r]);)r--;for(;n"===s&&(r=this.parseTag(a,e,r),i="text",a="")),n++}return r=this.processTextBuffer(c,e,r),a&&(r=this.parseTag(a,e,r)),e},e.processTextBuffer=function(t,e,r){var n=t.trim();if(!n)return r;if(n.length<=30){var o={type:"text",value:n,position:r++};return e.push(o),r}return oJ(n,30).forEach(function(t){var n={type:"text",value:t,position:r++};e.push(n)}),r},e.parseTag=function(t,e,r){var n=r;if(!t)return n;if(t.startsWith("30?oJ(t,30).forEach(function(t){n.push({type:"array-item",key:a,value:t,position:o++})}):n.push({type:"array-item",key:a,value:t,position:o++})}):null!==t&&"object"==typeof t&&Object.keys(t).forEach(function(i){var a=e?e+"."+i:i,c=t[i];if(null!==c&&"object"==typeof c){var s=r.decompose(c,a);n.push.apply(n,s)}else"string"===o$(c)&&c.length>30?oJ(c,30).forEach(function(t){n.push({type:"object-property",key:a,value:t,name:i,position:o++})}):n.push({type:"object-property",key:a,value:c,name:i,position:o++})}),n},t}();function o2(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);!(r=o()).done;){var i=r.value;switch(i.type){case"tagStart":n+="<"+i.name;break;case"attribute":n+=" "+i.key+'="'+i.redactedValue+'"';break;case"tagStartClose":n+=">";break;case"text":n+=i.redactedValue;break;case"tagEnd":n+=""}}return n},t}(),o6=function(){function t(){}return t.prototype.recompose=function(t,e){var r;return r=Array.isArray(e)?[]:{},0===t.length||t.forEach(function(t){var e=t.key,n=t.redactedValue,o=t.type;if(e){var i=e.split("."),a=r;i.forEach(function(t,e){var r=e===i.length-1,c=i[e+1],s="array-item"===o||!r&&void 0!==c&&!isNaN(Number(c));void 0===a[t]&&(a[t]=s?[]:{}),r?a[t]&&"string"==typeof a[t]?a[t]+=n:a[t]=n:a=a[t]})}}),r},t}();function o5(){o5=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}var o4=function(){function t(t,e,r,n){this.replaceTag=r||cA.DEFAULT,this.regexArray=[].concat(t),this.type=n||"DEFAULT_TYPE",this.keyWords=e}return t.prototype.redact=function(t,e,r){var n,o,i,a;return n=this,o=void 0,i=void 0,a=o5().mark(function n(){var o,i,a,c,s=this;return o5().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(t&&t.startsWith("=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}var o9=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,c)}s((n=n.apply(t,e||[])).next())})},o7=function(){function t(){this.middlewareRedactors=[],this.sensitive_data_found=!1,this.htmlDecomposer=new o0,this.elementDecomposer=new o1,this.htmlRecomposer=new o3,this.elementRecomposer=new o6}var e=t.prototype;return e.registerRedactor=function(t){if("function"!=typeof(null==t?void 0:t.redact))throw Error("Middleware must implement `redact(value: string, next: NextFunction): Promise` method");this.middlewareRedactors.push(t)},e.process=function(t,e){return o9(this,void 0,void 0,o8().mark(function r(){var n,o,i,a,c,s=this;return o8().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,this.sensitive_data_found=!1,"string"==typeof t||"object"==typeof t){r.next=4;break}return r.abrupt("return",Promise.resolve({originalInput:t,success:!1,error:Error("Input must be string or object")}));case 4:if("object"!=typeof t||null!==t){r.next=6;break}return r.abrupt("return",Promise.resolve({originalInput:t,success:!1,error:Error("Input object must not be null")}));case 6:return"string"==typeof t?(n=this.htmlDecomposer,o=this.htmlRecomposer):(n=this.elementDecomposer,o=this.elementRecomposer),i=n.decompose(t),r.next=10,Promise.all(i.map(function(t){return o9(s,void 0,void 0,o8().mark(function r(){var n,o,i;return o8().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!(e&&t.name&&e.has(t.name))){r.next=2;break}return r.abrupt("return",Object.assign(Object.assign({},t),{redactedValue:t.value}));case 2:if(!(null==(n=t.type)?void 0:n.includes("tag"))){r.next=4;break}return r.abrupt("return",Object.assign(Object.assign({},t),{redactedValue:""}));case 4:return o=t.value||"",r.next=7,this.dispatch(0,o);case 7:return(i=r.sent)!==o&&(this.sensitive_data_found=!0),r.abrupt("return",Object.assign(Object.assign({},t),{redactedValue:i}));case 10:case"end":return r.stop()}},r,this)}))}));case 10:return a=r.sent,c=o.recompose(a,t),r.abrupt("return",Promise.resolve({originalInput:t,success:!0,redactedOutput:c}));case 15:return r.prev=15,r.t0=r.catch(0),r.abrupt("return",Promise.resolve({originalInput:t,success:!1,error:r.t0}));case 18:case"end":return r.stop()}},r,this,[[0,15]])}))},e.createRedactor=function(t,e,r,n){void 0===t&&(t=[]),void 0===e&&(e=[]);var o=new o4(t,e,r);return n&&(o.redact=n),o},e.dispatch=function(t,e){return o9(this,void 0,void 0,o8().mark(function r(){var n,o,i,a=this;return o8().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(n=this.middlewareRedactors[t]){r.next=3;break}return r.abrupt("return",e);case 3:return o=function(r){return void 0===r&&(r=e),o9(a,void 0,void 0,o8().mark(function e(){return o8().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.dispatch(t+1,r));case 1:case"end":return e.stop()}},e,this)}))},r.prev=4,r.next=7,n.redact(e,o);case 7:return i=r.sent,r.abrupt("return",i);case 11:return r.prev=11,r.t0=r.catch(4),r.abrupt("return",o(e));case 14:case"end":return r.stop()}},r,this,[[4,11]])}))},e.isHasSensitiveData=function(){return this.sensitive_data_found},t}();function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ic(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function is(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){ic(i,n,o,a,c,"next",t)}function c(t){ic(i,n,o,a,c,"throw",t)}a(void 0)})}}function iu(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function il(t,e){return(il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ip=function(t,e){return function(r,n){e(r,n,t)}},ih="AutoConfig",id="tt_auto_config_v2_test",iv=function(t){function e(e,r,n,o){var i,a;return(i=t.call(this,{name:ih,reporters:r,context:e})||this).autoCollectedMetadata={},i.initializeVersion1=!1,i.initializeVersion2=!1,i.intent_data=[],i.currentPixelCode="",i.autoFormUpdateHandler=tc(function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var e={taskName:window.ttq._pf_tn||"auto_config_form_handler",functionName:window.ttq._pf_tn&&"auto_config_form_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="auto_config_form_handler")}}catch(t){}if(i.autoForm){if(i.autoCollectedFormDetail=i.autoForm.getOverallFormDetail(),i.autoCollectedFormDetail.length>3e4)return void A(a1.CUSTOM_ERROR,{message:""+String(i.autoCollectedFormDetail.length)},{custom_name:nN,custom_enum:cw.OVER_LENGTH});i.actTracker.report(cb.METADATA,cI.AUTO_FORM,{page_trigger:t,form_details:i.autoCollectedFormDetail})}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e),"auto_config_form_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},200,iu(i)),i.autoCollectionUpdateHandler=tc(function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var e={taskName:window.ttq._pf_tn||"auto_config_metadata_handler",functionName:window.ttq._pf_tn&&"auto_config_metadata_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="auto_config_metadata_handler")}}catch(t){}i.autoCollectedMetadata=function(t){var e={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{e.microdata=function(){if(!n6.getMetaData)return"[]";for(var t=document.querySelectorAll("[itemscope]"),e=[],r=n4(),n=0;n=0;o--){var i=t[o],a=i.getAttribute("itemtype");if("string"==typeof a&&""!==a){for(var c={},s=i.querySelectorAll("[itemprop]"),u=0;u0)return t.innerText;if(t.textContent&&t.textContent.length>0)return t.textContent}return""}(t)||""}return"string"==typeof e?n5(e):""}(f);if(null!=p){var h=c[l];null!=h&&function(t,e){return null!=[{property:"image",type:"Product"}].filter(function(r){return(t==="https://schema.org/"+r.type||t==="http://schema.org/"+r.type)&&r.property===e})[0]}(a,l)?Array.isArray(h)?c[l].push(p):c[l]=[h,p]:c[l]=p}}}}e.unshift({schema:{dimensions:{h:i.clientHeight,w:i.clientWidth},properties:n9(a)?{}:c,subscopes:[],type:a},scope:i})}}for(var d=[],v=[],_=0;_=0;E--)if(d[E].scope.contains(m)){d[E].schema.subscopes.push(y);break}else d.pop();0===d.length&&v.push(y),d.push({schema:y,scope:m})}var w=JSON.stringify(v);return w.length>3e4&&(w="[]",n6.getMicroData=!1),w}()}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"assemble_auto_config_failed",custom_enum:"microdata"})}try{var r=function(){if(!n6.getJSONLD)return{data:"[]",errors:[]};for(var t=[],e=[],r=document.querySelectorAll('script[type="application/ld+json"]'),n=0,o=0;o3e4)return n6.getJSONLD=!1,{data:JSON.stringify([]),errors:[{name:cE.OVER_LENGTH,message:""+String(n)}]};var a=void 0;try{a=JSON.parse(i.replace(/[\n\r\t]+/g," "))}catch(t){e.push({name:cE.ERROR_FORMAT,message:t.message})}try{a=function t(e){if("object"!=typeof e)return e;if(Array.isArray(e))return e.map(function(e){return t(e)});var r=Object.assign({},e),n=r["@type"];for(var o in r)"@type"!==o&&"@context"!==o&&("object"==typeof r[o]?r[o]=t(r[o]):n&&n9(n)&&delete r[o]);return r}(a)}catch(t){return{data:JSON.stringify([]),errors:[{name:cE.FILTER_SENSITIVE_FIELDS,message:t.message}]}}a&&t.push(a)}}return{data:JSON.stringify(t),errors:e}}(),n=r.data,o=r.errors;e.json_ld=n,o&&o.forEach(function(t){var e=t.name,r=t.message;A(a1.CUSTOM_ERROR,{message:r},{custom_name:"parse_json_ld_failed",custom_enum:e})})}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{e.open_graph=function(t){if(!n6.getOpenGraph)return"{}";for(var e=n4(["og","product","music","video","article","book","profile","website","twitter"]),r={},n=document.querySelectorAll("meta[property],meta[name]"),o=0;ot.width?e:t})}(t);r&&(e.image_url=r.src)}if(!e.destination){var n=n1(t);n&&(e.destination=n)}return e}(f));var l=(n={composedPath:a,container:c},o=nA.PRIORITY_CONFIG,i={},Object.entries(o).forEach(function(t){for(var e,r=t[0],o=t[1],a=nk(o);!(e=a()).done;){var c=n[e.value][r];if(c){i[r]=c;break}}}),i),p=l.destination||l.image_url;return f?l.from=cS.FIND_PRODUCT_CARD:l.from=cS.COMPOSED_PATH,p?l:null}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:"auto_click",custom_enum:"findRelatedParameter_error"}),null}}(e))&&!o&&P(a1.CUSTOM_INFO,{custom_name:"auto_click",custom_enum:"findRelatedParameter"}),!("v1"===r&&!a||"v2"===r&&!o&&!c)){t.next=7;break}return t.abrupt("return");case 7:if((i.ttqOptions.vids&&i.ttqOptions.vids.includes("74531382")||ej(id))&&i.queryDeepIntentData(),i.signal_insights_config&&o_(i.context,i.signal_insights_config),!a){t.next=22;break}return s=n0(n$(a)),t.next=14,i.sensitiveFilterRedactor.process(s,nD);case 14:if((u=t.sent).success){t.next=18;break}return A(a1.CUSTOM_ERROR,u.error,{custom_name:"auto_click",custom_enum:"sensitive_filter_error"}),t.abrupt("return");case 18:f=u.redactedOutput,function(t){var e,r,n=(null==(e=t.inner_text)?void 0:e.toString().toLowerCase())||"",o=(null==(r=t.image_url)?void 0:r.toString().toLowerCase())||"",i=[];if(t.attributes){var a=t.attributes;i=[a.class,a.id,a.name,a.type,a.value,a.destination].map(function(t){return(null==t?void 0:t.toString().toLowerCase())||""})}return[n,o].concat(i).some(nj)}(s)&&(f.filter_version=cR.V1),i.sensitiveFilterRedactor.isHasSensitiveData()&&(f.filter_version=(f.filter_version?f.filter_version+",":"")+cR.V2),i.reportButtonClick({triggerElement:f,intent_data:[].concat(i.intent_data,c?[c]:[])});case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(0),A(a1.CUSTOM_ERROR,t.t0,{custom_name:"auto_click",custom_enum:"auto_click_callback_error"});case 27:case"end":return t.stop()}},t,null,[[0,24]])})),i.autoClickCallback=function(t){return a.apply(this,arguments)},i.filter=n.auto_config||{open_graph:[],microdata:[],json_ld:[],meta:[]},i.actTracker=new oj(e,r,o,n),i.ttqOptions=n,i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,il(e,t);var r,n=e.prototype;return n.initBaseFeature=function(){var t=this.getAutoConfigVersion(this.currentPixelCode),e=this.reporters.some(function(t){return nq(t)});!this.initializeVersion2&&("v1"===t&&!this.initializeVersion1&&e&&(this.initializeVersion1=!0,this.initAutoCollection(),this.initInteractionListener(),this.initAutoClick(t)),"v2"===t&&e&&(this.initializeVersion1||(this.initAutoCollection(),this.initInteractionListener()),this.initAutoClick(t),this.initializeVersion2=!0))},n.initExtraFeature=function(){!this.autoForm&&(this.initializeVersion2||this.initializeVersion1)&&this.reporters.some(function(t){return nG(t,cI.AUTO_FORM)})&&this.initAutoForm(),this.initAutoVC()},n.queryDeepIntentData=function(){try{var t=function(){try{var t=(i=(o=tQ()).url,a=o.title,c=i.toLowerCase().includes(nx),s=a.toLowerCase().includes(nx),{isCheckoutPage:c||s,isUrlMatch:c,isTitleMatch:s}),e=t.isCheckoutPage,r=t.isUrlMatch,n=t.isTitleMatch;if(!e)return null;ir||(ir=!0,P(a1.CUSTOM_INFO,{custom_name:"auto_click",custom_enum:"checkout_page_identified",extJSON:{message:+!!r+"|"+ +!!n}}));for(var o,i,a,c,s,u,f=new Set([]),l=[],p=[],h=Array.from(document.getElementsByTagName("img")).filter(function(t){for(var e=t.className,r=0,n=Array.from(nA.INVALID_IMG_KEYWORDS);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(h);!(u=d()).done;){var v=u.value;if(l.length>nL.MAX_PRODUCTS_COUNT)break;if(!ie.has(v)){if(ie.add(v),!(v.height=0;n--){var o=t[n],i=n1(o);if(io(o))e=o,r.inner_text=ii(o.innerText),r.destination=i||r.destination;else break}if(!e||!r.inner_text||r.inner_text.length>nL.MAX_COMPRESS_STRING_LENGTH)return{intentData:null,containerNode:null};return{intentData:r,containerNode:e}}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:"auto_click",custom_enum:"reverseCheckoutPageInfo_error"}),{intentData:null,containerNode:null}}}(g),O=I.intentData,T=I.containerNode;T&&O&&(p.push(T),O.image_url=_,l.push(O))}}}}}if(function(t,e){if(!(t.length<=nL.MAX_PRODUCTS_COUNT)){for(var r=nB(e[nL.MAX_PRODUCTS_COUNT]),n=nL.MAX_PRODUCTS_COUNT,o=nL.MAX_PRODUCTS_COUNT-1;o>=0;o--)if(nY(r,nB(e[o]))>nL.INVALID_DATA_SIMILARITY_THRESHOLD)n--;else break;t.splice(n),e.splice(n)}}(l,p),0==l.length)return null;return l}catch(t){return A(a1.CUSTOM_ERROR,t,{custom_name:"auto_click",custom_enum:"queryCheckoutPageIntentData_error"}),null}}();t&&(this.intent_data=function(t){for(var e,r=new Set,n=[],o=nJ(t);!(e=o()).done;){var i=e.value,a=i.image_url;r.has(a)||(r.add(a),n.push(i))}return n}([].concat(this.intent_data,t)),P(a1.CUSTOM_INFO,{custom_name:"auto_click",custom_enum:"queryCheckoutPageIntentData",extJSON:{message:""+this.intent_data.length}}))}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"autoclick",custom_enum:"queryDeepIntentData"})}},n.initInteractionListener=function(){var t=this;this.reporters.some(function(t){var e=t.options;return e&&!1!==e.autoConfigListener})&&new ok([function(e){nU(t.autoCollectionUpdateHandler,t)(e)},function(e){nU(t.autoFormUpdateHandler,t)(e)}])},n.initAutoClick=function(t){var e=this;nS(ci.CLICK,function(t){e.autoClickCallback(t)},{throttle:!0,interval:1e3},t);try{if(this.sensitiveFilterRedactor)return;this.sensitiveFilterRedactor=new o7;var r=this.sensitiveFilterRedactor.createRedactor(oV,[],cA.EMAIL),n=this.sensitiveFilterRedactor.createRedactor(oB,[],cA.CREDIT_CARD),o=this.sensitiveFilterRedactor.createRedactor(oY,[],cA.ID_SSN),i=this.sensitiveFilterRedactor.createRedactor(oK,[],cA.PASSPORT),a=this.sensitiveFilterRedactor.createRedactor(oW,[],cA.DRIVING_LICENSE),c=this.sensitiveFilterRedactor.createRedactor(oH,[],cA.PHONE),s=this.sensitiveFilterRedactor.createRedactor([],oU);this.sensitiveFilterRedactor.registerRedactor(s),this.sensitiveFilterRedactor.registerRedactor(r),this.sensitiveFilterRedactor.registerRedactor(n),this.sensitiveFilterRedactor.registerRedactor(o),this.sensitiveFilterRedactor.registerRedactor(i),this.sensitiveFilterRedactor.registerRedactor(a),this.sensitiveFilterRedactor.registerRedactor(c)}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"auto_click",custom_enum:"sensitive_init_error"})}},n.initAutoVC=function(){var t=this;this.reporters.find(function(e){var r=og(e);return!!r&&(t.signal_insights_config=r,!0)})},n.initAutoCollection=function(){},n.initAutoForm=function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"initAutoForm",start:performance.now()}}catch(t){}this.autoForm=new ou(this.reporters),this.autoForm.addFormUpdateHandler(this.autoFormUpdateHandler.bind(this)),this.autoCollectedFormDetail=this.autoForm.getOverallFormDetail();try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(t){}},n.pixelDidMount=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"auto_config_plugin_pixelDidMount",start:performance.now()}}catch(t){}this.currentPixelCode=t.getReporterId(),this.initBaseFeature(),this.initExtraFeature();try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}},n.patchEnd=function(){this.initBaseFeature(),this.initExtraFeature()},n.pixelSend=function(t,e,r){var n=this.reporters.find(function(e){return e.getReporterId()===t});if(this.currentPixelCode=t,this.signal_insights_config&&o_(this.context,this.signal_insights_config),n&&og(n)&&(oA(ox)||oA(oC))){(z(e)||"Pageview"===e||"InitiateCheckout"===e||"PlaceAnOrder"===e)&&(o=oA(ox));var o,i=oA(oC);r.auto_collected_properties={vc_properties:Object.assign(Object.assign({},o&&{value:o.value,currency:o.currency,ori_value:o.ori_value,rule_key:o.rule_key}),i&&{parameter_inference:i})}}z(e)&&setTimeout(function(){oL(ox)},500),"Pageview"===e&&(!n||nq(n))&&(nU(this.autoCollectionUpdateHandler,this)(cT.PAGE_VIEW),nU(this.autoFormUpdateHandler,this)(cT.PAGE_VIEW))},n.pageUrlDidChange=function(t,e){null!=e&&""!=e&&(this.autoCollectionUpdateHandler(cT.URL_CHANGE),this.autoFormUpdateHandler(cT.URL_CHANGE))},n.pageWillLeave=function(){this.autoCollectionUpdateHandler(cT.PAGE_LEAVE),this.autoFormUpdateHandler(cT.PAGE_LEAVE)},r=is(ia().mark(function t(e){var r,n,o,i;return ia().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=oA(ox)||void 0,(n=oA(oC)||void 0)&&((r=r||{}).parameter_inference=n),("v1"==(this.initializeVersion2?"v2":"v1")||"1"===ej(id))&&(e.intent_data=e.intent_data.filter(function(t){return t.from===cS.CHECKOUT})),o=void 0,e.intent_data.length){t.next=10;break}o=void 0,t.next=14;break;case 10:return t.next=12,this.sensitiveFilterRedactor.process(e.intent_data,new Set(nC));case 12:(i=t.sent).success&&(o=i.redactedOutput);case 14:this.actTracker.report(cb.CLICK,cI.AUTO_VC,{page_trigger:cT.CLICK,trigger_element:e.triggerElement,vc_properties:r,intent_data:o}),this.actTracker.report(cb.CLICK,cI.AUTO_VC_REVERSE,{page_trigger:cT.CLICK,trigger_element:e.triggerElement,intent_data:o});case 16:case"end":return t.stop()}},t,this)})),n.reportButtonClick=function(t){return r.apply(this,arguments)},n.getAutoConfigVersion=function(t){var e=this.reporters.find(function(e){return e.getReporterId()===t});if(!e)return"v1";var r=e.plugins,n=r&&r.AutoConfigV2,o=this.ttqOptions.vids&&this.ttqOptions.vids.includes("74539885");return ej(id)||n&&o?"v2":"v1"},e}(no);iv=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),ip(0,ef(t$.CONTEXT)),ip(1,ef(t$.TTQ_REPORTERS)),ip(2,ef(t$.TTQ_GLOBAL_OPTIONS)),ip(3,ef(t$.REPORT_SERVICE))],iv);var i_=r(278),ig=r.n(i_),im={EMPTY_EVENT_TYPE_NAME:{title:"Missing Event Name",desc:"The event name for one or more of your events is empty. This can affect the accuracy of reporting for your conversions.",suggestion:"Go to your source code and add a name that follows our format requirements and TikTok policies.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890973258754"},INVALID_CONTENT_ID:{title:"Missing value for content ID",desc:"Include a value for your 'content_id' parameter. This is required for Video Shopping Ads (VSA).",suggestion:"If you are or plan to run Video Shopping Ads (VSA), go to your source code and include a value for the 'content_id' parameter.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CONTENT_TYPE:{title:"Invalid content type",desc:'The content type for one or more of your events is not valid. Content type must be either "product", "product_group", "destination", "hotel", "flight" or "vehicle".',suggestion:"Go to your source code and update the content type.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CURRENCY_CODE:{title:"Invalid currency code",desc:"The currency code for one or more of your events isn't supported. This can affect the accuracy of reporting for your ROAS.",suggestion:"Go to your source code and update the 'currency' parameters with a supported currency code.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_EMAIL_FORMAT:{title:"Incorrect email format",desc:"The email format for your events does not match the format supported. This can impact Advanced Matching and your ad performance.",suggestion:"Go to your source code and update the format of your shared emails. It should follow 'xxx@xxx.com' format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EMAIL_INFORMATION:{title:"Invalid email information",desc:"The emails shared with your events were invalid.",suggestion:'Go to your source code to double check shared emails. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EVENT_PARAMETER_VALUE:{title:"Invalid value parameter",desc:"The 'value' parameter for one or more of your events is invalid. This is used calculate ROAS for people and the bid for your highest value customers. Parameters must be an integer or in the decimal format (e.g. 9.99). Also, they can't contain currency symbols, special characters, letters, or commas.",suggestion:"Go to your source code and update the 'value' parameter. It can only include numbers greater than or equal to zero (e.g. 9.99). Do not include currency symbols, special characters, letters, or commas.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_PHONE_NUMBER_FORMAT:{title:"Incorrect phone number format",desc:"The phone number format for your events doesn't follow the E.164 format. This can affect Advanced Matching and your ad performance.",suggestion:"Go to your source code and update your shared phone numbers. It should follow the E.164 format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_PHONE_NUMBER_INFORMATION:{title:"Invalid phone number information",desc:"The phone numbers shared with your events were invalid.",suggestion:'Go to your source code to double check shared phone numbers. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},LONG_EVENT_TYPE_NAME:{title:"Event Name Too Long",desc:"1 event type exceeds the 50 character limit.",suggestion:"Go to your source code and make these event names 50 characters or less.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT:{title:"Invalid Event Name Format",desc:"1 event name was rejected for not following TikTok format requirements.",suggestion:"Go to your source code and update these event types according to TikTok format requirements.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISSING_CONTENT_ID:{title:"Missing 'content_id' paramter",desc:"The 'content_id' parameter isn't being received. This is required for Video Shopping Ads (VSA).",suggestion:"Include the 'content_id' parameter in your source code. This is required for Video Shopping Ads (VSA).",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_CURRENCY_PARAMETER:{title:'Missing "currency" parameter',desc:"Events shared are missing a 'currency' parameter. This impacts our ability to receive the value amount correctly, which can affect the accuracy of reporting for your return on ad spend.",suggestion:'Go to your source code and include the "currency" parameter. You can check supported currency codes. {{learn_more}}',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_EMAIL_AND_PHONE:{title:"Missing email and phone number",desc:"Email and phone number info isn't being received. This information is required for Complete Payment events.",suggestion:"Improve your email and phone coverage. This allows you to attribute more conversions and reach more people with your ads.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890972946433"},MISSING_VALUE_PARAMETER:{title:'Missing "value" parameter',desc:"Events shared are missing a 'value' parameter'. This is used calculate ROAS for people and the bid for your highest value customers. ",suggestion:'Go to your source code and include the "value" parameter.',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},DUPLICATE_PIXEL_CODE:{title:"Duplicate Pixel ID",desc:"The pixel ID is duplicate. This could impact the pixel data accuracy.",suggestion:"Please double check and delete any unnecessary pixel code.",link:""},MISSING_PIXEL_CODE:{title:"Missing pixel ID",desc:"Some of the events sent to your TikTok account are missing a pixel ID.",suggestion:"Go to your source code and double check that the 20-character pixel ID has been added to the ttq.load() function. Don't send null values or spaces. If you edited the base code, ensure the event.js has the 'sdkid' in the Chrome network panel.",link:""},INVALID_PIXEL_CODE:{title:"Invalid pixel ID",desc:"The pixel ID is invalid. This could prevent your pixel from receiving data.",suggestion:"Please go to Events Manager and find the correct pixel ID.",link:""}},iy=/^[a-zA-Z\d]([a-zA-Z_\-\d ]{0,}[a-zA-Z_\-\d])?$/,iE=["product","product_group","destination","hotel","flight","vehicle"],iw=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],ib=["Purchase","CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],iI=function(t){return void 0===t},iO=function(t,e){if(cl[t]){var r=_(),n=im[t],o="[TikTok Pixel] - "+n.title;n.desc&&(o+="\nIssue: "+n.desc),n.suggestion&&(o+="\nSuggestion: "+n.suggestion),e&&Object.keys(e).forEach(function(t){o=o.split("{{"+t+"}}").join(e[t])}),o=o.trim(),n.link&&(o+=" See "+n.link+" for more information."),r&&r.console&&r.console.warn&&r.console.warn(o)}};(aW=cL||(cL={}))[aW.Live=0]="Live",aW[aW.NoRecord=1]="NoRecord";var iT=function(t){var e=t.event,r=void 0===e?"":e;return!!(["null","undefined"].includes(r)||/^\s*$/.test(r))||!r},iR=function(t){var e=t.event;return!!iT(t)||iy.test(void 0===e?"":e)},iS=function(t){var e=t.event;return(void 0===e?"":e).length<=50},iN=function(t){var e=t.event,r=t._inspection;if(z(e)){var n=(void 0===r?{}:r).identity_params,o=void 0===n?{}:n;return 0===Object.keys(o).length||iw.every(function(t){return(o[t]||[]).includes(a5.EMPTY_VALUE)})}return!1},iP=function(t){var e=t._inspection,r=void 0===e?{}:e;return!!r&&!!r.identity_params&&((r.identity_params.email_is_hashed||[]).includes(a5.FILTER_EVENTS)||(r.identity_params.sha256_email||[]).includes(a5.FILTER_EVENTS))},iA=function(t){var e=t._inspection,r=void 0===e?{}:e;return!!r&&!!r.identity_params&&((r.identity_params.email_is_hashed||[]).includes(a5.UNKNOWN_INVALID)||(r.identity_params.sha256_email||[]).includes(a5.UNKNOWN_INVALID))},iL=function(t){var e=t._inspection,r=void 0===e?{}:e;return!!r&&!!r.identity_params&&((r.identity_params.phone_is_hashed||[]).includes(a5.FILTER_EVENTS)||(r.identity_params.sha256_phone||[]).includes(a5.FILTER_EVENTS))},ix=function(t){var e=t._inspection,r=void 0===e?{}:e;return!!r&&!!r.identity_params&&((r.identity_params.phone_is_hashed||[]).includes(a5.UNKNOWN_INVALID)||(r.identity_params.sha256_phone||[]).includes(a5.UNKNOWN_INVALID))},iC=function(t){var e=t.event,r=t.properties,n=void 0===r?{}:r;if(ib.includes(void 0===e?"":e)){if(iI(n.contents)&&iI(n.content_id))return!0;if(!iI(n.contents))return!Array.isArray(n.contents)||n.contents.length<1||!n.contents.every(function(t){return t&&!iI(t.content_id)})}return!1},iD=function(t){var e=t.properties,r=void 0===e?{}:e,n=r.content_id,o=r.contents;return!(!iI(n)&&/^\s*$/.test(n))&&(!(!iI(o)&&Array.isArray(o))||o.every(function(t){return t&&!iI(t.content_id)&&!/^\s*$/.test(t.content_id)}))},ik=function(t){var e=t.properties.content_type;return!e||iE.includes(e)},iM=function(t){var e=t.properties.value;return!e||!!("number"==typeof e||"string"==typeof e&&(/^\d+(\.\d+)?$/.test(e)||/^\d+$/.test(e)))},ij=function(t){var e=t.event,r=t.properties,n=void 0===r?{}:r;return!!(z(void 0===e?"":e)&&iI(n.value)||!iI(n.currency)&&iI(n.value))},iF=function(t){var e=t.properties.currency;return!e||e8.includes(e)},iU=function(t){var e=t.event,r=t.properties,n=void 0===r?{}:r;return!!(z(void 0===e?"":e)&&iI(n.currency)||!iI(n.value)&&iI(n.currency))};function iq(t,e){return(iq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var iG=function(t,e){return function(r,n){e(r,n,t)}},iH=function(t){function e(e,r,n){var o,i;return(o=t.call(this,{name:"DiagnosticsConsole",reporters:r,context:e})||this).isEnableDiagnosticsConsole=!1,o.isEnableDiagnosticsConsole=!!(null==(i=null==n?void 0:n.plugins)?void 0:i.DiagnosticsConsole),o}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,iq(e,t);var r=e.prototype;return r.isDisableDiagnosticsConsole=function(){try{if(this.isEnableDiagnosticsConsole)return!!Object.values(this.reporters).some(function(t){var e,r;return void 0!==(null==(e=null==t?void 0:t.options)?void 0:e.diagnostics)&&!(null==(r=null==t?void 0:t.options)?void 0:r.diagnostics)});return!0}catch(t){return!1}},r.warn=function(t,e){try{if(this.isDisableDiagnosticsConsole())return;iO(t,e)}catch(e){A(a1.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:t})}},r.pixelDidMount=function(t){var e=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"console_plugin_pixelDidMount",start:performance.now()}}catch(t){}t.getParameterInfo().then(function(t){e.handlePixelInfoValidate(t)}).catch(function(t){A(a1.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:"pixel"})});try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(t){}},r.pixelSend=function(t,e,r,n,o){void 0===n&&(n={});try{n&&n._i||o!==ch.TRACK||e===e6||this.handleEventPayloadValidate(ig()(r||{}))}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:"track"})}},r.handlePixelInfoValidate=function(t){if(t.status!==cL.Live)return void this.warn(cl.INVALID_PIXEL_CODE)},r.handleEventPayloadValidate=function(t){t.properties||(t.properties={}),iT(t)&&this.warn(cl.EMPTY_EVENT_TYPE_NAME),iR(t)||this.warn(cl.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),iS(t)||this.warn(cl.LONG_EVENT_TYPE_NAME),iN(t)&&this.warn(cl.MISSING_EMAIL_AND_PHONE),iP(t)&&this.warn(cl.INVALID_EMAIL_INFORMATION),iA(t)&&this.warn(cl.INVALID_EMAIL_FORMAT),iL(t)&&this.warn(cl.INVALID_PHONE_NUMBER_INFORMATION),ix(t)&&this.warn(cl.INVALID_PHONE_NUMBER_FORMAT),iC(t)&&this.warn(cl.MISSING_CONTENT_ID),iD(t)||this.warn(cl.INVALID_CONTENT_ID),ik(t)||this.warn(cl.INVALID_CONTENT_TYPE),iM(t)||this.warn(cl.INVALID_EVENT_PARAMETER_VALUE),ij(t)&&this.warn(cl.MISSING_VALUE_PARAMETER),iF(t)||this.warn(cl.INVALID_CURRENCY_CODE),iU(t)&&this.warn(cl.MISSING_CURRENCY_PARAMETER,{learn_more:""})},e}(no);function iV(t,e){return(iV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}iH=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),iG(0,ef(t$.CONTEXT)),iG(1,ef(t$.TTQ_REPORTERS)),iG(2,ef(t$.TTQ_GLOBAL_OPTIONS))],iH);var iB=function(t,e){return function(r,n){e(r,n,t)}},iY=function(t){function e(e,r,n,o){var i;return(i=t.call(this,{name:"PangleCookieMatching",reporters:r,context:e})||this).hasReport=!1,i.reportService=n,i.env=o,i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,iV(e,t);var r=e.prototype;return r.isPixelPangleCookieMatching=function(t){void 0===t&&(t="");var e=this.reporters;if(t){var r=e.find(function(e){return e.getReporterId()===t});if(r&&r.plugins.PangleCookieMatching)return!0}else if(e.some(function(t){return!!t.plugins.PangleCookieMatching}))return!0;return!1},r.disablePangleCookie=function(){this.isPixelPangleCookieMatching()&&e1("https://analytics.pangle-ads.com/api/v2/pangle_disable_cookie")},r.pixelSend=function(t,e,r,n,o){void 0===n&&(n={});try{var i;if((null==(i=this.context.getPageSign().pageIndex)?void 0:i.index)===0&&!tI(this.env)&&r&&r.message_id&&this.isPixelPangleCookieMatching(t)&&!this.hasReport){var a=r.event,c=r.message_id,s=r.context.library,u={event:a,message_id:c,context:{library:s},timestamp:new Date().toJSON()};this.hasReport=!0,this.reportService.report("https://analytics.pangle-ads.com/api/v2/pangle_pixel",u,cv.httpReport)}}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"pangle_report"})}},e}(no);iY=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),iB(0,ef(t$.CONTEXT)),iB(1,ef(t$.TTQ_REPORTERS)),iB(2,ef(t$.REPORT_SERVICE)),iB(3,ef(t$.ENV))],iY);var iK="https://analytics.tiktok.com/i18n/pixel/eb.js",iW="_tt_event_builder";function iJ(t,e){return(iJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(aJ=cx||(cx={})).EVENT_BUILD_BOOTSTRAP_ACK="event_builder_bootstrap_ack",aJ.EVENT_BUILD_WRONG_CODE="event_builder_wrong_code",aJ.EVENT_BUILD_BOOTSTRAP="event_builder_bootstrap";var iX=function(t,e){return function(r,n){e(r,n,t)}},iQ=function(t){function e(e,r){var n;return(n=t.call(this,{name:"EventBuilder",reporters:r,context:e})||this).pluginMounted=!1,n}return e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,iJ(e,t),e.prototype.pixelDidMount=function(t){var e=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"event_builder_plugin_pixelDidMount",start:performance.now()}}catch(t){}if(!this.pluginMounted){this.pluginMounted=!0;var n=m(),o=function(t){t.data.type===cx.EVENT_BUILD_BOOTSTRAP&&!n._event_builder_pickup_sdk_loaded&&(e.reporters.find(function(e){return e.getReporterId()===t.data.pixelCode})?(n._event_builder_pickup_sdk_loaded=!0,ed(iW,t.data),e1(iK).then(function(){window.opener.window.postMessage({type:cx.EVENT_BUILD_BOOTSTRAP_ACK},"*")}).catch(function(t){A(a1.CUSTOM_ERROR,t,{custom_name:"event_builder_load_error",custom_enum:"load_ebjs"})})):n._event_builder_pickup_sdk_verify_flag||(setTimeout(function(){e.reporters.find(function(e){return e.getReporterId()===t.data.pixelCode})||window.opener.window.postMessage({type:cx.EVENT_BUILD_WRONG_CODE},"*")},5e3),n._event_builder_pickup_sdk_verify_flag=!0))};!n._event_builder_pickup_sdk_loaded&&(ep(iW)?e1(iK).then(function(){n._event_builder_pickup_sdk_loaded=!0}):window.opener&&(window.addEventListener("message",o),setTimeout(function(){window.removeEventListener("message",o)},8e3)));try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(t){}}},e}(no);function iZ(t,e){return(iZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}iQ=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),iX(0,ef(t$.CONTEXT)),iX(1,ef(t$.TTQ_REPORTERS))],iQ);var iz=function(t,e){return function(r,n){e(r,n,t)}},i$="tt_pixel_is_enrich_ipv6_triggered_by_enrich_am",i0=function(t){function e(e,r,n,o){var i;return(i=t.call(this,{name:"EnrichIpv6",reporters:r,context:e})||this).hasReported=!1,i.shouldReportAfterEnrichAM=!1,i.reportService=n,i.env=o,i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,iZ(e,t);var r=e.prototype;return r.isPixelEnrichIpv6=function(){var t=this.reporters;return!!t&&0!==t.length&&t.every(function(t){return t&&t.plugins&&!0===t.plugins.EnrichIpv6})},r.isEnrichIpv6V2SwitchOn=function(){var t="EnrichIpv6V2";try{var e=m()._plugins||{};if(null!=e[t])return!!e[t];return!1}catch(t){return!1}},r.buildEnrichIpv6Data=function(t){var e=this.isEnrichIpv6V2SwitchOn()?"#source=2":"#source=1";return Object.assign(Object.assign({},t),{event:"EnrichIpv6",trigger_event:t.event,message_id:t.message_id+e})},r.pixelSend=function(t,e,r,n,o){void 0===n&&(n={});try{var i;if(o!==ch.TRACK||!("Shopify"===O(t)||this.isEnrichIpv6V2SwitchOn())||tI(this.env)||!(r&&r.message_id)||((null==(i=this.context.getPageSign().pageIndex)?void 0:i.index)===0&&!this.hasReported&&this.isPixelEnrichIpv6()&&(this.hasReported=!0,this.reportService.report(eO,this.buildEnrichIpv6Data(r),cv.htmlHttpReport)),"true"===sessionStorage.getItem(i$)))return;"EnrichAM"===e&&(this.shouldReportAfterEnrichAM=!0),this.shouldReportAfterEnrichAM&&this.isPixelEnrichIpv6()&&(this.shouldReportAfterEnrichAM=!1,sessionStorage.setItem(i$,"true"),this.reportService.report(eO,this.buildEnrichIpv6Data(r),cv.htmlHttpReport))}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"enrich_ipv6_report"})}},e}(no);function i1(t){return performance&&performance.timing?t?Date.now()-t:Date.now()-performance.timing.navigationStart:-1}function i2(t,e){return function(){for(var r=arguments.length,n=Array(r),o=0;o=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),iz(0,ef(t$.CONTEXT)),iz(1,ef(t$.TTQ_REPORTERS)),iz(2,ef(t$.REPORT_SERVICE)),iz(3,ef(t$.ENV))],i0),(aX=cC||(cC={})).FIRST_CONTENTFUL_PAINT="fcp",aX.LARGEST_CONTENTFUL_PAINT="lcp",aX.FIRST_INPUT_DELAY="fid",aX.TIME_TO_FIRST_BYTE="ttfb",aX.PAGE_LEAVE="pl",aX.LOAD_FINISH="lf",aX.TIME_WINDOW_TRACKER="twt",aX.TIME_TO_INTERACTIVE="tti";var i6=function(){function t(t,e,r,n){n?(this.reportService=r,this.context=t,this.reporters=e,this.reportUrl=n):A(a1.CUSTOM_ERROR,Error("empty reportUrl"),{custom_name:"empty_reportUrl",custom_enum:"page_perf_monitor"})}var e=t.prototype;return e.getResult=function(t){return{action_event:t}},e.report=function(t){var e=this;if(void 0!==t){var r=this.getReportPixelList(),n=this.assemblyReportData(ch.PAGE,t,r);n&&this.reportService.reportPreTasks.then(function(){e.reportService.report(e.reportUrl,n,cv.defaultReport,c_.P0)}),this.resetAfterReport()}},e.getReportPixelList=function(){return this.reporters},e.assemblyReportData=function(t,e,r){if(0!==r.length){var n,o=r.map(function(t){return t.getReporterId()}),i=this.context.getPageSign(),a=r[0],c=a.assemblyData(a.getReporterId(),"",{},{},ch.PAGE);return delete c.event,c.action=t,c.auto_collected_properties=e,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=o[0],c.context.pixel.codes=o.join("|"),c.context.index=null==(n=i.pageIndex)?void 0:n.index,c.context.session_id=i.sessionId,c.context.pageview_id=B(this.context.getPageViewId(),a.reporterInfo.loadId,"::"),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}},t}();function i5(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.rules);!(t=e()).done;){var r=t.value;try{if(!r({clickTimes:this.clickTimesTotal,scrollTimes:this.scrollTimesTotal,stayTime:this.stayTime}))return!1}catch(t){return!1}}return!0},r.isUpdated=function(){return 0!=this.clickTimes||0!=this.scrollTimes},r.resetAfterReport=function(){this.clickTimes=0,this.scrollTimes=0},e}(i6),cU=function(t){setTimeout(function(){t(cC.TIME_TO_INTERACTIVE,-1)},0)},cq=function(t){var e=function(){new Promise(function(t,e){setTimeout(function(){var r=performance.getEntriesByType("navigation");if(r.length>0){var n=r[0];t(n.loadEventEnd-n.startTime)}else window.performance.timing?t(window.performance.timing.loadEventEnd-window.performance.timing.navigationStart||-1):e("Performance timing not supported")},0)}).then(function(e){t(cC.LOAD_FINISH,e)}).catch(function(e){t(cC.LOAD_FINISH,-1)})};"complete"===window.document.readyState?e():window.addEventListener("load",e)},cG=-1,cH=function(t){addEventListener("pageshow",function(e){e.persisted&&(cG=e.timeStamp,t(e))},!0)},cV=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},cB=function(){var t=cV();return t&&t.activationStart||0},cY=function(t,e){var r=cV(),n="navigate";return cG>=0?n="back-forward-cache":r&&(document.prerendering||cB()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(0x82f79cd8fff*Math.random())+1e12),navigationType:n}},cK=function(t,e,r){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var n=new PerformanceObserver(function(t){Promise.resolve().then(function(){e(t.getEntries())})});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch(t){}},cW=function(t,e,r,n){var o,i;return function(a){var c;e.value>=0&&(a||n)&&((i=e.value-(o||0))||void 0===o)&&(o=e.value,e.delta=i,c=e.value,e.rating=c>r[1]?"poor":c>r[0]?"needs-improvement":"good",t(e))}},cJ=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},cX=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},cQ=function(t){var e=!1;return function(r){e||(t(r),e=!0)}},cZ=-1,cz=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},c$=function(t){"hidden"===document.visibilityState&&cZ>-1&&(cZ="visibilitychange"===t.type?t.timeStamp:0,c1())},c0=function(){addEventListener("visibilitychange",c$,!0),addEventListener("prerenderingchange",c$,!0)},c1=function(){removeEventListener("visibilitychange",c$,!0),removeEventListener("prerenderingchange",c$,!0)},c2=function(){return cZ<0&&(cZ=cz(),c0(),cH(function(){setTimeout(function(){cZ=cz(),c0()},0)})),{get firstHiddenTime(){return cZ}}},c3=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},c6=[1800,3e3],c5=function(t,e){e=e||{},c3(function(){var r,n=c2(),o=cY("FCP"),i=cK("paint",function(t){t.forEach(function(t){"first-contentful-paint"===t.name&&(i.disconnect(),t.startTimen.value&&(n.value=o,n.entries=i,r())},c=cK("layout-shift",a);c&&(r=cW(t,n,c4,e.reportAllChanges),cX(function(){a(c.takeRecords()),r(!0)}),cH(function(){o=0,r=cW(t,n=cY("CLS",0),c4,e.reportAllChanges),cJ(function(){return r()})}),setTimeout(r,0))}))},c9={passive:!0,capture:!0},c7=new Date,st=function(t,e){cD||(cD=e,ck=t,cM=new Date,sn(removeEventListener),se())},se=function(){if(ck>=0&&ck1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?(e=function(){st(o,t),n()},r=function(){n()},n=function(){removeEventListener("pointerup",e,c9),removeEventListener("pointercancel",r,c9)},addEventListener("pointerup",e,c9),addEventListener("pointercancel",r,c9)):st(o,t)}},sn=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,sr,c9)})},so=[100,300],si=function(t,e){e=e||{},c3(function(){var r,n=c2(),o=cY("FID"),i=function(t){t.startTimeperformance.now())return;r.value=Math.max(i-cB(),0),r.entries=[o],n(!0),cH(function(){(n=cW(t,r=cY("TTFB",0),su,e.reportAllChanges))(!0)})}})};function sp(t,e){return(sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sh=function(t,e){return function(r,n){e(r,n,t)}},sd=function(t){function e(e,r,n,o){var i;return(i=t.call(this,e,r,n,o)||this).cls=-1,i.init(),i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sp(e,t);var r=e.prototype;return r.init=function(){c8(this.clsHandler.bind(this),{reportAllChanges:!0}),sl(this.webVitalHandler.bind(this)),c5(this.webVitalHandler.bind(this)),ss(this.webVitalHandler.bind(this),{reportAllChanges:!0}),si(this.webVitalHandler.bind(this)),cU(this.baseHandler.bind(this)),cq(this.baseHandler.bind(this))},r.getResult=function(t){var e=Math.floor(i1()),r={ttns:e,cls:i3(this.cls),idx:this.getSessionIndex(),pep:i3(this.getPep())},n=["cls","idx","pep"];n.unshift(t);var o={metrics_type:n.join("|"),cls:r.cls,idx:r.idx,pep:r.pep};return o[t]=e,{action_event:t,perf:r,page_perf:o}},r.resetAfterReport=function(){},r.clsHandler=function(t){this.cls=t.value||-1},r.webVitalHandler=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var e,r={taskName:window.ttq._pf_tn||"page_data_web_vital_handler",functionName:window.ttq._pf_tn&&"page_data_web_vital_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="page_data_web_vital_handler")}}catch(t){}var n=this.getResult(t.name.toLocaleLowerCase());n.perf&&(n.perf.ttns=(null==t?void 0:t.value)?Math.floor(t.value):-1),n.page_perf&&(n.page_perf[t.name.toLocaleLowerCase()]=null==(e=null==n?void 0:n.perf)?void 0:e.ttns),this.report(n),this.resetAfterReport();try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"page_data_web_vital_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},r.baseHandler=function(t,e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r,n={taskName:window.ttq._pf_tn||"page_data_base_handler",functionName:window.ttq._pf_tn&&"page_data_base_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="page_data_base_handler")}}catch(t){}var o=this.getResult(t);o.perf&&(o.perf.ttns=e?Math.floor(e):-1),o.page_perf&&(o.page_perf[t]=null==(r=o.perf)?void 0:r.ttns),this.report(o),this.resetAfterReport();try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),"page_data_base_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}},r.getSessionIndex=function(){var t,e=null==(t=this.context.getPageSign().pageIndex)?void 0:t.main;return null==e?-1:e},r.getCurrScrollPosition=function(){return document.documentElement.scrollTop||document.body.scrollTop},r.getViewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},r.getMaxHeight=function(){var t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)},r.getPep=function(){return(this.getCurrScrollPosition()+this.getViewportHeight())/this.getMaxHeight()},e}(i6);sd=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([sh(0,ef(t$.CONTEXT)),sh(1,ef(t$.TTQ_REPORTERS)),sh(2,ef(t$.REPORT_SERVICE))],sd);var sv=[function(t){var e=t.clickTimes,r=t.scrollTimes;return e>=1||r>=1},function(t){return t.stayTime>1e3}];function s_(t,e){return(s_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sg=function(t,e){return function(r,n){e(r,n,t)}},sm=function(t){function e(e,r,n,o){var i;return(i=t.call(this,{name:"PageData",reporters:r,context:e})||this).monitors=[],i.ttqOptions={},i.reportService=n,i.context=e,i.reporters=r,i.ttqOptions=o,i.isPluginInit=!1,i}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,s_(e,t);var r=e.prototype;return r.init=function(){var t=this.isPageInterEnabled(),e=this.isPagePerfEnabled();(t||e)&&(t&&this.initInteraction(),e&&this.initPerformance())},r.initInteraction=function(){this.interactionMonitor=new cF(this.context,this.reporters,this.reportService,e7(ch.PAGE_INTERACTION),sv),this.monitors.push(this.interactionMonitor)},r.initPerformance=function(){this.performanceMonitor=new sd(this.context,this.reporters,this.reportService,e7(ch.PAGE_PERFORMANCE)),this.monitors.push(this.performanceMonitor)},r.isPagePerfEnabled=function(){var t,e;return null==(e=null==(t=this.ttqOptions)?void 0:t.plugins)?void 0:e.PageData},r.isPageInterEnabled=function(){var t,e;return null==(e=null==(t=this.ttqOptions)?void 0:t.plugins)?void 0:e.PageData},r.report=function(t){var e=this.interactionMonitor.getResultOnPageLeave(t);void 0!==e&&(this.interactionMonitor.report(e),this.interactionMonitor.resetAfterReport())},r.pageWillLeave=function(t){this.report(cC.PAGE_LEAVE)},r.pixelDidMount=function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"page_plugin_pixelDidMount",start:performance.now()}}catch(t){}this.isPluginInit||(this.init(),this.isPluginInit=!0);try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(t){}},e}(no);sm=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),sg(0,ef(t$.CONTEXT)),sg(1,ef(t$.TTQ_REPORTERS)),sg(2,ef(t$.REPORT_SERVICE)),sg(3,ef(t$.TTQ_GLOBAL_OPTIONS))],sm);var sy={initAllModule:1,webTtqFactory:2,handleCache:3,webReporterFactory:4,initAutoForm:5,auto_config_plugin_pixelDidMount:6,callback_plugin_pixelDidMount:7,console_plugin_pixelDidMount:8,event_builder_plugin_pixelDidMount:9,shopify_plugin_pixelDidMount:10,page_plugin_pixelDidMount:11,competitor_insight_plugin_init:12,getPixelInstalledPosition:13,getPixelScriptByPixelCode:14,resetExpires:15,freezeAPI:16,handlePixelRules:17,mergeWebGlobalTtq:18,handleGlobalCache:22,getPixelDetail:19,basettq_init_context_info:20,initAutoForm_getOverallFormDetail:21,web_track_handler:23,identify_api_handler:24,updateParameterInferenceData:25},sE={identify_api_handler:{id:1,fn:[]},identify_encryption:{id:2,fn:[]},identify_after_encryption:{id:3,fn:[]},track_api_handler:{id:4,fn:[]},track_after_reporter_init:{id:5,fn:[]},track_after_report_preposition:{id:6,fn:[]},init:{id:7,fn:[sy.initAllModule,sy.webTtqFactory,sy.handleCache,sy.webReporterFactory,sy.initAutoForm,sy.freezeAPI,sy.handlePixelRules,sy.resetExpires,sy.mergeWebGlobalTtq,sy.auto_config_plugin_pixelDidMount,sy.callback_plugin_pixelDidMount,sy.console_plugin_pixelDidMount,sy.event_builder_plugin_pixelDidMount,sy.shopify_plugin_pixelDidMount,sy.page_plugin_pixelDidMount,sy.competitor_insight_plugin_init,sy.getPixelInstalledPosition,sy.getPixelScriptByPixelCode,sy.handleGlobalCache,sy.basettq_init_context_info,sy.initAutoForm_getOverallFormDetail,sy.web_track_handler,sy.identify_api_handler,sy.updateParameterInferenceData]},page_api_handler:{id:8,fn:[]},auto_advanced_matching_handler:{id:9,fn:[]},auto_config_metadata_handler:{id:10,fn:[]},auto_config_click_handler:{id:11,fn:[]},auto_config_form_handler:{id:12,fn:[]},event_builder_dispatcher:{id:13,fn:[]},page_data_web_vital_handler:{id:14,fn:[]},page_data_base_handler:{id:15,fn:[]}},sw=function(){function t(){this.queue=[],this.currentTaskMap={}}var e=t.prototype;return e.handleCache=function(t){var e=this;t.forEach(function(t){e.push(t)})},e.push=function(t){var e=t.taskName,r=t.functionName,n=t.start,o=Math.round((t.end-n)*1e3),i=e&&this.getTaskIdFromName(e);if(i){var a=this.currentTaskMap[i];if(a||(this.currentTaskMap[i]=a={id:i,d:-1}),r){var c=this.getFunctionIdFromName(r);c&&(a.f=[].concat(a.f||[],[{id:c,d:o}]))}else a.d=o,this.queue.push(a),delete this.currentTaskMap[i]}},e.print=function(){return this.queue},e.printAndClear=function(){var t=this.print();return this.clear(),t},e.clear=function(){this.queue=[]},e.getTaskIdFromName=function(t){var e;return null==(e=sE[t])?void 0:e.id},e.getFunctionIdFromName=function(t){return sy[t]},t}();function sb(t,e){return(sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sI=function(t,e){return function(r,n){e(r,n,t)}},sO=function(t){function e(e,r){var n;return(n=t.call(this,{name:"RuntimeMeasurement",reporters:r,context:e})||this).initialize=!1,n.init(),n}return e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sb(e,t),e.prototype.init=function(){if(!this.initialize){this.performanceDataQueue=new sw;var t=m();t&&t._ppf&&(this.performanceDataQueue.handleCache(t._ppf),t._ppf=this.performanceDataQueue),this.initialize=!0}},e}(no);sO=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),sI(0,ef(t$.CONTEXT)),sI(1,ef(t$.TTQ_REPORTERS))],sO),(t=i8||(i8={}))[t.OTHER=0]="OTHER",t[t.ANDROID=1]="ANDROID",t[t.IOS=2]="IOS";var sT=[a1.LOAD_START,a1.LOAD_END,a1.INIT_START,a1.INIT_END,a1.JSB_INIT_START,a1.JSB_INIT_END,a1.AD_INFO_INIT_START,a1.AD_INFO_INIT_END,a1.IDENTIFY_INIT_START,a1.IDENTIFY_INIT_END,a1.PLUGIN_INIT_START,a1.PLUGIN_INIT_END],sR=[a1.BEFORE_INIT,a1.INIT_START,a1.INIT_END,a1.HTTP_SEND,a1.AD_INFO_INIT_END];function sS(t){try{if(!performance||!performance.timing)return -1;if(t)return Date.now()-t;return Date.now()-performance.timing.navigationStart}catch(t){}return -1}var sN=function(t,e){void 0===e&&(e="");try{var r=[],n=performance.getEntriesByType("resource");if(n&&Array.isArray(n)){var o=[RegExp("/i18n/pixel/events\\.js\\?sdkid="+t),RegExp("/i18n/pixel/sdk\\.js\\?sdkid="+t)];n.forEach(function(t){var e=t.name,n=t.duration;o.some(function(t){return t.test(e)})&&r.push({name:e,duration:n})});var i=document&&document.currentScript,a=i&&i.src;if(a||!a&&e){var c=n.find(function(t){return t.name.indexOf(a||e)>-1});c&&r.push({name:c.name,duration:c.duration})}}return r}catch(t){return[]}};function sP(){sP=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i,a,c,s,u=Object._ttq_create((e&&e.prototype instanceof p?e:p).prototype);return n(u,"_invoke",{value:(i=t,a=r,c=new I(o||[]),s="suspendedStart",function(t,e){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return T()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),l;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):a:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,l)}(r,c);if(n){if(n===l)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var o=f(i,a,c);if("normal"===o.type){if(s=c.done?"completed":"suspendedYield",o.arg===l)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(s="completed",c.method="throw",c.arg=o.arg)}})}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function p(){}function h(){}function d(){}var v={};s(v,i,function(){return this});var _=Object.getPrototypeOf,g=_&&_(_(O([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=d.prototype=p.prototype=Object._ttq_create(v);function y(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){var o;n(this,"_invoke",{value:function(n,i){function a(){return new e(function(o,a){!function n(o,i,a,c){var s=f(t[o],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(l).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,c)})}c(s.arg)}(n,i,o,a)})}return o=o?o.then(a,a):a()}})}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function sA(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){r(t);return}c.done?e(s):Promise.resolve(s).then(n,o)}function sL(t,e){return(sL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}(e=i9||(i9={}))[e.NOT_DETERMINED=0]="NOT_DETERMINED",e[e.RESTRICTED=1]="RESTRICTED",e[e.DENIED=2]="DENIED",e[e.AUTHORIZED=3]="AUTHORIZED";var sx=function(t){function e(e){var r,n=e.pixelDetails,o=e.context,i=e.reporters,a=e.reportService,c=e.httpService,s=e.env,u=e.ttqOptions;return(r=t.call(this,{name:"Monitor",reporters:i,context:o})||this).hasReportMap={},r.cachedData=[],r.contextInitEndStatus=!1,r.legacy=[],r.env=s,r.lib=n.lib,r.pixelCode=n.pixelCode,r.reportService=a,r.httpService=c,r.contextInitEndStatus=!1,r.platform=tS()?i8.ANDROID:tN()?i8.IOS:i8.OTHER,r.partner=u.partner||"",u.legacy&&(r.legacy=u.legacy),r.ttqOptions=u,r}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sL(e,t);var r,n,o=e.prototype;return o.reportSwitch=function(){return!this.reporters.some(function(t){var e;return(null==(e=t.options)?void 0:e.monitor)===!1})},o.recordReportLog=function(t){var e=t.pixel_code;this.hasReportMap[e]||(this.hasReportMap[e]=[]),this.hasReportMap[e].push(t)},r=sP().mark(function t(e,r){return sP().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.httpService.send(e,r);case 2:!t.sent&&this.httpService.sendByImage&&this.httpService.sendByImage(e,{log_message:rx(r)});case 4:case"end":return t.stop()}},t,this)}),n=function(){var t=this,e=arguments;return new Promise(function(n,o){var i=r.apply(t,e);function a(t){sA(i,n,o,a,c,"next",t)}function c(t){sA(i,n,o,a,c,"throw",t)}a(void 0)})},o.send=function(t,e){return n.apply(this,arguments)},o.sendByReportService=function(t){var e,r=(e=t.metric_name,sR.indexOf(e)>-1);this.reportService.report(eI,t,r?cv.defaultReport:cv.htmlHttpReport,r?c_.P0:c_.P1)},o.report=function(t,e){return(void 0===e&&(e=!1),this.recordReportLog(t),e)?void this.send(eI,t):this.contextInitEndStatus?void this.sendByReportService(t):void this.cachedData.push(t)},o.contextInitEnd=function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"monitor_plogin_context_init_end",start:performance.now()}}catch(t){}for(this.contextInitEndStatus=!0;this.cachedData.length;){var e=this.cachedData.shift();e&&null!=e.metric_name&&this.sendByReportService(e)}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(t){}},o.info=function(t,e,r){if(void 0===e&&(e={}),void 0===r&&(r=!1),this.reportSwitch())try{var n=this.assemblyBaseData(t,e);if(this.isRepeatLog(n))return;this.report(n,r)}catch(t){}},o.error=function(t,e,r,n){if(void 0===r&&(r={}),void 0===n&&(n=!1),this.reportSwitch())try{var o=this.assemblyBaseData(t,r);if(Object.assign(o.ext_json||{},{message:e.message,stack:e.stack}),this.isRepeatLog(o))return;this.report(o,n)}catch(t){}},o.isRepeatLog=function(t){var e=t.pixel_code,r=t.metric_name;if(!e||!r)return!1;var n=sT.some(function(t){return r.indexOf(t)>-1}),o=this.hasReportMap[e],i=o&&o.some(function(t){return t.metric_name===r});return n&&i},o.getReportInfo=function(t){var e=this.reporters.find(function(e){return e.getReporterId()===t});if(e)return e.reporterInfo;var r=m()._i[t];if(r)return r.info},o.assemblyBaseData=function(t,e){var r=e||{},n=r.pixelCode,o=r.extJSON,i=r.custom_name,a=r.custom_enum,c=r.app_name,s=r.latency,u=m(),f=this.env,l=this.platform,p=this.context,h=this.reporters,d=p.getAllData(),v=d.libraryInfo,_=d.pageInfo,g=d.adInfo,y=d.pageSign,E=d.enableAdTracking,b=p.getVariationId(),I=p.getVids(),T=this.legacy||[],R=g&&g.log_extra&&function(t){try{return JSON.parse(t)}catch(t){return{}}}(g.log_extra)||{},S=h.map(function(t){return t.getReporterId()}),N=n||x().pixelCode||this.pixelCode||this.reporters[0]&&this.reporters[0].getReporterId()||Object.keys(u._i)[0]||"",P=this.getReportInfo(N),A=T.length?T.includes(N)?"legacy-ttq":"ttq":this.lib,L=O(N)||this.partner||"non",D=E?i9.AUTHORIZED:i9.DENIED,k={metric_name:t,pixel_code:N,platform:l,app_name:(void 0===c?"":c)||(void 0===f?"":f),net_type:function(){try{var t=navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection);return t?t.effectiveType:""}catch(t){}return""}(),placement:R.placement||"non",lib:{lib_version:v&&v.version||"",ttq_name:A},in_iframe:Number(tM()),time_to_last_start:-1,time_to_navigation_start:-1,latency:void 0===s?0:s,page_url:_&&_.url||tQ().url,att_status:D,pageview_id:this.context.getPageViewId()||"",session_id:y&&y.sessionId||"",variation_id:b,vids:I,load_id:P&&P.loadId||"",ad_id:String(g.ad_id),creative_id:String(g.creative_id||R.creative_id),user_agent:w(),pixel_monitor_version:"v2",custom_name:i,custom_enum:a,partner:L,ext_json:{performance:[],pixel_list:S.toString(),ad_info_from:g.ad_info_from,pixel_api_conflict_flag:C()}};return o&&Object.assign(k.ext_json,o),k},o.initStart=function(t){this.info(a1.INIT_START,t)},o.initEnd=function(t){this.info(a1.INIT_END,t)},o.jsbInitStart=function(){this.info(a1.JSB_INIT_START)},o.jsbInitEnd=function(){this.info(a1.JSB_INIT_END)},o.beforeAdInfoInitStart=function(t){this.info(a1.BEFORE_AD_INFO_INIT_START,t)},o.adInfoInitStart=function(t){this.info(a1.AD_INFO_INIT_START,t)},o.adInfoInitEnd=function(t){this.info(a1.AD_INFO_INIT_END,t)},o.pluginInitStart=function(t){this.info(t+a1.PLUGIN_INIT_START)},o.pluginInitEnd=function(t){this.info(t+a1.PLUGIN_INIT_END)},e}(no);function sC(t,e){return(sC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sD=function(t,e){return function(r,n){e(r,n,t)}},sk=function(t){function e(e,r,n,o,i,a){var c,s=x();return(c=t.call(this,{pixelDetails:s,context:e,reporters:r,reportService:n,httpService:o,env:i,ttqOptions:a})||this).statusTimeline={},c}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sC(e,t);var r=e.prototype;return r.getDurationTime=function(t){try{var e,r=(e=t.match(/_(start|end)$/))&&e[1];if(!r)return 0;var n=t.split("_").slice(0,-1).join("_"),o=this.statusTimeline[n];switch(!o&&(this.statusTimeline[n]={},o=this.statusTimeline[n]),r){case"start":o.start=o.start||Date.now();break;case"end":if(!o.start)return -1;return o.end=o.end||Date.now(),o.end-o.start}}catch(t){}return 0},r.assemblyBaseData=function(e,r){var n=t.prototype.assemblyBaseData.call(this,e,r),o=n.pixel_code,i=n.latency,a=this.getReportInfo(o),c=a&&a.loadStart;return Object.assign(n,{time_to_last_start:c?sS(c):-1,time_to_navigation_start:sS(),latency:i=i||this.getDurationTime(e)}),[a1.BEFORE_INIT,a1.IDENTIFY_INIT_END].includes(e)&&(n.ext_json=n.ext_json||{},n.ext_json.performance=sN(o,e===a1.IDENTIFY_INIT_END?"identify":"")),n},e}(sx);function sM(t,e){return(sM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}sk=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),sD(0,ef(t$.CONTEXT)),sD(1,ef(t$.TTQ_REPORTERS)),sD(2,ef(t$.REPORT_SERVICE)),sD(3,ef(t$.HTTP_SERVICE)),sD(4,ef(t$.ENV)),sD(5,ef(t$.TTQ_GLOBAL_OPTIONS))],sk);var sj=function(t,e){return function(r,n){e(r,n,t)}},sF=function(t){function e(e,r){return t.call(this,{name:"LPV",reporters:r,context:e})||this}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sM(e,t);var r=e.prototype;return r.isLPVSwitchOn=function(t){return t.plugins&&!0===t.plugins.EnableLPV},r.buildLPVData=function(){return{trigger_source:"pixel_self"}},r.buildSecondJumpESData=function(){return{lpv_trigger_type:"second_jump",trigger_source:"pixel_self"}},r.buildDuration10sESData=function(){return{lpv_trigger_type:"duration_10s",trigger_source:"pixel_self"}},r.startEngagedSessionTimer=function(t){var e=this,r=null,n=0,o=!0,i=null==t?void 0:t.getCookieBasedSession().hasReportedES,a=function(){(i=null==t?void 0:t.getCookieBasedSession().hasReportedES)||(t.track(e4,e.buildDuration10sESData(),{},ch.TRACK,cv.httpReport),t.setCookieBasedSession(Object.assign(Object.assign({},t.getCookieBasedSession()),{hasReportedES:1})))},c=function(e){if(!(i=null==t?void 0:t.getCookieBasedSession().hasReportedES)){r=setTimeout(a,1e3*e);var c=Date.now();document.addEventListener("visibilitychange",function t(){"hidden"!==document.visibilityState||i||(r&&clearTimeout(r),o=!1,r=null,n+=Math.floor((Date.now()-c)/1e3),document.removeEventListener("visibilitychange",t))})}};c(10),document.addEventListener("visibilitychange",function(){if(i=null==t?void 0:t.getCookieBasedSession().hasReportedES,"visible"===document.visibilityState&&!i&&!o){var e=10-n;e<=0?a():c(e)}}),window.addEventListener("beforeunload",function(){r&&clearTimeout(r)})},r.pixelSend=function(t,e,r,n,o){void 0===n&&(n={});try{if(o!==ch.TRACK||(null==(i=r._inspection)?void 0:i.trigger_source)==="pixel_self")return;var i,a=this.reporters.find(function(e){return e.getReporterId()===t});if(!a||!this.isLPVSwitchOn(a))return;var c=null==a?void 0:a.getCookieBasedSession().isSessionStart,s=this.context.getPageInfo().referrer,u=this.context.getPageSign().etldPlusOne,f=null==a?void 0:a.getCookieBasedSession().hasReportedES,l=this.context.getPageSign().pageIndex;c&&e===e6&&a.track("LandingPageView",this.buildLPVData(),{},ch.TRACK,cv.httpReport),f||(!c&&(s&&u&&s.includes(u)||l&&l.index>0)?(a.track(e4,this.buildSecondJumpESData(),{},ch.TRACK,cv.httpReport),a.setCookieBasedSession(Object.assign(Object.assign({},a.getCookieBasedSession()),{hasReportedES:1}))):this.startEngagedSessionTimer(a))}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"lpv_report"})}},e}(no);sF=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),sj(0,ef(t$.CONTEXT)),sj(1,ef(t$.TTQ_REPORTERS))],sF);var sU=[].concat([{identifier:t$.MONITOR_PLUGIN,to:sk,name:"Monitor",required:!1},{identifier:t$.AUTO_CONFIG_PLUGIN,to:iv,name:"AutoConfig",required:!1},{identifier:t$.DIAGNOSTICS_CONSOLE_PLUGIN,to:iH,name:"DiagnosticsConsole",required:!1},{identifier:t$.RUNTIME_MEASUREMENT_PLUGIN,to:sO,name:"RuntimeMeasurement",required:!1}],[{identifier:t$.CALLBACK_PLUGIN,to:nc,name:"Callback"},{identifier:t$.IDENTIFY_PLUGIN,to:nR,name:"Identify",required:!0},{identifier:t$.PANGLE_COOKIE_MATCHING_PLUGIN,to:iY,name:"PangleCookieMatching"},{identifier:t$.EVENT_BUILDER_PLUGIN,to:iQ,name:"EventBuilder"},{identifier:t$.ENRICH_IPV6_PLUGIN,to:i0,name:"EnrichIpv6"},{identifier:t$.PAGEDATA_PLUGIN,to:sm,name:"PageData"},{identifier:t$.LPV_PLUGIN,to:sF,name:"LPV"}]),sq=function(t,e){};function sG(t,e){return(sG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sH=function(t){function e(e){var r;return(r=t.call(this,e)||this).observers=new Set([]),r}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sG(e,t);var r=e.prototype;return r.addObserver=function(t){this.observers.has(t)||this.observers.add(t)},r.removeObserver=function(t){this.observers.delete(t)},r.notifyObservers=function(t,e){this.observers.forEach(function(r){return r.call(e,t)})},e}(nr),sV="HistoryObserver";(i7||(i7={})).DYNAMIC_WEB_PAGEVIEW="dynamic_web_pageview";var sB=["GoogleTagManagerClient","GoogleTagManagerServer"];function sY(t,e){var r=history[t];return function(){var t=Array.prototype.slice.call(arguments);r.apply(history,t),e()}}function sK(t){var e=t.options,r=t.plugins;return e&&!1!==e.historyObserver&&r&&r[sV]}function sW(t,e){var r=tQ().url,n=t.context.getPageInfo().url;if(r!==n){var o,i=t.context.setPageInfo(r,n);i&&i.pageIndex&&eU(i.pageIndex),t.reporters.filter((o=i7.DYNAMIC_WEB_PAGEVIEW,function(t){var e=t.plugins;return!!(sK(t)&&e[sV]&&e[sV][o])})).forEach(function(t){setTimeout(function(){t.page(e)})})}}function sJ(t,e){return(sJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var sX=function(t,e){return function(r,n){e(r,n,t)}},sQ=function(t){function e(e,r){var n;return(n=t.call(this,{name:sV,reporters:r,context:e})||this).enableListenSPAHistoryChange=!1,n.listenSPAHistoryChange=tt(function(){var t=function(){n.enableListenSPAHistoryChange&&n.notifyObservers({tf:cf.HISTORY_CHANGE})},e=function(){for(var e=arguments.length,r=Array(e),n=0;n=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),sX(0,ef(t$.CONTEXT)),sX(1,ef(t$.TTQ_REPORTERS))],sQ);var sz=function(t){function e(e,r){var n;return(n=t.call(this,e,r)||this)._THROTTLE_INTERVAL=1e3,n}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,sZ(e,t);var r=e.prototype;return r.setupListeners=function(){var t=this;try{if(this.currentConfig&&"window"===this.currentConfig.environment){var e=tf.join(", "),r=Y(function(e){return t.handleEvent(e)},this._THROTTLE_INTERVAL);this.currentConfig.listenEventTypes.forEach(function(n){var o;(null==(o=t.currentConfig)?void 0:o.pluginVersion)==="v1"?document.querySelectorAll(e).forEach(function(t){tl.some(function(e){return t.matches(e)})||t.addEventListener("click",r,{capture:!0})}):(window.addEventListener(n,r,{capture:!0}),t.listeners.set(n,r))})}}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"ClickObserver",custom_enum:"setupListeners_error"})}},r.teardownListeners=function(){var t=this;this.listeners.forEach(function(e,r){t.currentConfig&&"window"===t.currentConfig.environment&&window.removeEventListener(r,e)}),this.listeners.clear()},r.handleEvent=function(t){try{this.sendEvent(t)}catch(t){t(a1.CUSTOM_ERROR,t,{custom_name:"ClickObserver",custom_enum:"handleEvent_error"})}},r.getObserverType=function(){return"click"},e}(function(){function t(t,e){this.listeners=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map,this.eventEmitter=t,this.currentConfig=e,this.validateConfig(e)&&this.setupListeners()}var e=t.prototype;return e.updateConfig=function(t){var e;this.validateConfig(t)&&(this.currentConfig?(e=this.currentConfig.listenEventTypes).push.apply(e,t.listenEventTypes):this.currentConfig=t,this.setupListeners())},e.sendEvent=function(t){this.eventEmitter.emit(t.type,t)},e.validateConfig=function(t){return!!t&&!!t.emitterType&&!!t.listenEventTypes},t}());function s$(t,e){return(s$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var s0=function(t,e){return function(r,n){e(r,n,t)}},s1=function(t){function e(e,r,n){var o;return(o=t.call(this,{name:"INTERACTION_OBSERVER",reporters:r,context:e})||this).observersMap=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map([]),o.eventEmitter=n,o.eventEmitter.on(cc.UPDATE_CONFIG,o.updateObserverConfig.bind(function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o)),{}),o}e.prototype=Object._ttq_create(t.prototype),e.prototype.constructor=e,s$(e,t);var r=e.prototype;return r.registerObserver=function(t){var e;"click"===t&&(e=new sz(this.eventEmitter),this.observersMap.set(t,e))},r.unregisterObserver=function(t){var e=this.observersMap.get(t);e&&(e.teardownListeners(),this.observersMap.delete(t))},r.destroyAll=function(){this.observersMap.forEach(function(t){return t.teardownListeners()}),this.observersMap.clear()},r.updateObserverConfig=function(t){var e=this.observersMap.get(t.emitterType);e||(this.registerObserver(t.emitterType),e=this.observersMap.get(t.emitterType)),e&&e.updateConfig(t)},e}(sH);s1=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}([eu(),s0(0,ef(t$.CONTEXT)),s0(1,ef(t$.TTQ_REPORTERS)),s0(2,ef(t$.EVENT_EMITTER))],s1);var s2=[{identifier:t$.HISTORY_OBSERVER,to:sQ,name:"HistoryObserver"},{identifier:t$.INTERACTION_OBSERVER,to:s1,name:"InteractionObserver"}],s3=m(),s6=(null==s3?void 0:s3._container)||new es,s5=(null==s3?void 0:s3._container)?cp.REBIND:cp.BIND;tw();var s4=s6[s5](t$.ENV),s8=s6[s5](tE.SignalType);s6[s5](tE.ID),s6[s5](tE.Type),s6[s5](tE.Options),s6[s5](tE.Plugins),s6[s5](tE.Rules),s6[s5](tE.Info);var s9=s6[s5](tE.WebLibraryInfo),s7=s6[s5](t$.TTQ_GLOBAL_OPTIONS);try{if(!s6.get(t$.TTQ_GLOBAL_OPTIONS))throw Error("")}catch(t){s7.toConstantValue({})}var ut=function(t,e){var r=tb();s9.toConstantValue({name:"pixel.js",version:"2.2.1",options:void 0}),s4.toConstantValue(e),s8.toConstantValue(r)},ue=function(t){(null==t?void 0:t._container)||(s6.bind(t$.TTQ).to(rR).inSingletonScope(),s6.bind(t$.CONTEXT).to(rp).inSingletonScope(),s6.bind(t$.REPORTER).to(rg),s6.bind(t$.TTQ_REPORTERS).toConstantValue([]),s6.bind(t$.REPORT_SERVICE).to(rB).inSingletonScope(),s6.bind(t$.AD_SERVICE).to(rW).inSingletonScope(),s6.bind(t$.APP_SERVICE).to(rQ).inSingletonScope(),s6.bind(t$.BRIDGE_SERVICE).to(r2).inSingletonScope(),s6.bind(t$.HTTP_SERVICE).to(r5).inSingletonScope(),s6.bind(tE.IsOnsitePage).toConstantValue({value:!1}),s6.bind(t$.COOKIE_SERVICE).to(r9).inSingletonScope(),s6.bind(t$.CONSENT_SERVICE).to(ne).inSingletonScope(),s6.bind(t$.EVENT_EMITTER).to(e9).inSingletonScope()),t&&!t._container&&(t._container=s6)},ur=function(){sU.forEach(function(t){var e=t.to,r=t.name,n=void 0===r?"":r,o=t.required,i=t.identifier;(void 0!==o&&o||R(n))&&!s6.isBound(i)&&s6.bind(i).to(e).inSingletonScope(),s3&&s3._mounted&&!s3.getPlugin(n)&&s6.isBound(i)&&s3.usePlugin(s6.get(i))})},un=function(){s2.forEach(function(t){var e=t.to,r=t.name,n=t.identifier;R(void 0===r?"":r)&&!s6.isBound(n)&&s6.bind(n).to(e).inSingletonScope()})},uo=function(t,e,r){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"initAllModule",start:performance.now()}}catch(t){}ut(t,r),et(e,t),un(),ue(t),ur(),sq(e,t);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(t){}},ui=function(){try{var t=s6.get(t$.MONITOR_PLUGIN);if(t)return t;return null}catch(t){return null}},ua=function(){try{s6.get(t$.EVENT_EMITTER)}catch(t){A(a1.CUSTOM_ERROR,t,{custom_name:"emitterFactory"})}},uc=function(t){var e=this.constructor;return this.then(function(r){return e.resolve(t()).then(function(){return r})},function(r){return e.resolve(t()).then(function(){return e.reject(r)})})},us=function(t){return new this(function(e,r){if(!(t&&void 0!==t.length))return r(TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);for(var o=n.length,i=0;i0&&ae&&new ae(t.getReporterId(),t.rules)});try{window.ttq&&window.ttq._ppf&&(c.end=performance.now(),window.ttq._ppf.push(c))}catch(t){}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),"init"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}}}()}catch(t){A(a1.INIT_ERROR,t)}}()}();