!function(){"use strict";function t(){t=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,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 l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=g(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var s={};function p(){}function h(){}function y(){}var d={};u(d,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(S([])));v&&v!==r&&n.call(v,i)&&(d=v);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){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}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 S(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 r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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),s}},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 new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(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 i(t,e,r){return i=o()?Reflect.construct.bind():function(t,e,r){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return r&&n(i,r.prototype),i},i.apply(null,arguments)}function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var o=_(),i=o.getPlugin&&o.getPlugin("Monitor")||null;i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):v("Monitor")&&m.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}(h.INIT_ERROR,t)}}(); !function(){"use strict";function e(){e=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,o=Object._ttq_create(i.prototype),a=new T(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f={};function d(){}function p(){}function h(){}var _={};u(_,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(O([])));g&&g!==n&&r.call(g,o)&&(_=g);var y=h.prototype=d.prototype=Object._ttq_create(_);function m(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,c){var u=l(e[i],e,o);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n,r,i,o,a){try{var c=e[o](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,u,"next",e)}function u(e){n(a,i,o,c,u,"throw",e)}c(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}var O,S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var n="object"==typeof S?S:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,u={create:o?function(){return re(Object._ttq_create(null))}:a?function(){return re({__proto__:null})}:function(){return re({})},has:c?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:c?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},s=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?ee():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?te():Set,p=new(l||"function"!=typeof WeakMap?ne():WeakMap);function h(e,t,n,r){if(L(n)){if(!H(e))throw new TypeError;if(!W(t))throw new TypeError;return T(e,t)}if(!H(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!L(r)&&!x(r))throw new TypeError;return x(r)&&(r=void 0),O(e,t,n=V(n),r)}function _(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!L(r)&&!K(r))throw new TypeError;C(e,t,n,r)}return n}function v(e,t,n,r){if(!U(n))throw new TypeError;return L(r)||(r=V(r)),C(e,t,n,r)}function g(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),N(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),R(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),A(e,t,n)}function E(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),P(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return L(t)||(t=V(t)),k(e,t)}function w(e,t){if(!U(e))throw new TypeError;return L(t)||(t=V(t)),M(e,t)}function I(e,t,n){if(!U(t))throw new TypeError;L(n)||(n=V(n));var r=S(t,n,!1);if(L(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=p.get(t);return i.delete(n),i.size>0||p.delete(t),!0}function T(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!L(r)&&!x(r)){if(!W(r))throw new TypeError;t=r}}return t}function O(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!L(o)&&!x(o)){if(!U(o))throw new TypeError;r=o}}return r}function S(e,t,n){var r=p.get(e);if(L(r)){if(!n)return;r=new f,p.set(e,r)}var i=r.get(t);if(L(i)){if(!n)return;i=new f,r.set(t,i)}return i}function N(e,t,n){if(R(e,t,n))return!0;var r=$(t);return!x(r)&&N(e,r,n)}function R(e,t,n){var r=S(t,n,!1);return!L(r)&&q(r.has(e))}function A(e,t,n){if(R(e,t,n))return P(e,t,n);var r=$(t);return x(r)?void 0:A(e,r,n)}function P(e,t,n){var r=S(t,n,!1);if(!L(r))return r.get(e)}function C(e,t,n,r){S(n,r,!0).set(e,t)}function k(e,t){var n=M(e,t),r=$(e);if(null===r)return n;var i=k(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new d,a=[],c=0,u=n;c=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i= than the number of constructor arguments of its base class."},U.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",U.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",U.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",U.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",U.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";U.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t0,h=d.length>i.length,_=function(e,t,n,r,i){for(var o=[],a=0;a0?l:e(t,r)}return 0}}(oe);var Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.Request=void 0;var Ne=M,Re=function(){function e(e,t,n,r,i){this.id=Ne.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();Se.Request=Re,Object.defineProperty(G,"__esModule",{value:!0}),G.getBindingDictionary=G.createMockRequest=G.plan=void 0;var Ae=V,Pe=U,Ce=k,ke=A,Me=H,De=W,Le=z,xe=ee,je=re,Ue=oe,Fe=Se,Be=ye;function qe(e){return e._bindingDictionary}function Ge(e,t,n,r,i){var o=He(n.container,i.serviceIdentifier),a=[];return o.length===Ae.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=He(n.container,i.serviceIdentifier)),a=t?o:o.filter((function(e){var t=new Fe.Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),function(e,t,n,r){switch(t.length){case Ae.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=De.getServiceIdentifierAsString(e),o=Pe.NOT_REGISTERED;throw o+=De.listMetadataForTarget(i,n),o+=De.listRegisteredBindingsForServiceIdentifier(r,i,He),new Error(o);case Ae.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case Ae.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=De.getServiceIdentifierAsString(e),o=Pe.AMBIGUOUS_MATCH+" "+i;throw o+=De.listRegisteredBindingsForServiceIdentifier(r,i,He),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function Ve(e,t,n,r,i,o){var a,c;if(null===i){a=Ge(e,t,r,null,o),c=new Fe.Request(n,r,null,a,o);var u=new je.Plan(r,c);r.addPlan(u)}else a=Ge(e,t,r,i,o),c=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach((function(t){var n=null;if(o.isArray())n=c.addChildRequest(t.serviceIdentifier,t,o);else{if(t.cache)return;n=c}if(t.type===Ce.BindingTypeEnum.Instance&&null!==t.implementationType){var i=Ue.getDependencies(e,t.implementationType);if(!r.container.options.skipBaseClassChecks){var a=Ue.getBaseClassDependencyCount(e,t.implementationType);if(i.length0){var a=t.filter((function(e){return null!==e.target&&e.target.type===Xe.TargetTypeEnum.ConstructorArgument})).map(n);i=a,o=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===Xe.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var o=i[n];e[r]=o})),e}(o=new((r=e)._ttq_bind.apply(r,Ke([void 0],i))),t,n)}else o=new e;return function(e,t){if(Reflect.ttq_hasMetadata(Qe.POST_CONSTRUCT,e)){var n=Reflect.ttq_getMetadata(Qe.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(Ye.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,o),o},Object.defineProperty(Je,"__esModule",{value:!0}),Je.resolve=void 0;var ze=U,Ze=k,$e=H,et=W,tt=We,nt=function(e,t,n){try{return n()}catch(n){throw $e.isStackOverflowExeption(n)?new Error(ze.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},rt=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,r=t.childRequests,i=t.target&&t.target.isArray(),o=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(i&&o)return r.map((function(t){return rt(e)(t)}));var a=null;if(!t.target.isOptional()||0!==n.length){var c=n[0],u=c.scope===Ze.BindingScopeEnum.Singleton,s=c.scope===Ze.BindingScopeEnum.Request;if(u&&c.activated)return c.cache;if(s&&null!==e&&e.has(c.id))return e.get(c.id);if(c.type===Ze.BindingTypeEnum.ConstantValue)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Function)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Constructor)a=c.implementationType;else if(c.type===Ze.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)a=nt("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Factory&&null!==c.factory)a=nt("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Provider&&null!==c.provider)a=nt("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==Ze.BindingTypeEnum.Instance||null===c.implementationType){var l=et.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(ze.INVALID_BINDING_TYPE+" "+l)}a=tt.resolveInstance(c.implementationType,r,rt(e))}return"function"==typeof c.onActivation&&(a=c.onActivation(t.parentContext,a)),u&&(c.cache=a,c.activated=!0),s&&null!==e&&!e.has(c.id)&&e.set(c.id,a),a}}};Je.resolve=function(e){return rt(e.plan.rootRequest.requestScope)(e.plan.rootRequest)};var it={},ot={},at={},ct={},ut={},st={},lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.typeConstraint=lt.namedConstraint=lt.taggedConstraint=lt.traverseAncerstors=void 0;var ft=A,dt=ee,pt=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||pt(n,t))};lt.traverseAncerstors=pt;var ht=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new dt.Metadata(e,t),n}};lt.taggedConstraint=ht;var _t=ht(ft.NAMED_TAG);lt.namedConstraint=_t;lt.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}},Object.defineProperty(st,"__esModule",{value:!0}),st.BindingWhenSyntax=void 0;var vt=ut,gt=lt,yt=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new vt.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=gt.namedConstraint(e),new vt.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new vt.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=gt.taggedConstraint(e)(t),new vt.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return gt.typeConstraint(e)(t.parentRequest)},new vt.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return gt.namedConstraint(e)(t.parentRequest)},new vt.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return gt.taggedConstraint(e)(t)(n.parentRequest)},new vt.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.typeConstraint(e))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.typeConstraint(e))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.namedConstraint(e))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.namedConstraint(e))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new vt.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,e)},new vt.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,e)},new vt.BindingOnSyntax(this._binding)},e}();st.BindingWhenSyntax=yt,Object.defineProperty(ut,"__esModule",{value:!0}),ut.BindingOnSyntax=void 0;var mt=st,Et=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new mt.BindingWhenSyntax(this._binding)},e}();ut.BindingOnSyntax=Et,Object.defineProperty(ct,"__esModule",{value:!0}),ct.BindingWhenOnSyntax=void 0;var bt=ut,wt=st,It=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new wt.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new bt.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ct.BindingWhenOnSyntax=It,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingInSyntax=void 0;var Tt=k,Ot=ct,St=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=Tt.BindingScopeEnum.Request,new Ot.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Tt.BindingScopeEnum.Singleton,new Ot.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Tt.BindingScopeEnum.Transient,new Ot.BindingWhenOnSyntax(this._binding)},e}();at.BindingInSyntax=St,Object.defineProperty(ot,"__esModule",{value:!0}),ot.BindingInWhenOnSyntax=void 0;var Nt=at,Rt=ut,At=st,Pt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new At.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Rt.BindingOnSyntax(this._binding),this._bindingInSyntax=new Nt.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ot.BindingInWhenOnSyntax=Pt,Object.defineProperty(it,"__esModule",{value:!0}),it.BindingToSyntax=void 0;var Ct=U,kt=k,Mt=ot,Dt=ct,Lt=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=kt.BindingTypeEnum.Instance,this._binding.implementationType=e,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+Ct.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=kt.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=kt.BindingScopeEnum.Singleton,new Dt.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=kt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=kt.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Dt.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Dt.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(Ct.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=kt.BindingTypeEnum.Function,this._binding.scope=kt.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=kt.BindingScopeEnum.Singleton,new Dt.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=kt.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Dt.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();it.BindingToSyntax=Lt;var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.ContainerSnapshot=void 0;var jt=function(){function e(){}return e.of=function(t,n){var r=new e;return r.bindings=t,r.middleware=n,r},e}();xt.ContainerSnapshot=jt;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Lookup=void 0;var Ft=U,Bt=function(){function e(){this._map=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(Ft.NULL_ARGUMENT);if(null==t)throw new Error(Ft.NULL_ARGUMENT);var n=this._map.get(e);void 0!==n?(n.push(t),this._map.set(e,n)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(Ft.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(Ft.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(Ft.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Ft.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(n,r){var i=n.filter((function(t){return!e(t)}));i.length>0?t._map.set(r,i):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(Ft.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();Ut.Lookup=Bt;var qt=S&&S.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},Gt=S&&S.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2&&void 0!==arguments[2]?arguments[2]:"-";return"".concat(e).concat(n).concat(t)},cr=function(){return new Date(Date.now()+864e5).toUTCString()};function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=-1;return function(){var r=Array.prototype.slice.apply(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,y(r)),n=Date.now())}}var sr,lr,fr="tt_adInfo",dr="tt_appInfo",pr="_tt_enable_cookie",hr="messageId",_r="_ttp",vr="tt_sessionId",gr="tt_pixel_session_index",yr="default_eventId",mr="::";!function(e){e.WINDOWS_PHONE="Windows Phone",e.ANDROID="android",e.IOS="ios",e.PC="pc"}(sr||(sr={})),function(e){e.MUSICAL_LY="musical_ly",e.MUSICALLY_GO="musically_go",e.TRILL="trill",e.ULTRALITE="ultralite",e.LEMON8="lemon8"}(lr||(lr={}));var Er,br,wr,Ir,Tr,Or=(c(nr={},lr.LEMON8,{}),c(nr,lr.MUSICAL_LY,(c(er={},sr.IOS,"33.4.0"),c(er,sr.ANDROID,"23.1.0"),er)),c(nr,lr.TRILL,(c(tr={},sr.IOS,"33.4.0"),c(tr,sr.ANDROID,"23.1.0"),tr)),nr),Sr={expires:390};!function(e){e[e.OFFSITE=0]="OFFSITE",e[e.ONSITE=1]="ONSITE"}(Er||(Er={})),function(e){e.INIT_START="initStart",e.INIT_END="initEnd",e.CONTEXT_INIT_START="contextInitStart",e.CONTEXT_INIT_END="contextInitEnd",e.PAGE_URL_WILL_CHANGE="pageUrlWillChange",e.PAGE_URL_DID_CHANGE="pageUrlDidChange",e.PAGE_DID_LOAD="pageDidLoad",e.PAGE_WILL_LEAVE="pageWillLeave",e.AD_INFO_INIT_START="adInfoInitStart",e.AD_INFO_INIT_END="adInfoInitEnd",e.BEFORE_AD_INFO_INIT_START="beforeAdInfoInitStart",e.PIXEL_SEND="pixelSend",e.PIXEL_DID_MOUNT="pixelDidMount"}(br||(br={})),function(e){e.UNKNOWN="-1",e.LOADING="0",e.INTERACTIVE="1",e.COMPLETE="2"}(wr||(wr={})),function(e){e.HISTORY_CHANGE="hc",e.URL_CHANGE="uc"}(Ir||(Ir={})),function(e){e.EXTERNAL="external",e.APP="app",e.TIKTOK="tiktok"}(Tr||(Tr={}));var Nr,Rr={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")},Ar="Pageview",Pr=[],Cr="EnrichAM",kr={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"),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"),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"),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")};!function(e){e.TRACK="track",e.PERFORMANCE="performance",e.INTERACTION="interaction",e.PCM="PCM",e.PERFORMANCE_INTERACTION="performance_interaction",e.SELFHOST="selfhost",e.AUTO_CONFIG="auto_config",e.PAGE="Pf",e.PAGE_PERFORMANCE="page_performance",e.PAGE_INTERACTION="page_interaction"}(Nr||(Nr={}));var Mr,Dr,Lr=["EnrichAM"],xr="https://analytics.tiktok.com/api/v2",jr="".concat(xr,"/pixel"),Ur="".concat(xr,"/performance"),Fr="".concat(xr,"/interaction"),Br="".concat(xr,"/performance_interaction"),qr="".concat(xr,"/pixel/perf"),Gr="".concat(xr,"/pixel/inter"),Vr="".concat(xr,"/pixel/act"),Hr="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",Jr="ttclid",Wr="_toutiao_params",Kr=["phone_number","email","external_id"],Yr="email_is_hashed",Xr="phone_is_hashed",Qr="sha256_email",zr="sha256_phone",Zr="auto_trigger_type";!function(e){e.LOAD_START="load_start",e.LOAD_END="load_end",e.BEFORE_INIT="before_init",e.INIT_START="init_start",e.INIT_END="init_end",e.JSB_INIT_START="jsb_init_start",e.JSB_INIT_END="jsb_init_end",e.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",e.AD_INFO_INIT_START="ad_info_init_start",e.AD_INFO_INIT_END="ad_info_init_end",e.IDENTIFY_INIT_START="identify_init_start",e.IDENTIFY_INIT_END="identify_init_end",e.PLUGIN_INIT_START="_init_start",e.PLUGIN_INIT_END="_init_end",e.PIXEL_SEND="pixel_send",e.PIXEL_SEND_PCM="pixel_send_PCM",e.JSB_SEND="jsb_send",e.HTTP_SEND="http_send",e.HANDLE_CACHE="handle_cache",e.INIT_ERROR="init_error",e.PIXEL_EMPTY="pixel_empty",e.JSB_ERROR="jsb_error",e.API_ERROR="api_error",e.PLUGIN_ERROR="plugin_error",e.CUSTOM_INFO="custom_info",e.CUSTOM_ERROR="custom_error",e.CUSTOM_TIMER="custom_timer"}(Mr||(Mr={})),function(e){e.EMPTY_EVENT_TYPE_NAME="EMPTY_EVENT_TYPE_NAME",e.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT="MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT",e.LONG_EVENT_TYPE_NAME="LONG_EVENT_TYPE_NAME",e.MISSING_VALUE_PARAMETER="MISSING_VALUE_PARAMETER",e.MISSING_CURRENCY_PARAMETER="MISSING_CURRENCY_PARAMETER",e.MISSING_CONTENT_ID="MISSING_CONTENT_ID",e.MISSING_EMAIL_AND_PHONE="MISSING_EMAIL_AND_PHONE",e.INVALID_EVENT_PARAMETER_VALUE="INVALID_EVENT_PARAMETER_VALUE",e.INVALID_CURRENCY_CODE="INVALID_CURRENCY_CODE",e.INVALID_CONTENT_ID="INVALID_CONTENT_ID",e.INVALID_CONTENT_TYPE="INVALID_CONTENT_TYPE",e.INVALID_EMAIL_FORMAT="INVALID_EMAIL_FORMAT",e.INVALID_PHONE_NUMBER_FORMAT="INVALID_PHONE_NUMBER_FORMAT",e.INVALID_EMAIL_INFORMATION="INVALID_EMAIL_INFORMATION",e.INVALID_PHONE_NUMBER_INFORMATION="INVALID_PHONE_NUMBER_INFORMATION",e.DUPLICATE_PIXEL_CODE="DUPLICATE_PIXEL_CODE",e.MISSING_PIXEL_CODE="MISSING_PIXEL_CODE",e.INVALID_PIXEL_CODE="INVALID_PIXEL_CODE"}(Dr||(Dr={}));var $r=null,ei=function(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:new Function("return this")()},ti=function(){return ei().TiktokAnalyticsObject||"ttq"},ni=function(){var e=ei();return $r||e[ti()]},ri=function(){return!!ni()._is_onsite},ii=function(){var e=ei();return("object"===("undefined"==typeof navigator?"undefined":t(navigator))&&navigator.userAgent?navigator.userAgent:"")||e._userAgent},oi=function(e){try{var t=ni();return t&&t._self_host_config&&t._self_host_config[e]||""}catch(e){return""}},ai=function(e){var t=ni(),n=t._i||{},r=e&&n[e];return e&&r&&r._partner?r._partner:t._partner?t._partner:""},ci=function(e){var t=ni(),n=t._i||{};return Object.keys(n).filter((function(t){return n[t]._partner===e})).length>0||t._partner===e},ui=function(e){try{var t=ni()._plugins||{};return null==t[e]||!!t[e]}catch(e){return!0}},si=function(){var e;try{var t=ni()._ppf;return null===(e=t.printAndClear)||void 0===e?void 0:e.call(t)}catch(e){}};function li(e){var t=new Error(e);return t.source="ulid",t}var fi="0123456789ABCDEFGHJKMNPQRSTVWXYZ",di=fi.length,pi=Math.pow(2,48)-1;function hi(e){var t=Math.floor(e()*di);return t===di&&(t=di-1),fi.charAt(t)}var _i,vi=(_i||(_i=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];t||(t="undefined"!=typeof window?window:null);var n=t&&(t.crypto||t.msCrypto);if(n)return function(){var e=new Uint8Array(1);return n.getRandomValues(e),e[0]/255};try{var r=require("crypto");return function(){return r.randomBytes(1).readUInt8()/255}}catch(e){}if(e)return function(){return Math.random()};throw li("secure crypto unusable, insecure Math.random not allowed")}()),function(e){return isNaN(e)&&(e=Date.now()),function(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>pi)throw li("cannot encode time greater than "+pi);if(e<0)throw li("time must be positive");if(!1===Number.isInteger(e))throw li("time must be an integer");for(var n=void 0,r="";t>0;t--)r=fi.charAt(n=e%di)+r,e=(e-n)/di;return r}(e,10)+function(e,t){for(var n="";e>0;e--)n=hi(t)+n;return n}(16,_i)}),gi=function(e){return Boolean(e)},yi=function(e){return void 0!==e.metric_name},mi=function(e){return yi(e)?"insight_log_monitor":"insight_log"},Ei=function(e){var t;return Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).some((function(e){return-1!==Kr.indexOf(e)}))};function bi(e,t){var n,r=e;return function(){if(r){for(var i=arguments.length,o=new Array(i),a=0;acrypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(e)};function Ii(e,t){var n=Object.assign({},e);return t.forEach((function(e){null!==n[e]&&void 0!==n[e]&&delete n[e]})),n}var Ti=function(e,t){if(!e)return{};var n={};return Object.keys(e).forEach((function(r){t[r]&&(n[r]=e[r])})),n};function Oi(e,t,n){var r;return function(){for(var i=arguments.length,o=new Array(i),a=0;a0&&void 0!==r[0]?r[0]:500,e.abrupt("return",new Promise((function(e){setTimeout((function(){e(!0)}),n)})));case 2:case"end":return e.stop()}}),t)}))),Ni.apply(this,arguments)}var Ri=["input[type='button']","input[type='image']","input[type='submit']","button","[class*=btn]","[class*=Btn]","[class*=button]","[class*=Button]","[role*=button]","[id*=btn]","[id*=Btn]","[id*=button]","[id*=Button]","a"],Ai=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],Pi=function(e){var t=Ri.some((function(t){return e.matches(t)})),n=Ai.some((function(t){return e.matches(t)}));return t&&!n};function Ci(e,n){var r={};for(var i in e)if(e.hasOwnProperty(i)&&!n.hasOwnProperty(i))r[i]=e[i];else if(e.hasOwnProperty(i)&&n.hasOwnProperty(i)&&e[i]!==n[i])if("object"===t(e[i])&&"object"===t(n[i])){var o=Ci(e[i],n[i]);Object.keys(o).length>0&&(r[i]=o)}else r[i]=e[i];for(var a in n)n.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(r[a]=n[a]);return r}function ki(e,t){return Object.keys(Ci(e,t)).length>0}function Mi(e,t){var n={};return e&&(function(e){return"string"==typeof e}(e)||function(e){return"number"==typeof e}(e)?n.external_id=e.toString():rr(e)&&(n=e)),t&&rr(t)&&Object.assign(n,t),n}var Di=function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"getPixelInstalledPosition",start:performance.now()}}catch(e){}var n="unknown";try{var r=e&&function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"getPixelScriptByPixelCode",start:performance.now()}}catch(e){}for(var n,r=Array.prototype.slice.call(document.getElementsByTagName("script")),i=0;i-1){n=o;break}}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}return n}(e);r&&(Li(r)&&(n="isInHead"),xi(r)&&(n="isInBodyTop10"))}catch(e){}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}return n},Li=function e(t){var n=t.parentElement;return!!n&&("HEAD"===n.tagName||e(n))},xi=function(e){return function(e,n){for(var r,i=[document.body],o=0;o<=e&&i.length;){var a=i.pop();if(a===n)return!0;if(!("script"===(null==a?void 0:a.tagName.toLowerCase())&&(null===(r=a.src)||void 0===r?void 0:r.indexOf("analytics.tiktok.com"))>-1)&&(o++,"object"===t(a)&&a.children))for(var c=a.children.length-1;c>=0;c--)i.push(a.children[c])}return!1}(10,e)};function ji(e,t){try{var n=new URL(e).searchParams.getAll(t);return n[n.length-1]||""}catch(e){return""}}var Ui=function(e,t,n){try{var r=ji(t,e);return r||ji(n||"",e)}catch(e){}return""},Fi=function(){var e,t;if(!Yi())return{url:window.location.href,referrer:document.referrer};if(!Zi())return{url:(null===(e=null===window||void 0===window?void 0:window.top)||void 0===e?void 0:e.location.href)||"",referrer:(null===(t=null===window||void 0===window?void 0:window.top)||void 0===t?void 0:t.document.referrer)||""};var n=window.location.href,r=document.referrer;if(/doubleclick\.net/.test(window.location.hostname)){var i=window.location.pathname,o={};return i.split(";").forEach((function(e){var t=v(e.split("="),2),n=t[0],r=t[1];o[n]=decodeURIComponent(r)})),{url:o["~oref"]||n,referrer:document.referrer}}return{url:n,referrer:r}},Bi=function(){var e,t;return(null===(t=null===(e=ni())||void 0===e?void 0:e._env)||void 0===t?void 0:t.env)||Tr.EXTERNAL},qi=function(){var e,t;return null!==(t=null===(e=ni())||void 0===e?void 0:e._is_onsite)&&void 0!==t?t:Er.OFFSITE},Gi=function(e){return(e||Bi())!==Tr.EXTERNAL},Vi=function(e){return(e||Bi())===Tr.TIKTOK},Hi=function(){var e=ii();return/windows phone/i.test(e)?sr.WINDOWS_PHONE:/android/i.test(e)?sr.ANDROID:/iPad|iPhone|iPod/.test(e)?sr.IOS:sr.PC},Ji=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(e){return Promise.resolve({})}},Wi=function(){return"android"===Hi()},Ki=function(){return"ios"===Hi()},Yi=function(){return window.top!==window},Xi=bi((function(){return/open_news/i.test(ii())})),Qi=bi((function(){return/ultralite/i.test(ii())}));function zi(){var e;return[zn.INVOKE_METHOD_ENABLED,zn.INVOKE_METHOD_NOT_ENABLED,zn.TOUTIAO_BRIDGE_NOT_ENABLED][[!!(null===(e=null===window||void 0===window?void 0:window.ToutiaoJSBridge)||void 0===e?void 0:e.invokeMethod),!!(null===window||void 0===window?void 0:window.ToutiaoJSBridge),!0].findIndex((function(e){return e}))]}var Zi=function(){try{return window&&window.top&&window.top.location.href,!1}catch(e){return!0}},$i=function(){try{return Zi()?function(){try{var e=new URL(decodeURIComponent(window.location.href)),t=/https?:\/\/[^\s/$.?#].[^\s]*/i;return t.test(e.search)||t.test(e.pathname)}catch(e){return!1}}()?qn.URL_IN_QUERY_IFRAME:window.google_tag_manager?qn.GTM_IFRAME:window.name&&"web-pixel-sandbox"===window.name?qn.SANDBOX_IFRAME:qn.CROSS_DOMAIN_IFRAME:qn.NOT_CROSS_DOMAIN_IFRAME}catch(e){return qn.UNKNOWN_IFRAME}},eo=function(){return(void 0!==(e=ei()).DedicatedWorkerGlobalScope?e instanceof e.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===e.constructor.name)?qn.WEB_WORKER:Yi()?$i():qn.NORMAL;var e},to=function(){var e=ii();if(e)for(var t=0,n=Object.values(lr);ta)return!1}return!0},io=function(){return function(e){var t=to();return void 0!==t&&e.has(t)}(new Set([lr.MUSICAL_LY,lr.TRILL,lr.ULTRALITE]))},oo={info:[],error:[]};function ao(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r=ni(),i=r.getPlugin&&r.getPlugin("Monitor")||null;i&&i.info&&"function"==typeof i.info?i.info.call(i,e,t,n):ui("Monitor")&&oo.info.push({event:e,detail:t,withoutJSB:n})}catch(e){}}function co(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var i=ni(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error?o.error.call(o,e,t,n,r):ui("Monitor")&&oo.error.push({event:e,err:t,detail:n,withoutJSB:r})}catch(e){}}function uo(e,t){try{var n=ni(),r=n.getPlugin&&n.getPlugin("DiagnosticsConsole")||null;r&&r.warn.apply(r,[e,t])}catch(e){}}function so(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"getPixelDetail",start:performance.now()}}catch(e){}var t={lib:"ttq",pixelCode:"MOCK_SHOP_ID"};try{var n=document&&document.currentScript;t={pixelCode:n&&n.getAttribute("data-id")||"",lib:ti()||"ttq"}}catch(e){t={lib:"ttq",pixelCode:""}}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(e){}return t}var lo,fo=function(e,t){if("selfhost"===e&&t&&oi(t))return"https://".concat(oi(t),"/api/v2/pixel");var n={track:jr,performance:Ur,interaction:Fr,performance_interaction:Br,auto_config:Vr,page_performance:qr,page_interaction:Gr}[e];return n||null},po=function(e){try{var t=window.sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},ho=function(e,t){try{var n=JSON.stringify(t);window.sessionStorage.setItem(e,n)}catch(e){}},_o=0,vo=0,go=function(e){if(0===document.cookie.length)return"";var t,n,r=(t=e,n={},document.cookie.split(";").forEach((function(e){var t=e.split("="),r=t[0].trim();n[r]=t.slice(1).join("=")})),n[t]||"");return r?unescape(r):""},yo=function(e,t,n){try{if(n){var r=window.location.hostname.split(".");if(vo=r.length,(_o=wo())&&_o0||e.name&&e.name.startsWith("web-pixel-sandbox-CUSTOM-shopify"))}catch(e){}return!1}()?0:wo()):""},bo=function(e){var t=e.split(".");return t.length>=3&&t.includes("tt")&&!isNaN(Number(t[2]))&&Number(t[2])>0},wo=function(){if(_o)return _o;var e=go(_r);return e&&bo(e)?Number(e.split(".")[2]):0},Io=function(e,t,n){return e!==_r||bo(t)||(t=Eo(t)),document.cookie="".concat(e,"=").concat(t).concat(Oo(n)),t===go(e)},To=function(){function e(){i(this,e)}return a(e,null,[{key:"interceptCookies",value:function(){var e=Object.getOwnPropertyDescriptor(Document.prototype,"cookie"),t=this;Object.defineProperty(document,"cookie",Object.assign(Object.assign({},e),{set:function(n){if(e&&"function"==typeof e.set)try{var r=go(_r),i=e.set.call(this,n);if(t.ttpCookieRegex.test(n)){var o=go(_r);ao(Mr.CUSTOM_INFO,{custom_name:"cookie_set",extJSON:{message:"".concat(r,"||").concat(o),stack:(new Error).stack||""}})}return i}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"cookie_set_error"})}}}))}},{key:"interceptSessionStorage",value:function(){var e=sessionStorage.setItem.bind(sessionStorage),t=sessionStorage.clear.bind(sessionStorage),n=sessionStorage.removeItem.bind(sessionStorage);sessionStorage.clear=function(){try{var e=t();return ao(Mr.CUSTOM_INFO,{custom_name:"sessionStorage_clear",extJSON:{stack:(new Error).stack||""}}),e}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"sessionStorage_clear_error"})}},sessionStorage.setItem=function(t,n){try{var r=sessionStorage.getItem(t),i=e(t,n);return t===vr&&ao(Mr.CUSTOM_INFO,{custom_name:"sessionStorage_set",extJSON:{message:"".concat(r,"||").concat(n),stack:(new Error).stack||""}}),i}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"sessionStorage_set_error"})}},sessionStorage.removeItem=function(e){try{var t=n(e);return e===vr&&ao(Mr.CUSTOM_INFO,{custom_name:"sessionStorage_remove",extJSON:{stack:(new Error).stack||""}}),t}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"sessionStorage_remove_error"})}}}},{key:"listenPageLeave",value:function(){window.addEventListener("beforeunload",(function(){try{var e=go(_r);ao(Mr.CUSTOM_INFO,{custom_name:"track_beforeunload",extJSON:{message:"".concat(e)}})}catch(e){}}))}}]),e}();lo=To,To.ttpCookieRegex=/_ttp=/,To.init=bi((function(){try{lo.interceptCookies(),lo.interceptSessionStorage(),lo.listenPageLeave()}catch(e){co(Mr.API_ERROR,e,{custom_name:"StorageObserver_init_error"})}}));var Oo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},{path:"/"},e);"number"==typeof t.expires&&(t.expires=new Date(Date.now()+864e5*t.expires)),t.expires instanceof Date&&(t.expires=t.expires.toUTCString());var n="";for(var r in t)t[r]&&(n+="; ".concat(r),!0!==t[r]&&(n+="=".concat(t[r].split(";")[0])));return n},So=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cr(),i={path:n,expires:r};yo(e,t,i)};function No(){try{var e=document.readyState;return"loading"==e?wr.LOADING:"interactive"==e?wr.INTERACTIVE:"complete"==e?wr.COMPLETE:wr.UNKNOWN}catch(e){return wr.UNKNOWN}}function Ro(e){return new Promise((function(t,n){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var i=document.getElementsByTagName("script")[0];i&&i.parentNode?i.parentNode.insertBefore(r,i):n("none element"),r.onload=function(){t(!0)},r.onerror=n}))}var Ao=function(){var t=r(e().mark((function t(n){var r,i=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=i.length>1&&void 0!==i[1]?i[1]:1)>=0)){e.next=13;break}return e.prev=2,e.next=5,Ro(n);case 5:return e.abrupt("return",Promise.resolve(!0));case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",Ao.call(null,n,r-1));case 11:e.next=14;break;case 13:throw Error;case 14:case"end":return e.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}(),Po=function(e){return"function"==typeof Promise.allSettled?Promise.allSettled(e):function(e){var t=new Array(e.length),n=0;return new Promise((function(r,i){for(var o=function(i){var o=e[i];o&&"function"==typeof o.then?o.then((function(o){t[i]={status:"fulfilled",value:o},++n===e.length&&r(t)})).catch((function(o){t[i]={status:"rejected",reason:o},++n===e.length&&r(t)})):(t[i]={status:"fulfilled",value:o},++n===e.length&&r(t))},a=0;a1&&void 0!==arguments[1]?arguments[1]:null,n=t||Co;return n.includes(e)}function Mo(e){return!isNaN(e)&&e>=0}var Do=String.fromCharCode.bind(String),Lo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),xo=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Do(192|t>>>6)+Do(128|63&t):Do(224|t>>>12&15)+Do(128|t>>>6&63)+Do(128|63&t)}var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Do(240|n>>>18&7)+Do(128|n>>>12&63)+Do(128|n>>>6&63)+Do(128|63&n)},jo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Uo=function(e){return function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"===e?"-":"_"}))}(function(e){for(var t,n,r,i,o="",a=e.length%3,c=0;c255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o+=Lo[(t=n<<16|r<<8|i)>>18&63]+Lo[t>>12&63]+Lo[t>>6&63]+Lo[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o}(function(e){return e.replace(jo,xo)}(e)))},Fo=function(e){return t=JSON.stringify(e),Uo(t);var t},Bo=function(){var e=ni();return"object"===t(e)&&e._i?e._i:{}},qo=function(e,t){var n=Bo()||{};Object.keys(n).forEach((function(r){var i=n[r];i._init||i.push([e].concat(t))}))},Go=function(e,t,n){var r=(Bo()||{})[e];if(r){if(r._init)return;r.push([t].concat(n))}},Vo=function(e,t){try{var n=Ui(Jr,e,t)||void 0,r=Ui("ext_params",e,t)||void 0,i=Ui(Wr,e,t)||void 0,o=parseInt(Ui("ttuts",e,t),10)||void 0,a=i?JSON.parse(i):{},c=a.log_extra,u=void 0===c?void 0:c,s=a.idc,l=void 0===s?void 0:s,f=a.cid,d=void 0===f?void 0:f;return{callback:n,ext_params:r,log_extra:u,creative_id:d,idc:l,ttuts:o,ad_info_from:(u||l||d)&&"url"}}catch(e){return{}}},Ho=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Jo=function(){function e(t){i(this,e),this.userFormatInfo={},this.userFormatInfoV2={},this.enableAdTracking=!0,this.offsiteAdInfo={},this.tt_test_id="",this.signalDiagnosticLabels=Object.assign({},$n),this.init(t)}return a(e,[{key:"init",value:function(e){this.userInfo={},this.adInfo={},this.appInfo={},this.pageInfo={url:"",referrer:""},this.pageSign={sessionId:"",pageId:""},this.libraryInfo=e}},{key:"getAllData",value:function(){return{userInfo:this.userInfo,adInfo:this.adInfo,appInfo:this.appInfo,libraryInfo:this.libraryInfo,pageInfo:this.pageInfo,pageSign:this.pageSign,signalType:this.signalType,userFormatInfo:this.userFormatInfo,userFormatInfoV2:this.userFormatInfoV2,enableAdTracking:this.enableAdTracking,offsiteAdInfo:this.offsiteAdInfo,tt_test_id:this.tt_test_id}}},{key:"getLibraryInfo",value:function(){return this.libraryInfo}},{key:"setSignalType",value:function(e){this.signalType=e}},{key:"getSignalType",value:function(){return this.signalType}},{key:"setTestID",value:function(e){this.tt_test_id=e}},{key:"getTestID",value:function(){return this.tt_test_id}},{key:"setEnableAdTracking",value:function(e){this.enableAdTracking=e}},{key:"getEnableAdTracking",value:function(){return this.enableAdTracking}},{key:"setOffsiteAdInfo",value:function(e){this.offsiteAdInfo=Object.assign({},this.offsiteAdInfo,e)}},{key:"getOffsiteAdInfo",value:function(){return this.offsiteAdInfo}},{key:"getUserFormatInfo",value:function(){return this.userFormatInfo}},{key:"setUserFormatInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfo,e)}},{key:"getUserFormatInfoV2",value:function(){return this.userFormatInfoV2}},{key:"setUserFormatInfoV2",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfoV2,e)}},{key:"setUserInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userInfo,e)}},{key:"setUserInfoWithoutIdentifyPlugin",value:function(e){e&&Object.assign(this.userInfo,e)}},{key:"getUserInfo",value:function(){return this.userInfo}},{key:"getAdInfo",value:function(){return this.adInfo}},{key:"setAdInfo",value:function(e){e&&(this.adInfo?this.adInfo=Object.assign({},this.adInfo,e):this.adInfo=e)}},{key:"getAppInfo",value:function(){return this.appInfo}},{key:"setAppInfo",value:function(e){e&&(this.appInfo=Object.assign({},this.appInfo,e))}},{key:"getPageInfo",value:function(){return this.pageInfo}},{key:"getPageSign",value:function(){return this.pageSign}},{key:"setPageInfo",value:function(e,t){var n=Object.assign({},this.pageInfo),r=Object.assign({},this.pageSign);if(n.url!==e){var i=n.url;if(void 0!==n.url&&(n.referrer=n.url),void 0!==t&&(n.referrer=t),void 0!==r.pageIndex){var o=r.pageIndex,a=o.index,c=o.sub,u=o.main;r.pageIndex={index:++a,sub:++c,main:u}}return n.url=e,this.pageInfo=n,this.pageSign=r,{from:i,pageIndex:r.pageIndex}}}},{key:"setPageInfoData",value:function(e){this.pageInfo=Object.assign({},this.pageInfo,e)}},{key:"getSessionIdFromCache",value:function(){return null}},{key:"setSessionIdToCache",value:function(e){}},{key:"setSignalDiagnosticLabels",value:function(e){Object.assign(this.signalDiagnosticLabels,e)}},{key:"getSignalDiagnosticLabels",value:function(){return this.signalDiagnosticLabels}},{key:"getPageId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(Date.now());return"".concat(e,"-").concat(wi(5))}},{key:"getPageViewId",value:function(){var e=this.pageSign,t=e.pageId,n=e.pageIndex;return"".concat(t).concat(n?".".concat(n.main,".").concat(n.sub):"")}},{key:"getVariationId",value:function(){return""}},{key:"isLegacyPixel",value:function(e){return!1}},{key:"initPageSign",value:function(){var e=this.getSessionIdFromCache();null===e&&(e=or("sessionId"),this.setSessionIdToCache(e));var t={sessionId:e,pageId:or("pageId")};this.pageSign=t}}]),e}();Jo=Ho([R.injectable()],Jo);var Wo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ko=function(){function e(){i(this,e),this.events={}}return a(e,[{key:"on",value:function(e,t){var n=this.events[e]||[];n.push(t),this.events[e]=n}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Qo=function(e){u(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this)).reporterInfo={},o.options={},o.plugins={},o.rules=[],o.reportEventHistory={},o.reportResultSet=[],o.selfHostConfig={},o.currentHref="",o.advancedMatchingAvailableProperties={external_id:!0,partner_id:!0},o.reportService=r,o.context=e,o}return a(n,[{key:"getParameterInfo",value:function(){var e=this;return this.getInstance().then((function(){var t=e.reporterInfo,n=t.name,r=void 0===n?"":n,i=t.status,o=void 0===i?1:i,a=t.setupMode,c=void 0===a?0:a,u=t.advertiserID,s=void 0===u?"":u,l=t.is_onsite,f=void 0!==l&&l;return{pixelCode:e.getReporterId(),name:r,status:o,setupMode:c,advertiserID:s.toString(),partner:e.getReporterPartner()||"",is_onsite:f,advancedMatchingAvailableProperties:e.advancedMatchingAvailableProperties,rules:e.rules}}))}},{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this)}},{key:"getReporterId",value:function(){return""}},{key:"getReporterUniqueLoadId",value:function(){return"".concat(this.getReporterId())}},{key:"getReporterPartner",value:function(){}},{key:"getReporterInfo",value:function(){return{pixel:{code:this.getReporterId()}}}},{key:"setAdvancedMatchingAvailableProperties",value:function(e){this.advancedMatchingAvailableProperties=Object.assign({},this.advancedMatchingAvailableProperties,e)}},{key:"isOnsite",value:function(){return!1}},{key:"isPartnerReporter",value:function(){return!1}},{key:"getReportResultSet",value:function(){return this.reportResultSet}},{key:"getUserInfo",value:function(e){return{}}},{key:"getReporterMatchedUserFormatInfo",value:function(){return{}}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){return{}}},{key:"getReportEventHistoryKey",value:function(e){return"tiktok"}},{key:"clearHistory",value:function(){this.reportEventHistory={}}},{key:"pushReport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tiktok";this.reportEventHistory[t]||(this.reportEventHistory[t]=[]),this.reportEventHistory[t].push(e)}},{key:"hasReportEventHistory",value:function(e,t){var n=this.getReportEventHistoryKey(t);return this.reportEventHistory[n]?!(!Pr.includes(e)||!this.reportEventHistory[n].includes(e)):(this.reportEventHistory[n]=[],!1)}},{key:"page",value:function(){}},{key:"track",value:function(e,t,n,r,i){var o=this,a=r||Nr.TRACK,c=i||Bn.defaultReport;return!this.reportService||this.hasReportEventHistory(e,c)?Promise.resolve(null):(this.pushReport(e,this.getReportEventHistoryKey(c)),Po(this.reportService.reportPreposition||[]).then((function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:window.ttq._pf_tn||"track_after_report_preposition",functionName:window.ttq._pf_tn&&"track_after_report_preposition",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="track_after_report_preposition")}}catch(e){}var i=o.getReporterId(),u=o.trackSync(i,e,t,n,a,c);o.trackPostTask({reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:u});var s={reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:u};try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"track_after_report_preposition"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}return Promise.resolve(s)})))}},{key:"getEventType",value:function(e){return e}},{key:"trackPostTask",value:function(e){}},{key:"trackSync",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Nr.TRACK,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,a=arguments.length>6?arguments[6]:void 0,c=i!==Nr.SELFHOST?this.assemblyData(e,t,n,r,i):this.assemblySelfHostData(e,t,n,r,i),u=a||fo(i,e);if(null!==u&&this.reportService)return this.emit("beforeReport",e,t,c,r,i),this.reportResultSet.push(this.reportService.report(u,c,o)),c}},{key:"handlePropertiesToOptions",value:function(e,t){var n={};return t.forEach((function(t){n[t]=e[t],delete e[t]})),n}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};arguments.length>4&&void 0!==arguments[4]||Nr.TRACK;var i=this.context.getAllData(),o=i.adInfo,a=i.userInfo,c=i.appInfo,u=i.pageSign,s=i.libraryInfo,l=i.pageInfo,f=i.signalType,d=u.sessionId,p=u.variationId,h=Object.assign({},n),_=h&&h.pixelMethod||"";h&&h.pixelMethod&&delete h.pixelMethod;var v=Object.assign({},s,{version:this.context.isLegacyPixel(e)?"legacy-".concat(s.version):s.version}),g=Ii(o,Xn),y=Object.assign({},g,{device_id:c.device_id,uid:c.user_id}),m=this.handlePropertiesToOptions(h,[Fn.LDU,Fn.EVENTID,Fn.EVENT_ID]),E=this.options.limited_data_use,b=null!==m.limited_data_use&&void 0!==m.limited_data_use?m.limited_data_use:E;null==b?delete m.limited_data_use:m.limited_data_use=!!b;var w=r&&(r.event_id||r.eventID)||"";m.event_id=w||m.event_id||m.eventID||"",delete m.eventID;var I=this.getReporterInfo();I.pixel&&(I.pixel.runtime=eo(),_&&(I.pixel.mode=_));var T=this.getUserInfo(Hn.Manual)||{},O=this.getUserInfo(Hn.ManualV2)||{},S=this.getReporterMatchedUserFormatInfoV2()||{},N=this.getUserInfo(Hn.Auto)||{};N.auto_trigger_type&&(Object.assign(h,{auto_trigger_type:N.auto_trigger_type}),delete N.auto_trigger_type),Wi()&&Object.assign(h,{android_version:c.android_version,device_model:c.device_model});var R={};a.anonymous_id&&(R.anonymous_id=a.anonymous_id);var A=this.getEventType(t),P={event:A,event_id:w,message_id:ar(or(hr),e),is_onsite:!!f,timestamp:(new Date).toJSON(),context:Object.assign(Object.assign({ad:y,device:{platform:c.platform},user:Object.assign({},R,T,O,N)},I),{page:Object.assign({},l),library:Object.assign({},v),session_id:ar(d,e),pageview_id:ar(this.context.getPageViewId(),this.getReporterUniqueLoadId(),mr),variation_id:p||""}),_inspection:S,properties:h};return Object.assign(P,m)}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;return this.assemblyData(e,t,n,r,i)}}]),n}(Ko);Qo=Xo([R.injectable()],Qo);var zo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Zo=function(){function e(t){var n=t.name,r=t.context,o=t.reporters;i(this,e),this.reporters=[],this.context=r,this.reporters=o,this.name=n}return a(e,[{key:"initStart",value:function(){}},{key:"initEnd",value:function(){}},{key:"adInfoInitStart",value:function(){}},{key:"adInfoInitEnd",value:function(){}},{key:"contextInitStart",value:function(){}},{key:"contextInitEnd",value:function(){}},{key:"pageUrlWillChange",value:function(e,t){}},{key:"pageUrlDidChange",value:function(e,t){}},{key:"pageDidLoad",value:function(){}},{key:"pageWillLeave",value:function(e){}},{key:"pixelSend",value:function(e,t,n,r,i){}},{key:"pixelDidMount",value:function(e){}}]),e}(),$o=function(e){u(n,e);var t=p(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n)}(Zo=zo([R.injectable()],Zo)),ea=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ta=function(){function e(t,n){i(this,e),this.initialize=!1,this.plugins=[],this.observers=[],this.reporters=[],this.context=t,this.reportService=n}return a(e,[{key:"init",value:function(e,t){this.initContextInfo(e,t),this.initialize=!0}},{key:"initContextInfo",value:function(e,t){var n=this;this.dispatch(br.CONTEXT_INIT_START),this.initAdInfo(e,t),this.initAppInfo(e,t),this.reportService.pushPreposition(Promise.resolve().then((function(){return n.initUserInfo()}))),this.initTestId(e,t),this.dispatch(br.CONTEXT_INIT_END)}},{key:"setPageIndex",value:function(e){}},{key:"setPageInfo",value:function(e,t){var n=this.context.getPageInfo().url;if(n!==e){this.dispatch(br.PAGE_URL_WILL_CHANGE,t||n,e);var r=this.context.setPageInfo(e,t||n);(null==r?void 0:r.pageIndex)&&this.setPageIndex(r.pageIndex),this.dispatch(br.PAGE_URL_DID_CHANGE,e,n)}}},{key:"initAdInfo",value:function(e,t){}},{key:"initOffsiteAdInfo",value:function(e){}},{key:"initAppInfo",value:function(e,t){}},{key:"initUserInfo",value:function(){}},{key:"initTestId",value:function(e,t){}},{key:"usePlugin",value:function(e){try{if(!this.plugins.find((function(t){return t.name===e.name}))){this.plugins.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1),"Plugin")]=e}}catch(e){}}},{key:"useObserver",value:function(e){try{if(!this.observers.find((function(t){return t.name===e.name}))){this.observers.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1))]=e}}catch(e){}}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))||null}},{key:"getReporter",value:function(e){return this.reporters.find((function(t){return t.getReporterId()===e}))}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||(co(Mr.PIXEL_EMPTY,new Error(""),{pixelCode:e}),new Yo(e))}},{key:"instances",value:function(){return this.reporters}},{key:"identify",value:function(e,t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={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(e){}var r=Mi(e,t);this.context.setUserInfo(r);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),"identify_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}}},{key:"page",value:function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={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(e){}e.url!==this.context.getPageInfo().url&&(this.setPageInfo(e.url,e.referrer),this.reporters.forEach((function(e){e.clearHistory()})));var n=Object.assign({},e);delete n.url,delete n.referrer,this.reporters.forEach((function(e){e.page(n)}));try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),"page_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}}},{key:"isOnsitePage",value:function(){return this.context.getSignalType()===Er.ONSITE||this.reporters.every((function(e){return e.isOnsite()}))}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={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(e){}this.instances().forEach((function(r,i){r.track(e,t,Object.assign({_i:i},n))}));try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"track_api_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ra=function(){function t(e,n){i(this,t),this.reportPreposition=[],this.httpService=e,this.bridgeService=n}var n;return a(t,[{key:"pushPreposition",value:function(e){this.reportPreposition.push(e)}},{key:"report",value:(n=r(e().mark((function t(n,r,i){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),t)}))),function(e,t,r){return n.apply(this,arguments)})}]),t}();ra=na([R.injectable()],ra);var ia,oa=function(e){u(n,e);var t=p(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).observers=new Set([]),r}return a(n,[{key:"addObserver",value:function(e){this.observers.has(e)||this.observers.add(e)}},{key:"removeObserver",value:function(e){this.observers.delete(e)}},{key:"notifyObservers",value:function(e,t){this.observers.forEach((function(n){return n.call(t,e)}))}}]),n}(Zo);!function(e){e[e.Live=0]="Live",e[e.NoRecord=1]="NoRecord"}(ia||(ia={}));var aa,ca=function(e,t,n){e.isBound(t)?e.rebind(t).toConstantValue(n):e.bind(t).toConstantValue(n)},ua=function(e,t){var n=t.id,r=t.type,i=void 0===r?Zn.PIXEL_CODE:r,o=t.info,a=t.options,u=void 0===a?{}:a,s=t.plugins,l=void 0===s?{}:s,f=t.rules,d=void 0===f?[]:f;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var p={taskName:window.ttq._pf_tn,functionName:"webReporterFactory",start:performance.now()}}catch(e){}var h=e.get(kr.TTQ),_=e.get(kr.TTQ_REPORTERS);if(!_.some((function(e){return e.getReporterId()===n}))){ca(e,Rr.ID,n),ca(e,Rr.Type,i),ca(e,Rr.Info,o||c({},i,n)),ca(e,Rr.Options,u),ca(e,Rr.Plugins,l),ca(e,Rr.Rules,d),h.enableFirstPartyCookie((null==o?void 0:o.firstPartyCookieEnabled)||!1);var v=e.get(kr.REPORTER);if(l){var g=l.AdvancedMatching,y=l.AutoAdvancedMatching,m={};g&&Object.assign(m,g),y&&Object.assign(m,y),v.setAdvancedMatchingAvailableProperties(m)}v.on("beforeReport",(function(e,t,n,r,i){h.dispatch(br.PIXEL_SEND,e,t,n,r,i)})),_.push(v),e.rebind(kr.TTQ_REPORTERS).toConstantValue(_),h.dispatch(br.PIXEL_DID_MOUNT,v);try{window.ttq&&window.ttq._ppf&&(p.end=performance.now(),window.ttq._ppf.push(p))}catch(e){}return v}},sa=function(e,t){var n=e.get(kr.TTQ_GLOBAL_OPTIONS)||{};!function(e,t){var n=e||{},r=n._partner,i=n._ttp,o=n._self_host_config,a=n._usd_exchange_rate,c=n._legacy,u=n._cc,s=n._variation_id,l=n._server_unique_id,f=n._currency_list,d=n._plugins,p=n._aam,h=n._auto_config,_=n._cde;Object.assign(t,{partner:r,ttp:i,cc:u,self_host_config:o,usd_exchange_rate:a,legacy:c,variation_id:s,server_unqiue_id:l,currency_list:f,plugins:d,aam:p,auto_config:h,cde:_})}(t,n),e.isBound(kr.TTQ_GLOBAL_OPTIONS)?e.rebind(kr.TTQ_GLOBAL_OPTIONS).toConstantValue(n):e.bind(kr.TTQ_GLOBAL_OPTIONS).toConstantValue(n)},la=function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"freezeAPI",start:performance.now()}}catch(e){}var n=ei(),r=ti(),i=ni(),o=so().pixelCode,a=void 0===o?"":o,c=["holdConsent","revokeConsent","grantConsent"];["instance","instances","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"].forEach((function(t){Object.defineProperty(i,t,{get:function(){return function(){try{var n=Array.prototype.slice.call(arguments);return c.indexOf(t)>-1&&setTimeout((function(){ao(Mr.CUSTOM_INFO,{pixelCode:a,custom_name:t,custom_enum:JSON.stringify(n)})})),e[t].apply(e,n)}catch(e){return co(Mr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),["page","track","identify"].forEach((function(t){Object.defineProperty(i,t,{get:function(){return function(){try{var n=1===arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return c.indexOf(t)>-1&&setTimeout((function(){var e=JSON.stringify(n.map((function(e){return rr(e)?Object.keys(e):e})));ao(Mr.CUSTOM_INFO,{pixelCode:a,custom_name:t,custom_enum:e})})),qo(t,n),e[t].apply(e,n)}catch(e){return co(Mr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),n[r]._mounted=!0,n[r].initialize=!0,function(e){$r=e}(n[r]);try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}},fa=function(e,t,n){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"handleCache",start:performance.now()}}catch(e){}var i=function(){var e=ni();return e&&e._i||{}}();Object.entries(i).forEach((function(r){var i=v(r,2),o=i[0],a=i[1];if(!a._init&&("Tealium"===ai(o)||ri()||a.info)){if(t.getReporter(o))uo(Dr.DUPLICATE_PIXEL_CODE);else(n||ua)(e,{id:o,type:Zn.PIXEL_CODE,info:a.info,options:a.options,rules:a.rules,plugins:a.plugins});if(a._init=!0,a.length>0)for(;a.length;){var c=a.shift();if(c){var u=g(c),s=u[0],l=u.slice(1),f=t.instance(o);if(f)switch(s){case"identify":t.identify(l[0],l[1]);break;case"page":t.page(l[0]);break;case"track":f.track(l[0],l[1],l[2]||{});break;default:f[s]?f[s](l[0],l[1],l[2]||{}):co(Mr.CUSTOM_ERROR,new Error("action not find: ".concat(f[s])))}}}}})),da(t);try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(e){}},da=function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"handleGlobalCache",start:performance.now()}}catch(e){}var n=ni();if(n.length>0)for(;n.length;){var r=n.shift();if(r){var i=g(r),o=i[0],a=i.slice(1);switch(ci("Tealium")||qo(o,a),o){case"identify":e.identify(a[0],a[1]);break;case"page":e.page(a[0]);break;case"track":e.track(a[0],a[1],a[2]||{});break;case"enableCookie":e.enableCookie();break;case"disableCookie":e.disableCookie();break;case"holdConsent":e.holdConsent();break;case"revokeConsent":e.revokeConsent();break;case"grantConsent":e.grantConsent()}}}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}},pa={ViewForm:"ViewContent",ViewConsultationPage:"ViewContent",ViewDownloadPage:"ViewContent",Checkout:"PlaceAnOrder",Purchase:"CompletePayment",Registration:"CompleteRegistration",AddBilling:"AddPaymentInfo",StartCheckout:"InitiateCheckout",ClickInDownloadPage:"ClickButton",ClickInConsultationPage:"ClickButton",ClickForm:"ClickButton",ClickToDownload:"Download",Consult:"Contact",ConsultByPhone:"Contact"},ha=["event_experiment","dynamic_parameter_config","eb_version","tf"],_a=function(e){var t;return e.context.ad={},Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).forEach((function(t){e.context.user[t]=""})),e},va=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.forEach((function(e){t.hasOwnProperty(e)&&(n[e]=t[e],delete t[e])})),n},ga=function(e){u(r,e);var n=p(r);function r(e){var t;i(this,r);var o=e.id,a=e.type,u=e.isOnsitePage,s=e.context,l=e.reporterInfo,f=e.ttqOptions,d=e.reportService,p=e.plugins,h=void 0===p?{}:p,_=e.rules,v=void 0===_?[]:_,g=e.options,y=void 0===g?{}:g;return(t=n.call(this,s,d)).ttp="",t.loaded=!1,t.id=o,t.pixelCode=o,t.type=a,t.isOnsitePage=u,t.options=y||{},t.plugins=h||{},t.rules=v||[],t.reporterInfo=Object.assign(l||{},c({},a,o)),t.ttp=f.ttp||"",t.currency_list=f.currency_list||null,t.ttqPartner=f.partner||"",t.selfHostConfig=f.self_host_config||{},t.pixelPromise=t.getInstance(),t}return a(r,[{key:"identify",value:function(e,t){var n=Mi(e,t);this.context.setUserInfo(n)}},{key:"getReporterId",value:function(){return this.id||""}},{key:"getReporterUniqueLoadId",value:function(){return"".concat(this.reporterInfo.loadId,"-").concat(this.getReporterId())}},{key:"getReporterPartner",value:function(){var e;return(null===(e=this.reporterInfo)||void 0===e?void 0:e.partner)||""}},{key:"setPixelInfo",value:function(e,t,n){var r=this.type;this.reporterInfo=Object.assign(this.reporterInfo,Object.assign({},e),c({},r,this.getReporterId())),t&&(this.rules=t),n&&(this.plugins=n)}},{key:"getInstance",value:function(){return Promise.resolve(this)}},{key:"getReporterInfo",value:function(){return this.reporterInfo.pixelCode?_(s(r.prototype),"getReporterInfo",this).call(this):{shop_id:this.reporterInfo.shopId,eventSourceId:this.reporterInfo.eventSourceId}}},{key:"getUserInfo",value:function(e){var t=this.context.getUserInfo(),n=Ti(t,Object.assign({},this.advancedMatchingAvailableProperties));switch(e){case Hn.Manual:return Ti(this.isPartnerReporter()?n:t,{external_id:!0,email:!0,phone_number:!0});case Hn.ManualV2:return Ti(this.isPartnerReporter()?n:t,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0});case Hn.Auto:var r=Ti(n,{external_id:!0,auto_email:!0,auto_phone_number:!0});return Object.assign(r,(r.auto_email||r.auto_phone_number)&&t.auto_trigger_type?{auto_trigger_type:t.auto_trigger_type}:{});default:return n}}},{key:"getReporterMatchedUserFormatInfo",value:function(){var e=this.context.getUserFormatInfo(),t=function(e,t){var n={identity_params:{}};return 0===Object.keys(e).length?{}:(Object.entries(t).forEach((function(t){var r=v(t,2),i=r[0];if(r[1])if(e[i]&&e[i].length){var o=e[i]||[Gn.EMPTY_VALUE];n.identity_params[i]=y(o)}else n.identity_params[i]=[Gn.EMPTY_VALUE]})),n)}(e,this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),n=Ti(e,{auto_email:!0,auto_phone_number:!0});return Object.keys(n).length>0&&(t.identity_params||(t.identity_params={}),Object.assign(t.identity_params,n)),t}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){return function(e,t){if(0===Object.keys(e).length)return{};var n={identity_params:{}},r={email:["email_is_hashed","sha256_email"],phone_number:["phone_is_hashed","sha256_phone"],zip_code:["zip_code"]};return Object.entries(t).forEach((function(t){var i=v(t,2),o=i[0];i[1]&&r[o]&&r[o].forEach((function(t){if(n.identity_params[t]=[Gn.EMPTY_VALUE],e[t]){var r=e[t]||[Gn.EMPTY_VALUE];n.identity_params&&(n.identity_params[t]=y(r))}}))})),n}(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})}},{key:"isOnsite",value:function(){var e;return!!(null===(e=this.reporterInfo)||void 0===e?void 0:e.is_onsite)}},{key:"isPartnerReporter",value:function(){var e=this.getReporterPartner();return!(!e||"None"===e)}},{key:"getSignalDiagnosticLabels",value:function(){var e=this.context.getSignalDiagnosticLabels();if(!e)return Object.assign({},$n);var t=this.advancedMatchingAvailableProperties,n=t.email,r=t.phone_number,i=t.auto_email,o=t.auto_phone_number;n=!this.isPartnerReporter()||n,r=!this.isPartnerReporter()||r;var a=Ti(e,{raw_email:n,raw_phone:r,hashed_email:n,hashed_phone:r,raw_auto_email:i,raw_auto_phone:o});return Object.assign({},$n,a)}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Nr.TRACK,a=_(s(r.prototype),"assemblyData",this).call(this,e,t,n,i,o);a.is_onsite=this.isOnsitePage.value;var c=ai(e)||this.ttqPartner;c&&(a.partner=c),a.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var u=ii();u&&(a.context.userAgent=u);var l=No();return l&&(a.context.page.load_progress=l),a._inspection=va(ha,a.properties,a._inspection),o!==Nr.PAGE&&(a._inspection.ppf=si()),a.context.ad.sdk_env=Bi(),a.context.ad.jsb_status=zi(),o!==Nr.INTERACTION&&o!==Nr.PERFORMANCE&&o!==Nr.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(a.context.user={},a.context.ad=this.context.getOffsiteAdInfo(),a.context.ad=Ii(a.context.ad,Xn)),a}},{key:"page",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Fi(),n=t.url;n!==this.currentHref&&(this.currentHref=n,this.track(Ar,e,{}))}},{key:"track",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Nr.TRACK,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Bn.defaultReport;return i&&i.pixel_code&&this.getReporterId()!==i.pixel_code?Promise.resolve(null):this.getInstance().then((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(e){}var u=t.getReporterId();if(Lr.includes(e))return _(s(r.prototype),"track",t).call(t,e,n,i,o,a);var l=Object.assign({},i);t.selfHostConfig[u]&&!i.eventID&&(l=Object.assign({},l,{eventID:ar(or(yr),u)}));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(e){}return _(s(r.prototype),"track",t).call(t,e,n,l,o,a)}))}},{key:"getEventType",value:function(e){return pa[e]||e}},{key:"trackSync",value:function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Nr.TRACK,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,l=arguments.length>6?arguments[6]:void 0;if("track"===c&&ao(Mr.PIXEL_SEND,{pixelCode:e,extJSON:{event:n}}),c===Nr.TRACK){o&&"string"==typeof o.currency&&(o.currency=o.currency.toUpperCase());var f=this.context.getTestID();if(f){var d=this.assemblyData(e,n,o,a);d.tt_test_id=f;var p=_a(d);return null===(i=null==this?void 0:this.reportService)||void 0===i||i.report(l||jr,p,Bn.htmlHttpReport),p}if(o&&"object"===t(o)){var h=o.value,v=o.currency;void 0===h||Mo(h)||ao(Mr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:n,value:h,currency:v}}),void 0===v||ko(v,this.currency_list)||ao(Mr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:n,value:h,currency:v}})}return _(s(r.prototype),"trackSync",this).call(this,e,n,o,a,c,u,l)}_(s(r.prototype),"trackSync",this).call(this,e,n,o,a,c,u,l)}},{key:"trackPostTask",value:function(e){var t=e.reporterId,n=e.eventType,r=e.properties,i=e.eventConfig;Lr.includes(n)||this.selfHostConfig[t]&&!this.hasReportEventHistory(n,Bn.htmlHttpReport)&&(this.pushReport(n,this.getReportEventHistoryKey(Bn.htmlHttpReport)),this.trackSync(t,n,r,i,Nr.SELFHOST,Bn.htmlHttpReport))}},{key:"getReportEventHistoryKey",value:function(e){return e===Bn.htmlHttpReport?this.selfHostConfig[this.getReporterId()]:"tiktok"}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,o=this.assemblyData(e,t,n,r,i),a=this.ttp;return a&&(o.context.user.ttp=a),o}}]),r}(Qo),ya=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ma=function(e,t){return function(n,r){t(n,r,e)}},Ea=function(e){u(n,e);var t=p(n);function n(e,r,o,a,c,u,s,l,f,d){return i(this,n),t.call(this,{id:e,type:r,isOnsitePage:o,context:a,reporterInfo:c,ttqOptions:u,reportService:s,plugins:l,rules:f,options:d})}return a(n,[{key:"getInstance",value:function(){var e=this;if(this.pixelPromise)return this.pixelPromise;var t=function(e){return Bo()[e]||{}}(this.id);return ri()||t&&t.info?(this.loaded=!0,this.pixelPromise=Promise.resolve(this)):(this.pixelPromise=new Promise((function(t,n){var r,i,o=function(e){var t=Fi().url;try{return new URL(e||t)}catch(e){}return null}();Ao((r=e.id,i=(null==o?void 0:o.hostname)||"","".concat("https://analytics.tiktok.com/i18n/pixel/config.js","?sdkid=").concat(r,"&hostname=").concat(i))).then((function(){e.loaded=!0,t(e)})).catch((function(t){e.pixelPromise=null,n(t)}))})),this.pixelPromise)}}]),n}(ga),ba=function(e){u(n,e);var t=p(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this),this.pixelPromise}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Go(this.getReporterId(),"track",[e,t,n]),Promise.resolve(null)}}]),n}(Ea=ya([R.injectable(),ma(0,R.inject(Rr.ID)),ma(1,R.inject(Rr.Type)),ma(2,R.inject(Rr.IsOnsitePage)),ma(3,R.inject(kr.CONTEXT)),ma(4,R.inject(Rr.Info)),ma(5,R.inject(kr.TTQ_GLOBAL_OPTIONS)),ma(6,R.inject(kr.REPORT_SERVICE)),ma(6,R.optional()),ma(7,R.inject(Rr.Plugins)),ma(7,R.optional()),ma(8,R.inject(Rr.Rules)),ma(8,R.optional()),ma(9,R.inject(Rr.Options)),ma(9,R.optional())],Ea)),wa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ia=function(e,t){return function(n,r){t(n,r,e)}},Ta=function(t){u(c,t);var n,o=p(c);function c(e,t,n,r,a,u,s,l,f,d,p,h,_,v,g,y,m,E,b,w,I,T,O){var S;i(this,c),(S=o.call(this,e,a)).env=l,S.reporters=t,S.cookieService=u,S.consentService=s,S.adService=n,S.appService=r,S.historyObserver=T,S.autoAdvancedMatchingPlugin=d,S.callbackPlugin=p,S.identifyPlugin=h,S.monitorPlugin=f,S.webFLPlugin=_,S.shopifyPlugin=v,S.autoConfigPlugin=g,S.diagnosticsConsolePlugin=y,S.competitorInsightPlugin=m,S.pangleCookieMatchingPlugin=E,S.eventBuilderPlugin=b,S.pagedataPlugin=I,S.enrichIpv6Plugin=w,S.runtimeMeasurementPlugin=O,S.historyObserver&&S.useObserver(S.historyObserver),S.autoAdvancedMatchingPlugin&&S.usePlugin(S.autoAdvancedMatchingPlugin),S.callbackPlugin&&S.usePlugin(S.callbackPlugin),S.identifyPlugin&&S.usePlugin(S.identifyPlugin),S.monitorPlugin&&S.usePlugin(S.monitorPlugin),S.webFLPlugin&&S.usePlugin(S.webFLPlugin),S.shopifyPlugin&&S.usePlugin(S.shopifyPlugin),S.autoConfigPlugin&&S.usePlugin(S.autoConfigPlugin),S.diagnosticsConsolePlugin&&S.usePlugin(S.diagnosticsConsolePlugin),S.competitorInsightPlugin&&S.usePlugin(S.competitorInsightPlugin),S.pangleCookieMatchingPlugin&&S.usePlugin(S.pangleCookieMatchingPlugin),S.eventBuilderPlugin&&S.usePlugin(S.eventBuilderPlugin),S.enrichIpv6Plugin&&S.usePlugin(S.enrichIpv6Plugin),S.runtimeMeasurementPlugin&&S.usePlugin(S.runtimeMeasurementPlugin),S.monitorPlugin&&(oo.info.forEach((function(e){var t;null===(t=S.monitorPlugin)||void 0===t||t.info(e.event,e.detail,e.withoutJSB)})),oo.error.forEach((function(e){var t;null===(t=S.monitorPlugin)||void 0===t||t.error(e.event,e.err,e.detail,e.withoutJSB)})),oo.info=[],oo.error=[]),S.dispatch(br.INIT_START),S.pagedataPlugin&&S.usePlugin(S.pagedataPlugin),S.onPageLoaded(),S.onPageLeave();var N=Fi(),R=N.url,A=N.referrer;return S.init(R,A),S.setPageInfo(R,A),S.dispatch(br.INIT_END),S}return a(c,[{key:"initAdInfo",value:function(e,t){this.dispatch(br.BEFORE_AD_INFO_INIT_START);var n=po(fr);if(n)this.initAdCache(n);else if(no()){var r=Vo(e,t);r&&(r.creative_id&&r.log_extra||r.callback)&&(this.dispatch(br.AD_INFO_INIT_START),ho(fr,r),this.setAdInfo(r),this.initOffsiteAdInfo(r))}else this.initBaseAdInfo(e,t)}},{key:"initAdCache",value:function(e){this.dispatch(br.AD_INFO_INIT_START),e.ad_info_from="cache",e.ad_info_status="fulfilled(cache)",this.setAdInfo(e),this.initOffsiteAdInfo(e)}},{key:"initBaseAdInfo",value:function(t,n){var i=this;this.adService.webBridgeService.jsbridge&&this.dispatch(br.AD_INFO_INIT_START),this.reportService.pushPreposition(r(e().mark((function r(){var o;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.adService.getAdInfo(t,n);case 3:o=e.sent,i.context.setAdInfo(o),i.initOffsiteAdInfo(o),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),co(Mr.INIT_ERROR,e.t0,{extJSON:{position:"initAdInfo"}});case 11:case"end":return e.stop()}}),r,null,[[0,8]])})))())}},{key:"initOffsiteAdInfo",value:function(e){var t=function(e,t){var n={};try{var r=e.creative_id,i=(e.callback,e.idc),o=e.convert_id,a=e.ad_info_from,c=e.ad_info_status,u=e.log_extra,s=e.ext_params,l=e.ATTStatus;if(r&&(n.creative_id=r),i&&(n.idc=i),o&&(n.convert_id=o),a&&(n.ad_info_from=a),c&&(n.ad_info_status=c),s&&(n.ext_params=s),l&&(n.ATTStatus=l),u){var f=JSON.parse(u),d=f.ad_user_agent,p=f.ad_id,h=f.rit,_=f.ocbs,v=f.vid,g=f.idc,y=f.country_id;p&&(n.ad_id=p),h&&(n.rit=h),d&&(n.ad_user_agent=d),_&&(n.ocbs=_),v&&(n.vid=v),g&&(n.idc=g),y&&(n.country_id=y)}return n}catch(e){return t&&t(e),n}}(e,(function(e){co(Mr.INIT_ERROR,e,{extJSON:{position:"handleAdInfoOfficial"}})}));this.context.setOffsiteAdInfo(t);var n=function(e,t){try{var n=e.log_extra,r=e.ttuts;return!Ki()||(Vi(t)?n?1!==JSON.parse(n).user_tracking_status:null===e.ATTStatus||void 0===e.ATTStatus||3===e.ATTStatus:null==r||1!==r)}catch(e){return!1}}(e,this.env);this.context.setEnableAdTracking(n),this.dispatch(br.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:n}})}},{key:"initAppInfo",value:function(t,n){var i=this,o=po(dr);o?this.context.setAppInfo(o):this.reportService.pushPreposition(r(e().mark((function r(){var o;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.initBaseAppInfo(t,n);case 2:return o=e.sent,e.abrupt("return",o);case 4:case"end":return e.stop()}}),r)})))())}},{key:"initBaseAppInfo",value:(n=r(e().mark((function t(n,r){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appService.getAppInfo(n,r);case 2:return i=e.sent,this.context.setAppInfo(i),e.abrupt("return",i);case 5:case"end":return e.stop()}}),t,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"initTestId",value:function(e,t){if(!this.context.getTestID()){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;try{var r=Ui("tt_test_id",e,n);return r&&r!==t&&So("tt_test_id",r,void 0,"session"),r||t}catch(e){return""}}(e,go("tt_test_id"),t);this.context.setTestID(n)}}},{key:"initUserInfo",value:function(){this.setCookieInfo()}},{key:"setPageIndex",value:function(e){e&&mo(e)}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||new ba(e,Zn.PIXEL_CODE,{value:!1},this.context,{pixelCode:e},{})}},{key:"instances",value:function(){return this.reporters}},{key:"page",value:function(e){this.beforeAPIExecution();var t=Fi(),n=t.url,r=t.referrer;_(s(c.prototype),"page",this).call(this,Object.assign({url:(null==e?void 0:e.page)||n,referrer:(null==e?void 0:e.referrer)||r},e))}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"web_track_handler",start:performance.now()}}catch(e){}this.beforeAPIExecution();var i=n.pixel_code;if(void 0===i&&_(s(c.prototype),"track",this).call(this,e,t,n),void 0!==i){var o=this.instance(i);o instanceof ba||o.track(e,t,n)}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(e){}}},{key:"identify",value:function(e,t){this.beforeAPIExecution(),_(s(c.prototype),"identify",this).call(this,e,t)}},{key:"setAdInfo",value:function(e){this.context.setAdInfo(e)}},{key:"enableFirstPartyCookie",value:function(e){this.cookieService.enableFirstPartyCookie(e),e&&this.setCookieInfo()}},{key:"enableCookie",value:function(){this.cookieService.enableFirstPartyCookie(!0),this.setCookieInfo(),this.cookieService.enableCookie()}},{key:"disableCookie",value:function(){this.cookieService.disableCookie(),this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:void 0}),this.disablePangleCookie()}},{key:"holdConsent",value:function(){this.consentService.setConsentMode(Qn.HOLD)}},{key:"revokeConsent",value:function(){this.consentService.setConsentMode(Qn.REVOKE)}},{key:"grantConsent",value:function(){this.consentService.setConsentMode(Qn.GRANT)}},{key:"disablePangleCookie",value:function(){this.pangleCookieMatchingPlugin&&this.pangleCookieMatchingPlugin.disablePangleCookie()}},{key:"setAnonymousId",value:function(e){this.cookieService.setAnonymousId(e),this.initUserInfo()}},{key:"resetCookieExpires",value:function(){this.cookieService.resetExpires()}},{key:"setCookieInfo",value:function(){if(this.cookieService.canUseCookie()){var e=this.cookieService.getAnonymousId();if(e){var t={anonymous_id:e};this.context.setUserInfoWithoutIdentifyPlugin(t)}}}},{key:"onPageLoaded",value:function(){var e=this;window.addEventListener("load",(function(){e.dispatch(br.PAGE_DID_LOAD)}),{once:!0})}},{key:"onPageLeave",value:function(){var e=this,t=function(){var t=Date.now();e.dispatch(br.PAGE_WILL_LEAVE,t),e.consentService.updateCache()};window.addEventListener("beforeunload",t,{once:!0}),Ki()&&window.addEventListener("onpagehide"in window?"pagehide":"unload",t)}},{key:"beforeAPIExecution",value:function(){try{(function(e){return Fi().url===e.getPageInfo().url})(this.context)||function(e,t){var n=Fi().url;e.setPageInfo(n,document.referrer),t.forEach((function(e){e.clearHistory()}))}(this.context,this.reporters),function(e){return go(_r)===e.getUserInfo().anonymous_id}(this.context)||function(e){var t=e.getUserInfo().anonymous_id,n=go(_r);t!==n&&(e.setUserInfoWithoutIdentifyPlugin({anonymous_id:n}),ao(Mr.CUSTOM_INFO,{custom_name:"undetected_cookie_set",extJSON:{message:"".concat(t,"||").concat(n)}}))}(this.context)}catch(e){co(Mr.API_ERROR,e,{extJSON:{position:"beforeAPIExecution"}})}}},{key:"loadPixel",value:function(e,t){e&&(this.reporters.find((function(t){return t.getReporterId()===e}))?uo(Dr.DUPLICATE_PIXEL_CODE):ni().load(e,t||{}))}}]),c}(ta),Oa=Ta=wa([R.injectable(),Ia(0,R.inject(kr.CONTEXT)),Ia(1,R.inject(kr.TTQ_REPORTERS)),Ia(2,R.inject(kr.AD_SERVICE)),Ia(3,R.inject(kr.APP_SERVICE)),Ia(4,R.inject(kr.REPORT_SERVICE)),Ia(5,R.inject(kr.COOKIE_SERVICE)),Ia(6,R.inject(kr.CONSENT_SERVICE)),Ia(7,R.inject(kr.ENV)),Ia(8,R.inject(kr.MONITOR_PLUGIN)),Ia(8,R.optional()),Ia(9,R.inject(kr.AUTO_ADVANCED_MATCHING_PLUGIN)),Ia(9,R.optional()),Ia(10,R.inject(kr.CALLBACK_PLUGIN)),Ia(10,R.optional()),Ia(11,R.inject(kr.IDENTIFY_PLUGIN)),Ia(11,R.optional()),Ia(12,R.inject(kr.WEB_FL_PLUGIN)),Ia(12,R.optional()),Ia(13,R.inject(kr.SHOPIFY_PLUGIN)),Ia(13,R.optional()),Ia(14,R.inject(kr.AUTO_CONFIG_PLUGIN)),Ia(14,R.optional()),Ia(15,R.inject(kr.DIAGNOSTICS_CONSOLE_PLUGIN)),Ia(15,R.optional()),Ia(16,R.inject(kr.COMPETITOR_INSIGHT_PLUGIN)),Ia(16,R.optional()),Ia(17,R.inject(kr.PANGLE_COOKIE_MATCHING_PLUGIN)),Ia(17,R.optional()),Ia(18,R.inject(kr.EVENT_BUILDER_PLUGIN)),Ia(18,R.optional()),Ia(19,R.inject(kr.ENRICH_IPV6_PLUGIN)),Ia(19,R.optional()),Ia(20,R.inject(kr.PAGEDATA_PLUGIN)),Ia(20,R.optional()),Ia(21,R.inject(kr.HISTORY_OBSERVER)),Ia(21,R.optional()),Ia(22,R.inject(kr.RUNTIME_MEASUREMENT_PLUGIN)),Ia(22,R.optional())],Ta);!function(e){e.BIND="bind",e.REBIND="rebind"}(aa||(aa={}));var Sa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Na=function(e,t){return function(n,r){t(n,r,e)}},Ra=function(e){u(n,e);var t=p(n);function n(e,r,o,a,c){var u;return i(this,n),(u=t.call(this,e)).setSignalType(c||Er.OFFSITE),u.pageSign={sessionId:"",pageId:"",variationId:"",pageIndex:{main:-1,sub:-1,index:-1}},u.legacy=o.legacy||[],u.variationId=o.variation_id||"",u.serverUniqueId=o.server_unqiue_id||"",u.reportService=r,u.initPageSign(),Vi(a)&&Ki()&&(u.enableAdTracking=!1),u.data=f(u),u}return a(n,[{key:"getSessionIdFromCache",value:function(){var e=null;try{e=JSON.parse(sessionStorage.getItem(vr)||"")}catch(e){}return e}},{key:"setSessionIdToCache",value:function(e){ho(vr,e)}},{key:"getVariationId",value:function(){return this.variationId}},{key:"isLegacyPixel",value:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{return t.includes(e)}catch(e){return!1}}(e,this.legacy)}},{key:"assignPageInfo",value:function(e){Object.assign(this.pageInfo,e)}},{key:"getSessionIndex",value:function(){var e={main:-1,sub:-1,index:-1};try{var t=JSON.parse(sessionStorage.getItem(gr)||"{}");if(t)return Object.assign({},e,t)}catch(e){}return e}},{key:"setUserInfo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0!==Object.keys(t).length){var n={};Object.entries(t).forEach((function(t){var r=v(t,2),i=r[0],o=r[1];o&&(i!==Zr?n[i]=String(o).trim():e.setUserInfoWithoutIdentifyPlugin(c({},Zr,o)))}));var r=ni(),i=null==r?void 0:r.getPlugin("Identify");i&&this.reportService.pushPreposition(i.handleUserProperties(n,t).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={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(e){}var o=t.userProperties,a=t.userDataFormat,c=t.userDataFormatV2;if(o){Object.assign(e.userInfo,o);var u=e.getUserFormatInfo()||{},s=e.getUserFormatInfoV2()||{},l=e.getSignalDiagnosticLabels()||{};if(e.setUserFormatInfo(Object.assign({},u,a)),e.setUserFormatInfoV2(Object.assign({},s,c)),e.setSignalDiagnosticLabels(Object.assign({},l,t.identifierLabel||{})),0===Object.keys(e.userInfo).length||1===Object.keys(n).length&&Object.keys(n).includes("external_id"))return;var f=i.reporters[0]||null,d=f?Object.keys(Object.assign({},f.getUserInfo(Hn.Manual),f.getUserInfo(Hn.Auto))):[];f&&d.length&&f.track("EnrichAM",{},{},Nr.TRACK)}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"identify_after_encryption"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}})).catch((function(e){co(Mr.API_ERROR,e,{extJSON:{api:"identify"}})})))}}},{key:"initPageSign",value:function(){var e,t=this.getSessionIdFromCache();null===t&&(t=(e=this.serverUniqueId)?"".concat(e).concat(mr).concat(wi(20)):or("sessionId"),this.setSessionIdToCache(t));var n,r=this.getPageId((n=t)?n.split(mr)[0]:""),i=this.getVariationId(),o=this.getSessionIndex();o.main++,this.pageSign={sessionId:t,pageId:r,variationId:i,pageIndex:o}}}]),n}(Jo);Ra=Sa([R.injectable(),Na(0,R.inject(Rr.WebLibraryInfo)),Na(1,R.inject(kr.REPORT_SERVICE)),Na(2,R.inject(kr.TTQ_GLOBAL_OPTIONS)),Na(3,R.inject(kr.ENV)),Na(3,R.optional()),Na(4,R.inject(Rr.SignalType)),Na(4,R.optional())],Ra);var Aa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Pa=function(e,t){return function(n,r){t(n,r,e)}},Ca=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAdInfo",value:(n=r(e().mark((function t(n,r){var i,o,a;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.getAdInfoFromURL(n,r),!this.webBridgeService.jsbridge){e.next=7;break}return e.next=4,this.webBridgeService.getAdInfo();case 4:e.t0=e.sent,e.next=8;break;case 7:e.t0={};case 8:return o=e.t0,(a=Object.assign({},i,o))&&(a.creative_id&&a.log_extra||a.callback)&&ho(fr,a),e.abrupt("return",a);case 12:case"end":return e.stop()}}),t,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getAdInfoFromURL",value:function(e,t){return Vo(e,t)}}]),t}();Ca=Aa([R.injectable(),Pa(0,R.inject(kr.BRIDGE_SERVICE))],Ca);var ka=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ma=function(e,t){return function(n,r){t(n,r,e)}},Da=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAppInfo",value:(n=r(e().mark((function t(n,r){var i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=this.getAppInfoFromURL(n,r)).platform=Hi(),!Wi()){e.next=10;break}return e.next=5,Ji();case 5:o=e.sent,a=o.model,c=o.platformVersion,i.device_model=a,i.android_version=c;case 10:return ir(i)||ho(dr,i),e.abrupt("return",i);case 12:case"end":return e.stop()}}),t,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getAppInfoFromURL",value:function(e,t){try{var n=Ui(Wr,e,t),r=n&&JSON.parse(n);return{device_id:r.device_id,user_id:r.uid}}catch(e){return{}}}}]),t}();Da=ka([R.injectable(),Ma(0,R.inject(kr.BRIDGE_SERVICE))],Da);var La="ad_analytics_msg",xa=function(e){return!!(e.code&&e.data&&e.ret)};function ja(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n={};try{if("string"==typeof e)n.data=JSON.parse(e);else if(xa(e))(n=e).__data&&(n.data=n.__data);else if(void 0!==e.code){var r=Object.assign({},e),i=r.code;n.code=i,delete r.code,r.data?n.data=r.data:n.data=r}else n.data=e}catch(e){t&&co(Mr.JSB_ERROR,e,{extJSON:{position:"getCallPromise bridge.call"}})}return n}var Ua,Fa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ba=function(e,t){return function(n,r){t(n,r,e)}},qa=function(){function t(e,n){i(this,t),this.env=e,Gi(this.env)&&(this.jsbridge=n),this.bridgeTimeout=400}var n,o,c,u,s,l,f;return a(t,[{key:"getAdInfo",value:(f=r(e().mark((function t(){var n=this;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jsbridge){t.next=3;break}return co(Mr.JSB_ERROR,new 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=r(e().mark((function t(r){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.callAdInfo();case 3:(i=e.sent).ad_info_from="jsb",i.ad_info_status=i.ad_info_status||"fulfilled",r(i),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),r({}),co(Mr.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}});case 13:case"end":return e.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"callAdInfo",value:(l=r(e().mark((function t(){var n,r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.call("adInfo",{},Yi()?3500:5e3);case 3:if((n=e.sent).data){e.next=6;break}return e.abrupt("return",Promise.reject("adInfo no data"));case 6:return r={creative_id:n.data.cid,log_extra:n.data.log_extra},e.abrupt("return",r);case 10:if(e.prev=10,e.t0=e.catch(0),"JSBRIDGE TIMEOUT"!==e.t0){e.next=17;break}return ao(Mr.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),e.abrupt("return",{ad_info_status:"timeout"});case 17:return co(Mr.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}}),e.abrupt("return",{});case 19:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"getAppInfo",value:(s=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve({}));case 1:case"end":return e.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"send",value:(u=r(e().mark((function t(n,r){var i,o,a,c,u,s,l,f,d,p,h,_;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jsbridge){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return a=(null===(o=null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.ad)||void 0===o?void 0:o.creative_id)||"0",c=Fo(n),u=mi(n),s={analytics_message:c,trackLogData:JSON.stringify(n),category:"ad_analytics_msg",tag:La,label:u},d={eventName:La,labelName:u,value:a,extValue:"0",extJson:s},"insight_log_monitor"===u&&io()?(f="x.reportAppLog",p={eventName:"insight_log_monitor",params:s},l=this.call("x.reportAppLog",p,this.bridgeTimeout)):no()||yi(n)?(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):Vi(this.env)?Ki()&&r?(h={eventName:u,params:s},f="sendLogWithAdInfo",l=this.call("sendLogWithAdInfo",h,this.bridgeTimeout)):(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):(_={event_name:u,version:2,properties:s},f="track_event",l=this.call("track_event",_,400)),ao(Mr.CUSTOM_INFO,{custom_name:"send_report_data",extJSON:{api_name:f}}),e.abrupt("return",l);case 10:case"end":return e.stop()}}),t,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"call",value:(c=r(e().mark((function t(n){var r,i,o,a=this,c=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>1&&void 0!==c[1]?c[1]:{},i=c.length>2&&void 0!==c[2]?c[2]:400,o=!(c.length>3&&void 0!==c[3])||c[3],e.abrupt("return",new Promise((function(e,t){if(!a.jsbridge)return t("JSBRIDGE ERROR"),void(o&&co(Mr.JSB_ERROR,new Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}}));var c;i>0&&(c=window.setTimeout((function(){t("JSBRIDGE TIMEOUT"),o&&co(Mr.JSB_ERROR,new Error("JSBRIDGE TIMEOUT"),{extJSON:{position:"getCallPromise",method:n}})}),i)),a.jsbridge&&a.jsbridge.call&&a.jsbridge.call(n,r,(function(t){var n=ja(t,o);e(n),window.clearTimeout(c)}))})));case 4:case"end":return e.stop()}}),t)}))),function(e){return c.apply(this,arguments)})},{key:"sendAnalyticsEvent",value:(o=r(e().mark((function t(n){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.method,i=n.path,o=n.params,a=n.data,e.next=3,this.call("sendAnalyticsEvent",{method:r,path:i,params:o,data:a,header:{"Content-Type":"application/json"}},0,!1);case 3:return c=e.sent,e.abrupt("return",null==c?void 0:c.code);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateWebFlData",value:(n=r(e().mark((function t(n){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Vi(this.env)||!Ki()){e.next=2;break}return e.abrupt("return",this.call("updateFLLocalConv",n,this.bridgeTimeout));case 2:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})}]),t}();qa=Fa([R.injectable(),Ba(0,R.inject(kr.ENV)),Ba(0,R.optional()),Ba(1,R.inject(kr.JS_BRIDGE)),Ba(1,R.optional())],qa),function(e){e[e.P0=4]="P0",e[e.P1=3]="P1",e[e.P2=2]="P2",e[e.P3=1]="P3"}(Ua||(Ua={}));var Ga=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Va="tt_hold_events",Ha=function(e){u(n,e);var t=p(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).consentMode=Qn.UNKNOWN,e.queue=[],e.debounceUpdateCache=Oi((function(){e.updateCache()}),200,f(e)),e.handleHistoryQueue=bi((function(){var t=po(Va);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())})),e}return a(n,[{key:"on",value:function(e,t){_(s(n.prototype),"on",this).call(this,e,t),this.handleHistoryQueue()}},{key:"setConsentMode",value:function(e){this.consentMode=e,this.changeQueueWithConsent()}},{key:"changeQueueWithConsent",value:function(){switch(this.consentMode){case Qn.REVOKE:this.cleanQueue();break;case Qn.GRANT:this.releaseQueue(),this.cleanQueue();case Qn.HOLD:case Qn.UNKNOWN:}}},{key:"getConsentMode",value:function(){return this.consentMode}},{key:"cacheReportTask",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Bn.defaultReport;this.queue.push({url:e,data:t,type:n}),this.debounceUpdateCache()}},{key:"cleanQueue",value:function(){this.queue=[],function(e){try{window.sessionStorage.removeItem(e)}catch(e){}}(Va)}},{key:"updateCache",value:function(){this.queue&&this.queue.length>0&&ho(Va,this.queue)}},{key:"releaseQueue",value:function(){var e=this;this.queue.sort((function(t,n){return e.getEventPriority(n.data)-e.getEventPriority(t.data)})),this.emit("queue",this.queue)}},{key:"getEventPriority",value:function(e){return e.event&&e.event.length>0?Ua.P0:e.action&&e.action.length>0?Ua.P1:""===e.event?Ua.P2:Ua.P3}}]),n}(Ko);Ha=Ga([R.injectable()],Ha);var Ja=function(e){return Boolean(e)},Wa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ka=function(){function t(){i(this,t)}var n;return a(t,[{key:"send",value:(n=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=1,navigator&&navigator.sendBeacon){e.next=4;break}return e.abrupt("return",!1);case 4:if((o=navigator.sendBeacon(n,JSON.stringify(r)))||"number"!=typeof i||!(i>0)){e.next=10;break}return i--,e.next=9,Si(200);case 9:return e.abrupt("return",this.send(n,r,i));case 10:return e.abrupt("return",o);case 13:return e.prev=13,e.t0=e.catch(1),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),t,this,[[1,13]])}))),function(e,t){return n.apply(this,arguments)})},{key:"sendByImage",value:function(e,t){(new Image).src=function(e,t){var n=new URL(e);return Object.keys(t).forEach((function(e){var r=t[e].toJSON?t[e].toJSON():String(t[e]);n.searchParams.set(e,r)})),n.toString()}(e,t)}}]),t}();Ka=Wa([R.injectable()],Ka);var Ya=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Xa=function(e,t){return function(n,r){t(n,r,e)}},Qa=function(t){u(f,t);var n,o,c,s,l=p(f);function f(e,t,n,r){var o;return i(this,f),(o=l.call(this,e,t)).supportSendAnalyticsEvent=!0,o.consentService=n,o.consentService.on("queue",(function(e){e.forEach((function(e){var t=e.url,n=e.data,r=e.type;o.report(t,n,r)}))})),o.env=r,o}return a(f,[{key:"send",value:(s=r(e().mark((function t(n,r,i){var o,a,c,u,s,l,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.bridgeService.jsbridge){e.next=2;break}return e.abrupt("return");case 2:return l=!!(s=r).context&&"timeout"===(null===(a=null===(o=s.context)||void 0===o?void 0:o.ad)||void 0===a?void 0:a.ad_info_status),f={},e.prev=5,e.next=8,this.bridgeService.send(s,l);case 8:if((f=e.sent)&&1===f.code){e.next=11;break}throw new Error("[fetch bridge] sendLog error: code ".concat(f&&f.code,", data: ").concat(f&&JSON.stringify(f)));case 11:return gi(s.event)&&ao(Mr.JSB_SEND,{pixelCode:null===(c=s.context.pixel)||void 0===c?void 0:c.code,app_name:Qi()?"ultralite":"",extJSON:{event:s.event,event_id:s.event_id,need_inject_ad_info:l}}),e.abrupt("return",f);case 15:e.prev=15,e.t0=e.catch(5),gi(s.event)&&co(Mr.JSB_ERROR,e.t0,{pixelCode:null===(u=s.context.pixel)||void 0===u?void 0:u.code,custom_name:"sendReportData",custom_enum:f&&f.code?"".concat(f.code):"non",app_name:to()||"",extJSON:{position:"sendReportData"}}),Qi()&&Wi()&&this.sendHttpReport(n,s,i);case 19:case"end":return e.stop()}}),t,this,[[5,15]])}))),function(e,t,n){return s.apply(this,arguments)})},{key:"sendHttpReport",value:(c=r(e().mark((function t(n,r,i){var o,a,c,u=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=!(u.length>3&&void 0!==u[3])||u[3],a=u.length>4?u[4]:void 0,e.next=4,this.httpService.send(n,r,a);case 4:e.sent||this.httpService.sendByImage(n,{analytics_message:i}),o&&ao(Mr.HTTP_SEND,{pixelCode:null===(c=r.context.pixel)||void 0===c?void 0:c.code,extJSON:{event:r.event,event_id:r.event_id}});case 7:case"end":return e.stop()}}),t,this)}))),function(e,t,n){return c.apply(this,arguments)})},{key:"beforeReport",value:(o=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:Bn.defaultReport,(o=this.consentService.getConsentMode())!==Qn.REVOKE){e.next=4;break}return e.abrupt("return",!1);case 4:if(o!==Qn.HOLD){e.next=7;break}return this.consentService.cacheReportTask(n,r,i),e.abrupt("return",!1);case 7:return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"report",value:(n=r(e().mark((function t(n,r){var i,o,a,c,u,s=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.length>2&&void 0!==s[2]?s[2]:Bn.defaultReport,e.next=3,this.beforeReport(n,r,i);case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:if(o=Fo(r),i!==Bn.defaultReport||!this.bridgeService.jsbridge){e.next=11;break}return e.next=10,this.send(n,r,o);case 10:return e.abrupt("return",e.sent);case 11:if(i!==Bn.httpReport||!this.bridgeService.jsbridge||!Vi(this.env)||Xi()||!this.supportSendAnalyticsEvent){e.next=30;break}return a=n,e.prev=13,a=new URL(n).pathname,e.next=17,this.bridgeService.sendAnalyticsEvent({path:a,method:"POST",data:r});case 17:if(c=e.sent,u=new Error("sendAnalyticsEvent not support: code ".concat(c,", path: ").concat(a,", data: ").concat(JSON.stringify(r))),null!=c&&-2!==c){e.next=22;break}throw this.supportSendAnalyticsEvent=!1,u;case 22:if(1!==c){e.next=24;break}return e.abrupt("return");case 24:throw u;case 27:e.prev=27,e.t0=e.catch(13),co(Mr.CUSTOM_ERROR,e.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 30:this.sendHttpReport(n,r,o,!(!gi(r.event)||!Ei(r)),Ja(r.action)?3:void 0);case 31:case"end":return e.stop()}}),t,this,[[13,27]])}))),function(e,t){return n.apply(this,arguments)})},{key:"reportFL",value:function(e){this.bridgeService.jsbridge&&this.bridgeService.updateWebFlData(e)}}]),f}(ra);Qa=Ya([R.injectable(),Xa(0,R.inject(kr.HTTP_SERVICE)),Xa(1,R.inject(kr.BRIDGE_SERVICE)),Xa(2,R.inject(kr.CONSENT_SERVICE)),Xa(3,R.inject(kr.ENV)),Xa(3,R.optional())],Qa);var za=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Za=function(e,t){return function(n,r){t(n,r,e)}},$a=function(){function t(e){i(this,t),this.cookieExpireOption=function(e){if(e&&e.cde){var t=e.cde;return Object.assign({},Sr,{expires:t})}return Sr}(e)}var n;return a(t,[{key:"genCookieID",value:function(){return function(){for(var e=vi(Date.now());27!==e.length;)e.length>27?e=e.slice(0,27):e+="_";return e}()}},{key:"enableCookie",value:(n=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return yo(pr,"1",this.cookieExpireOption),e.abrupt("return",Ao("https://analytics.tiktok.com/i18n/pixel/enable_cookie"));case 2:case"end":return e.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"enableFirstPartyCookie",value:function(e){if(e){yo(pr,"1",this.cookieExpireOption);var t=this.getAnonymousId();this.setAnonymousId(t||this.genCookieID())}}},{key:"disableCookie",value:function(){yo(pr,"0",this.cookieExpireOption),yo(_r,"",Object.assign(this.cookieExpireOption,{expires:-1})),Ao("https://analytics.tiktok.com/i18n/pixel/disable_cookie")}},{key:"setAnonymousId",value:function(e){var t=this.getAnonymousId()||e;if(t){var n=t.split(".")[0];yo(_r,n,this.cookieExpireOption)}}},{key:"getAnonymousId",value:function(){return go(_r)||""}},{key:"canUseCookie",value:function(){try{return"0"!==go(pr)}catch(e){}return!1}},{key:"resetExpires",value:function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"resetExpires",start:performance.now()}}catch(e){}var t=go(pr);t&&yo(pr,t,this.cookieExpireOption);var n=this.getAnonymousId();n&&this.setAnonymousId(n);try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(e){}}}]),t}();$a=za([R.injectable(),Za(0,R.inject(kr.TTQ_GLOBAL_OPTIONS))],$a);var ec=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},tc=function(e,t){return function(n,r){t(n,r,e)}},nc=function(e){u(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"Callback",reporters:r,context:e})).ttclidCookieValue="undefined"!=typeof document?go(Jr):"",o}return a(n,[{key:"pixelDidMount",value:function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"callback_plugin_pixelDidMount",start:performance.now()}}catch(e){}var n=Fi(),r=n.url,i=n.referrer,o=Ui(Jr,r,i);o&&this.ttclidCookieValue!==o&&So(Jr,o);try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}}}]),n}($o);nc=ec([R.injectable(),tc(0,R.inject(kr.CONTEXT)),tc(1,R.inject(kr.TTQ_REPORTERS))],nc);var rc={isHash:function(e){return!1},genIdentifierLabelByUserProperties:function(e){return{}}},ic={validatePhoneNumberLength:function(e){},parsePhoneNumberFromString:function(e){}},oc={tryDecodeHashedBase64String:function(e){return null},tryDecodeHashedBase64Hex:function(e){return null}},ac=function(e){var t,n=e.parsePhoneNumberFromString,r=e.validatePhoneNumberLength,i=e.isHash,o=e.genIdentifierLabelByUserProperties,a=e.tryDecodeHashedBase64String,c=e.tryDecodeHashedBase64Hex,u=e.checkEmailFormat,s=e.checkMDNEmailFormat;e.sha256,t={checkEmailFormat:u,checkMDNEmailFormat:s},t.checkMDNEmailFormat,function(e){var t=e.tryDecodeHashedBase64String,n=e.tryDecodeHashedBase64Hex;oc.tryDecodeHashedBase64String=t,oc.tryDecodeHashedBase64Hex=n}({tryDecodeHashedBase64String:a,tryDecodeHashedBase64Hex:c}),function(e){var t=e.isHash,n=e.genIdentifierLabelByUserProperties;rc.isHash=t,rc.genIdentifierLabelByUserProperties=n}({isHash:i,genIdentifierLabelByUserProperties:o}),function(e){var t=e.parsePhoneNumberFromString,n=e.validatePhoneNumberLength;ic.parsePhoneNumberFromString=t,ic.validatePhoneNumberLength=n}({parsePhoneNumberFromString:n,validatePhoneNumberLength:r})},cc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ic.parsePhoneNumberFromString,r=e,i=t?n(e,t):n(e);return i?r="86"===i.countryCallingCode?i.nationalNumber:i.number:e.replace(/[^0-9]/g,"").length>0&&(r=e.replace(/[^0-9]/g,"")),r},uc=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"],sc=function(e){u(n,e);var t=p(n);function n(e){var r=e.name,o=e.context,a=e.reporters;return i(this,n),t.call(this,{name:r,reporters:a,context:o})}return a(n,[{key:"setIdentifyUtils",value:function(e){var t=e.isHash,n=e.sha256,r=e.genIdentifierLabelByUserProperties,i=e.tryDecodeHashedBase64String,o=e.tryDecodeHashedBase64Hex,a=e.validatePhoneNumberLength,c=e.parsePhoneNumberFromString,u=e.checkEmailFormat,s=e.checkMDNEmailFormat,l=e.getCookieDeprecationLabel,f=void 0===l?function(){}:l,d=e.getAllTopics,p=void 0===d?function(){}:d;ac({isHash:t,sha256:n,genIdentifierLabelByUserProperties:r,tryDecodeHashedBase64String:i,tryDecodeHashedBase64Hex:o,validatePhoneNumberLength:a,parsePhoneNumberFromString:c,checkEmailFormat:u,checkMDNEmailFormat:s}),this.parsePhoneNumberFromString=c,this.checkMDNEmailFormat=s,this.checkEmailFormat=u,this.sha256=n,this.getCookieDeprecationLabel=f,this.getAllTopics=p}},{key:"baseHandleUserProperties",value:function(e,t){var n=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={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(e){}if(e){var i=this.identifyParamsFormattedInfo(e),o=this.identifyParamsFormattedInfoV2(e),a=rc.genIdentifierLabelByUserProperties(t);this.handlePIIDiagnostics(o),Object.entries(e).forEach((function(t){var r=v(t,2),i=r[0],a=r[1],c=void 0===a?"":a;if(c){var u=String(c);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(i)){var s=n.getUserDataFormatInfoV2KeyName(i),l=oc.tryDecodeHashedBase64Hex(u);if(null!==l)e[i]=l,null!==s&&(o=n.updateUserDataFormatV2Label(s,Vn.BASE64_HEX_HASHED,o));else{var f=oc.tryDecodeHashedBase64String(u);f&&(e[i]=f,null!==s&&(o=n.updateUserDataFormatV2Label(s,Vn.BASE64_STRING_HASHED,o)))}}switch("zip_code"===i&&u&&(rc.isHash(u)?o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_HASHED,o):(o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_NOT_HASHED,o),n.isZipFromUs(e)?(e.zip_code=n.sha256(n.truncateString(u,5)),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_US,o)):(e.zip_code=n.sha256(u),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_NOT_US,o)))),i){case"email":e.email=rc.isHash(u)&&!n.checkEmailFormat(u)?u:n.sha256(n.handleEmail(u));break;case"phone_number":e.phone_number=rc.isHash(u)?u:n.sha256(n.handlePhoneNumber(u));break;case"auto_email":e.auto_email=n.sha256(n.handleEmail(u));break;case"auto_phone_number":e.auto_phone_number=n.sha256(n.handlePhoneNumber(u));break;case"first_name":e.first_name=rc.isHash(u)?u:n.sha256(u);break;case"last_name":e.last_name=rc.isHash(u)?u:n.sha256(u);break;case"city":e.city=n.truncateString(u,80);break;case"state":e.state=n.truncateString(u,80);break;case"country":e.country=n.truncateString(u,80);break;default:return}}})),e.sha256_email&&(e.email=this.handleCheckHashedEmailValue(String(e.sha256_email),i)),e.sha256_phone_number&&(e.phone_number=this.handleCheckHashedPhoneValue(String(e.sha256_phone_number),i));try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),"identify_encryption"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}return{userProperties:e,userDataFormat:i,userDataFormatV2:o,identifierLabel:a}}}},{key:"identifyParamsFormattedInfo",value:function(e){var t=this,n={},r=/^sha256_(.*)$/;return Object.entries(e).forEach((function(e){var i=v(e,2),o=i[0],a=i[1],c=String(void 0===a?"":a),u=o.match(r);switch(o){case"email":t.handleEmailFormat(c,"email",n);break;case"phone_number":t.handlePhoneNumberFormat(c,"phone_number",n);break;case"auto_email":t.handleEmailFormat(c,"auto_email",n);break;case"auto_phone_number":t.handlePhoneNumberFormat(c,"auto_phone_number",n);break;case(u||{}).input:var s=null==u?void 0:u.pop();s&&Kr.includes(s)&&(n[s]=[Gn.HASHED]);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":t.handleNewPiisFormat(c,o,n);break;default:n[o]=[Gn.CORRECT_FORMAT]}})),n}},{key:"identifyParamsFormattedInfoV2",value:function(e){var t=this,n={};return Object.entries(e).forEach((function(e){var r=v(e,2),i=r[0],o=r[1],a=String(void 0===o?"":o);switch(i){case"email":t.handlePixelValidation(a,Yr,n);break;case"phone_number":t.handlePixelValidation(a,Xr,n);break;case"sha256_email":t.handlePixelValidation(a,Qr,n);break;case"sha256_phone_number":t.handlePixelValidation(a,zr,n);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":break;default:n[i]=[Vn.UNKNOWN_INVALID]}})),n}},{key:"updateUserDataFormatV2Label",value:function(e,t,n){var r,i;return(null===n[e]||void 0===n[e]||(null===(r=n[e])||void 0===r?void 0:r.includes(Vn.UNKNOWN_INVALID)))&&(n[e]=[]),null===(i=n[e])||void 0===i||i.push(t),n}},{key:"getUserDataFormatInfoV2KeyName",value:function(e){return{email:"email_is_hashed",phone_number:"phone_is_hashed",sha256_email:"sha256_email",sha256_phone_number:"sha256_phone",zip_code:"zip_code"}[e]||null}},{key:"handlePIIDiagnostics",value:function(e){}},{key:"handleEmail",value:function(e){return e.toLowerCase()}},{key:"handlePhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString;return cc(e,"",t)}},{key:"handleCheckHashedEmailValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.checkEmailFormat;return t.email=t.email||[],rc.isHash(e)?(null==t||t.email.push(Gn.HASHED_CORRECT),e):n(e)?(null==t||t.email.push(Gn.PLAINTEXT_EMAIL),this.sha256(this.handleEmail(String(e)))):(null==t||t.email.push(Gn.HASHED_ERR),this.sha256(e))}},{key:"handleCheckHashedPhoneValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.parsePhoneNumberFromString;return t.phone_number=t.phone_number||[],rc.isHash(e)?(null==t||t.phone_number.push(Gn.HASHED_CORRECT),e):n(e)?(t.phone_number.push(Gn.PLAINTEXT_PHONE),this.sha256(this.handlePhoneNumber(String(e),n))):(null==t||t.phone_number.push(Gn.HASHED_ERR),this.sha256(e))}},{key:"handlePixelValidation",value:function(e,t,n){n[t]=[],uc.includes(e)&&n[t].push(Vn.FILTER_EVENTS),e&&rc.isHash(e)&&n[t].push(Vn.HASHED),e&&this.checkEmailFormat(e)&&n[t].push(Vn.PLAIN_EMAIL),e&&this.checkMDNEmailFormat(e)&&n[t].push(Vn.PLAIN_MDN_EMAIL),e&&this.parsePhoneNumberFromString(e)&&n[t].push(Vn.PLAIN_PHONE),e&&0===n[t].length&&n[t].push(Vn.UNKNOWN_INVALID)}},{key:"isZipFromUs",value:function(e){var t;return"us"===(null===(t=e.country)||void 0===t?void 0:t.toLowerCase())||!1}},{key:"truncateString",value:function(e,t){var n=Array.from(e);return n.length<=t?e:n.slice(0,t).join("")}},{key:"handlePhoneNumberFormat",value:function(e,t,n){var r=this.handleCheckPhoneNumber(String(e),this.parsePhoneNumberFromString);n[t]=r}},{key:"handleCheckPhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString,n=[];if(!e)return n.push(Gn.EMPTY_VALUE),n;if(rc.isHash(e))return n.push(Gn.HASHED),n;var r=t(e);return r?(n.push(Gn.CORRECT_FORMAT),n):(n.push(Gn.WRONG_FORMAT),n)}},{key:"handleCheckEmail",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.checkEmailFormat,n=[];return e?rc.isHash(e)?(n.push(Gn.HASHED),n):t(e)?(n.push(Gn.CORRECT_FORMAT),n):(n.push(Gn.WRONG_FORMAT),n):(n.push(Gn.EMPTY_VALUE),n)}},{key:"handleEmailFormat",value:function(e,t,n){var r=this.handleCheckEmail(String(e),this.checkEmailFormat);n&&n[t]&&(n[t]||[]).includes(Gn.HASHED)||(n[t]=r)}},{key:"handleNewPiisFormat",value:function(e,t,n){e&&(n[t]=[Gn.CORRECT_FORMAT])}}]),n}($o),lc=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},fc=function(e,t){return function(n,r){t(n,r,e)}},dc=function(t){u(s,t);var n,o,c=p(s);function s(e,t){var n;return i(this,s),(n=c.call(this,{name:"Identify",reporters:t,context:e})).init(),n}return a(s,[{key:"init",value:function(){var e=this;return this.pluginPromise||(ao(Mr.IDENTIFY_INIT_START),this.pluginPromise=Ao("https://analytics.tiktok.com/i18n/pixel/static/identify_935b0d03.js").then((function(){e.detectTopics(),ao(Mr.IDENTIFY_INIT_END)})).catch((function(){var e=new Error("Loading chunk identify failed.\n(error: ".concat(window.location.host,"/static/identify.js)"));return e.name="ChunkLoadError",Promise.reject(e)}))),this.pluginPromise}},{key:"handleUserProperties",value:(o=r(e().mark((function t(n,r){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,this.init();case 4:return e.abrupt("return",this.baseHandleUserProperties(n,r));case 5:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"handlePIIDiagnostics",value:function(e){try{var t=e.email_is_hashed,n=void 0===t?[]:t,r=e.sha256_email,i=void 0===r?[]:r,o=e.phone_is_hashed,a=void 0===o?[]:o,c=e.sha256_phone,u=void 0===c?[]:c;if(n.includes(Vn.UNKNOWN_INVALID)||i.includes(Vn.UNKNOWN_INVALID))return void uo(Dr.INVALID_EMAIL_FORMAT);if(a.includes(Vn.UNKNOWN_INVALID)||u.includes(Vn.UNKNOWN_INVALID))return void uo(Dr.INVALID_PHONE_NUMBER_FORMAT);if(n.includes(Vn.FILTER_EVENTS)||i.includes(Vn.FILTER_EVENTS))return void uo(Dr.INVALID_EMAIL_INFORMATION);if(a.includes(Vn.FILTER_EVENTS)||u.includes(Vn.FILTER_EVENTS))return void uo(Dr.INVALID_PHONE_NUMBER_INFORMATION)}catch(e){}}},{key:"detectTopics",value:(n=r(e().mark((function t(){var n,r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getCookieDeprecationLabel();case 3:return n=e.sent,e.next=6,this.getAllTopics();case 6:(r=e.sent)&&ao(Mr.CUSTOM_INFO,{custom_name:"topics",custom_enum:r.toString(),extJSON:{cookie_label:String(n)}}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return n.apply(this,arguments)})}]),s}(sc);dc=lc([R.injectable(),fc(0,R.inject(kr.CONTEXT)),fc(1,R.inject(kr.TTQ_REPORTERS))],dc);var pc,hc=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},_c=function(e,t){return function(n,r){t(n,r,e)}},vc=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"WebFL",reporters:r,context:e})).reportService=o,c.ttqOptions=a,c.useExchangeRate=a.usd_exchange_rate,c}return a(n,[{key:"pixelSend",value:function(e,t,n){var r,i;Boolean(null===(i=null===(r=this.ttqOptions)||void 0===r?void 0:r.plugins)||void 0===i?void 0:i.WebFL)&&n&&this.reportFlConv(n)}},{key:"reportFlConv",value:function(e){var t;if(e&&"Pageview"!==e.event){var n,r=e.context,i=e.properties,o=void 0===i?{}:i,a=void 0!==r.ad.log_extra?r.ad.log_extra:"{}";try{n=JSON.parse(a)}catch(e){n={}}var c={req_id:n.req_id||"",cid:r.ad.creative_id||"",value:o.value||"",currency:o.currency||"",raw:Object.assign({},o)},u=o.value,s=o.currency,l=function(e,t,n){return isNaN(e)||e<0||null===n||!n[t]?"":(e/n[t]*1e5).toFixed(0)}(u,s,this.useExchangeRate||null),f=r.pixel?r.pixel.code:"";l&&(c.usd_value=l,ao(Mr.CUSTOM_INFO,{pixelCode:f,custom_name:"odfl_rate_exchange",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event,value:u,currency:s,usdValue:l}}));var d={business:"devicefl_join_label",entrance:"app_to_web_conversion",inputParams:{message_id:e.message_id,event:e.event,event_props:c,event_source_id:null===(t=r.pixel)||void 0===t?void 0:t.code,event_source_type:"web"}};this.reportService&&this.reportService.reportFL&&(this.reportService.reportFL(d),ao(Mr.CUSTOM_INFO,{pixelCode:f,custom_name:"fl_jsb_report",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event}}))}}}]),n}($o);vc=hc([R.injectable(),_c(0,R.inject(kr.CONTEXT)),_c(1,R.inject(kr.TTQ_REPORTERS)),_c(2,R.inject(kr.REPORT_SERVICE)),_c(3,R.inject(kr.TTQ_GLOBAL_OPTIONS))],vc),function(e){e.ERROR_FORMAT="error_format",e.OVER_LENGTH="over_length_3e4",e.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields"}(pc||(pc={}));var gc,yc,mc,Ec,bc,wc="form_detail_error";!function(e){e.GET_ELEMENTS_ERROR="get_elements_error",e.INIT_ERROR="init_error",e.ASSEMBLE_FORM_DETAIL_ERROR="assemble_form_detail_error",e.DETECT_FORM_ELEMENT_ERROR="detect_form_element_error",e.GET_OVERALL_FORM_DETAIL_ERROR="get_overall_form_detail_error",e.FORM_OBSERVER_ERROR="form_observer_error",e.OVER_LENGTH="over_length_3e4"}(gc||(gc={})),function(e){e.METADATA="Metadata",e.CLICK="Click"}(yc||(yc={})),function(e){e.AUTO_COLLECTION="AUTO_COLLECTION",e.AUTO_FORM="AUTO_FORM",e.AUTO_CLICK="AUTO_CLICK",e.AUTO_VC="AUTO_VC",e.AUTO_VC_REVERSE="AUTO_VC_REVERSE"}(mc||(mc={})),function(e){e.AUTO_FORM="form_rules",e.AUTO_VC="vc_rules",e.AUTO_VC_REVERSE="vc_rules_reverse"}(Ec||(Ec={})),function(e){e.PAGE_LEAVE="PageLeave",e.PAGE_VIEW="PageView",e.DOM_CHANGE="DomChange",e.URL_CHANGE="UrlChange",e.CLICK="Click",e.SCROLL="Scroll"}(bc||(bc={}));var Ic=["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"],Tc=2e3;function Oc(e){return/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi.test(e)||/(\+?0?86-?)?1[3-9]\d{9}/g.test(e)||/(\+\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/g.test(e)||/^[\-!$><-==&_\/\?\.,0-9:; \]\[%~\"\{\}\)\(\+\@\^\`]/g.test(e)||Ic.some((function(t){return e.toLowerCase().indexOf(t.toLowerCase())>-1}))}var Sc=function e(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return"";if(t===document.documentElement)return"/HTML";for(var n=1,r=t.previousSibling;r;)r.nodeType===Node.ELEMENT_NODE&&r.tagName===t.tagName&&n++,r=r.previousSibling;var i=t.tagName.toLowerCase(),o=e(t.parentNode);return"".concat(o,"/").concat(i,"[").concat(n,"]")};function Nc(e){return Sc(e)}function Rc(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:500;return"string"!=typeof e?"":(e=e.trim()).length0&&void 0!==arguments[0]?arguments[0]:[];return{items:e,has:function(e){return this.items.some((function(t){return t===e}))},add:function(e){this.has(e)||this.items.push(e)}}}function Uc(e){var t;switch(e.tagName.toLowerCase()){case"meta":t=e.getAttribute("content");break;case"audio":case"embed":case"iframe":case"img":case"source":case"track":case"video":t=e.getAttribute("src");break;case"a":case"area":case"link":t=e.getAttribute("href");break;case"object":t=e.getAttribute("data");break;case"data":case"meter":t=e.getAttribute("value");break;case"time":t=e.getAttribute("datetime");break;default:t=function(e){if(e){if(e.innerText&&e.innerText.length>0)return e.innerText;if(e.textContent&&e.textContent.length>0)return e.textContent}return""}(e)||""}return"string"==typeof t?Dc(t):""}function Fc(e,n){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Fc(e,n)}));var r={};for(var i in e)Bc(i,n)||(r[i]=Fc(e[i],n));return r}return e}function Bc(e,t){return!!(t&&t.length>0)&&t.some((function(t){return e.toLowerCase()===t.toLowerCase()}))}function qc(e){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return qc(e)}));var n=Object.assign({},e),r=n["@type"];for(var i in n)"@type"!==i&&"@context"!==i&&("object"===t(n[i])?n[i]=qc(n[i]):r&&Gc(r)&&delete n[i]);return n}return e}function Gc(e){return Array.isArray(e)?e.some((function(e){return Gc(e)})):"string"==typeof e&&(e=e.toLowerCase().replace(/https?:\/\/schema\.org\//,""),Ic.some((function(t){return e===t.toLowerCase()})))}function Vc(e){var t={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{t.microdata=function(){for(var e=document.querySelectorAll("[itemscope]"),t=[],n=jc(),r=0;r=0;i--){var o=e[i],a=o.getAttribute("itemtype");if("string"==typeof a&&""!==a){for(var c={},u=o.querySelectorAll("[itemprop]"),s=0;s=0;E--){if(h[E].scope.contains(y)){h[E].schema.subscopes.push(m);break}h.pop()}0===h.length&&_.push(m),h.push({schema:m,scope:y})}var b=JSON.stringify(_);return b.length>3e4&&(b="[]",Mc.getMicroData=!1),b}()}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"microdata"})}try{var n=function(){if(!Mc.getJSONLD)return{data:"[]",errors:[]};for(var e=[],t=[],n=document.querySelectorAll('script[type="application/ld+json"]'),r=0,i=0;i3e4)return Mc.getJSONLD=!1,{data:JSON.stringify([]),errors:[{name:pc.OVER_LENGTH,message:"".concat(String(r))}]};var a=void 0;try{a=JSON.parse(o.replace(/[\n\r\t]+/g," "))}catch(e){t.push({name:pc.ERROR_FORMAT,message:e.message})}try{a=qc(a)}catch(e){return{data:JSON.stringify([]),errors:[{name:pc.FILTER_SENSITIVE_FIELDS,message:e.message}]}}a&&e.push(a)}}return{data:JSON.stringify(e),errors:t}}(),r=n.data,i=n.errors;t.json_ld=r,i&&i.forEach((function(e){var t=e.name,n=e.message;co(Mr.CUSTOM_ERROR,{message:n},{custom_name:"parse_json_ld_failed",custom_enum:t})}))}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{t.open_graph=function(e){for(var t=jc(["og","product","music","video","article","book","profile","website","twitter"]),n={},r=document.querySelectorAll("meta[property],meta[name]"),i=0;i0)return Array.from(r)}return[]}catch(e){return co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.GET_ELEMENTS_ERROR}),[]}}function zc(e){var t="";return function e(n){for(;n;)n.nodeType===Node.TEXT_NODE?t+=n.textContent:"SELECT"!==n.nodeName&&n.firstChild&&e(n.firstChild),n=n.nextSibling}(e.firstChild),t.replace(/[\t\n]/g,"").trim()}function Zc(e){if(!e)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&("visible"===t.visibility&&(!$c(e)&&(0!==e.offsetWidth||0!==e.offsetHeight)))}function $c(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||$c(e.parentElement))}function eu(e){var t=e.getAttribute("type");return!!t&&Xc.indexOf(t)>-1}function tu(e){return e&&Oc(e)?"__Text__":e}!function(e){e[e.CONTAIN=0]="CONTAIN",e[e.ID=1]="ID",e[e.SELECTOR=2]="SELECTOR"}(Hc||(Hc={}));var nu=function(){function e(t){i(this,e),this.formUpdateHandlers=[],this.answerMap={},this.rules=this.getRules(t),this.init()}return a(e,[{key:"getRules",value:function(e){var t=e.plugins&&e.plugins.AutoConfig;return t&&t[Ec.AUTO_FORM]}},{key:"init",value:function(){var e=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"initAutoForm_init",start:performance.now()}}catch(e){}try{this.forms=this.detectFormElement(),this.forms&&this.forms.forEach((function(t){t.formDetail=e.assembleFormDetail(t),e.startFormObserver(t,e.formUpdateHandlers)}))}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.INIT_ERROR})}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}}},{key:"getOverallFormDetail",value:function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var e={taskName:window.ttq._pf_tn,functionName:"initAutoForm_getOverallFormDetail",start:performance.now()}}catch(e){}var t="[]";try{if(this.forms&&this.forms.length>0)this.forms.some((function(e){var t=e.el;return!document.body.contains(t)}))&&this.init(),t=JSON.stringify(this.forms.map((function(e){return e.formDetail})).filter((function(e){return e})))}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.GET_OVERALL_FORM_DETAIL_ERROR})}try{window.ttq&&window.ttq._ppf&&(e.end=performance.now(),window.ttq._ppf.push(e))}catch(e){}return t}},{key:"addFormUpdateHandler",value:function(e){this.formUpdateHandlers.push(e)}},{key:"startFormObserver",value:function(e,t){var n=this;try{var r=Oi((function(){var r=n.assembleFormDetail(e);(!e.formDetail||r&&ki(r,e.formDetail))&&(e.formDetail=r,t.forEach((function(t){return t.call(n,e.formDetail)})))}),Tc,this);if(e.el.parentNode){var i=e.el.parentNode;this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(r),this.observer.observe(i,{attributes:!0,childList:!0,subtree:!0}),i.addEventListener("click",r,{capture:!0})}}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.FORM_OBSERVER_ERROR})}}},{key:"detectFormElement",value:function(){try{var e=[0,0,0],t=function(e){return(t=Qc(e||Jc,document)).filter((function(e){return!t.some((function(t){return t.contains(e)&&t!==e}))}));var t}(this.rules);if(!t)return[];var n=t.map((function(e){return{el:e,questions:[]}}));return n.forEach((function(t){var n,r=function(e){return Qc(Wc,e)}(t.el),i=new Set([]);r.forEach((function(n){var r=function(e,t){var n=Qc(Kc,e);if(n&&n.length)return{els:n,from:Hc.CONTAIN};var r=e.getAttribute("for");return!(!r||(n=function(e,t){return Qc(["input[id='".concat(e,"'],select[id='").concat(e,"'],textarea[id='").concat(e,"']")],t)}(r,t),!n))&&{els:n,from:Hc.ID}}(n,t.el);if(r){var o=r.els,a=r.from,c=o.filter((function(e){return!eu(e)})).map((function(e){return i.add(e),{el:e,from:a}}));c&&c.length&&(e[a]=1,t.questions.push({el:n,answers:c}))}})),(n=t.el,Qc(Kc,n)).filter((function(e){return!eu(e)})).forEach((function(n){if(!i.has(n)){e[Hc.SELECTOR]=1;var r=function(e,t){return function e(n){return null==n||n.isSameNode(t)?t:zc(n).length>0?n:e(n.parentNode)}(e.parentNode)}(n,t.el);t.questions.push({el:r,answers:[{el:n,from:Hc.SELECTOR}]})}}))})),ao(Mr.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:e.join("")}),n}catch(e){return co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.DETECT_FORM_ELEMENT_ERROR}),[]}}},{key:"calculateQuestionFilledTime",value:function(e){var t=e.el,n=e.answers,r=Nc(t),i=n.reduce((function(e,t){var n=t.el,r=n.getAttribute("type");return r&&Yc.indexOf(r.toLowerCase())>-1?"".concat(e,",").concat(n.checked):"".concat(e,",").concat(n.value)}),"");this.answerMap[r]||(this.answerMap[r]={defaultValue:i,value:i});var o=this.answerMap[r],a=o.defaultValue,c=o.filledTime;if(this.answerMap[r].value=i,a!==i)return c||(this.answerMap[r].filledTime=+new Date);delete this.answerMap[r].filledTime}},{key:"assembleFormDetail",value:function(e){var t=this,n=e.el,r=e.questions;try{var i={xpath:Nc(n),id:n.id,name:tu(n.getAttribute("name")),tag:n.tagName.toLowerCase(),class_name:n.className,questions:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Zc(n)};return i.questions=r.map((function(e){var n=e.el,r=e.answers,i={xpath:Nc(n),id:n.id,name:tu(zc(n)),tag:n.tagName.toLowerCase(),class_name:n.className,filled_time:t.calculateQuestionFilledTime(e),answers:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Zc(n)};return r.forEach((function(e){var t=e.el,n=e.from;t&&"SELECT"===t.tagName.toUpperCase()?i.answers=i.answers.concat(Array.from(t.querySelectorAll("option")).map((function(e){return{xpath:Nc(e),id:e.id,name:tu(e.value||e.innerText),tag:e.tagName.toLowerCase(),class_name:e.className,from:n,width:e.offsetWidth,height:e.offsetHeight,is_visible:Zc(t)}}))):i.answers.push({xpath:Nc(t),id:t.id,name:tu(t.getAttribute("name")),tag:t.tagName.toLowerCase(),class_name:t.className,input_type:t.getAttribute("type"),placeholder:tu(t.getAttribute("placeholder")),from:n,width:t.offsetWidth,height:t.offsetHeight,is_visible:Zc(t)})})),i})),i}catch(e){return void co(Mr.CUSTOM_ERROR,e,{custom_name:wc,custom_enum:gc.ASSEMBLE_FORM_DETAIL_ERROR})}}}]),e}(),ru=["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(e){return e.toUpperCase()})),iu=["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"],ou=["firstidxpath","absolutexpath","threeleveltagclassxpath"],au=["modelxpath"],cu=function(e,t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"updateParameterInferenceData",start:performance.now()}}catch(e){}try{var r=e.getPageInfo(),i=du(r.url,t);r.url.includes("checkout")&&i&&gu(i,r.url,t),i&&fu(i)}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData"})}try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(e){}},uu=function(e){try{var t=e.plugins&&e.plugins.AutoConfig;return t&&t.vc_rules}catch(e){return}},su=function(e){var t;try{if(!e)return null;var n=null,r=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;if(r){var i=(null===(t=r.textContent)||void 0===t?void 0:t.trim())||null;i&&(n=i)}return n}catch(e){return co(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData",custom_enum:"getEnhancementRuleDataByXPath"}),null}},lu=function(e,t){if(!e)return null;var n,r=null,i=T(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(r=su(e[o]))break}}catch(e){i.e(e)}finally{i.f()}if(!r)return null;var a=r,c=(null==e?void 0:e.format_method)&&function(e){if(!e)return null;var t=e.split("|||").filter((function(e){return""!==e}));if(t.length<2)return null;var n=v(t,3),r=n[0],i=n[1],o=n[2];return{pattern:r,replacement:i,flags:void 0===o?"":o}}(e.format_method);if(c)try{var u=c.pattern,s=c.replacement,l=c.flags,f=new RegExp(u,l);a=r.replace(f,s)}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData",custom_enum:"parseFormatMethod"})}var d=Object.assign({},e,{parameterOriValue:r,parameterValue:a});return ou.forEach((function(e){delete d[e]})),au.forEach((function(e){delete d[e]})),d},fu=function(e){try{var t=function(e){try{if(!e)return null;var t,n=T(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.parameter_enhancement)return r.parameter_enhancement}}catch(e){n.e(e)}finally{n.f()}}catch(e){e(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData",custom_enum:"getEnhancementRules"})}return null}(e);if(!t)return null;var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){var o=void 0;(o=(o=lu(i.helper_rule,ou))&&o.parameterValue?o:lu(i.model_rule,au))&&(n[r]=Object.assign({},o),ao(Mr.CUSTOM_INFO,{custom_name:"updateParameterInferenceData",custom_enum:"enhancement_rule_result",extJSON:{message:"".concat(JSON.stringify(i),"||").concat(JSON.stringify(o))}}))}}return ao(Mr.CUSTOM_INFO,{custom_name:"updateParameterInferenceData",custom_enum:"enhancement_properties",extJSON:{message:"".concat(JSON.stringify(n))}}),yu(bu,n),Object.keys(n).length>0?n:null}catch(e){return co(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData",custom_enum:"enhancement_parameter_inference"}),null}},du=function(e,t){for(var n in t)if(e.includes(n))return t[n];return null},pu=function(e,t){var n=function(e,t){try{for(var n,r=document.evaluate(e,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),i=null;n=r.iterateNext();)/\d/.test(n.innerText)&&(i=n);if(!i&&t)for(var o=document.getElementsByClassName(t),a=0;a=e.length-3&&(r=!0);r&&(t=t.slice(0,n-(e.length-1))+"."+t.slice(n-(e.length-1)));return t}(i)}return null}(r):null,textContent:r}},hu=function(e){var t;if(!e)return{currencyCode:null,currencyCodeFromeXpath:null};var n=null===(t=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===t?void 0:t.textContent,r=((null==n?void 0:n.trim())?iu.includes(n.toUpperCase().trim()):null)?null==n?void 0:n.toUpperCase().trim():null;return{currencyCode:n,currencyCodeFromeXpath:r}},_u=function(e){var t;if(!e)return{countryCode:null,countryCodeFromXpath:null};var n=null===(t=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===t?void 0:t.textContent,r=((null==n?void 0:n.trim())?ru.includes(n.toUpperCase().trim()):null)?null==n?void 0:n.toUpperCase().trim():null;return{countryCode:n,countryCodeFromXpath:r}},vu=function(e){try{var t=new URL(e).hostname.split(".");for(var n in t)if(ru.includes(t[n].toUpperCase()))return t[n].toUpperCase()}catch(e){}return null},gu=function(e,t,n){try{if(e){var r,i=T(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.valueXpath&&o.currency&&o.currency.val){var a=o.currency.val,c=pu(o.valueXpath,o.currency.val),u=c.textContent,s=c.priceNumberString;if(s&&u){var l=hu(o.currency.xpath),f=l.currencyCode,d=l.currencyCodeFromeXpath;f&&ao(Mr.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:t,currencyCode:f,vcConfig:n}});var p=_u(o.countryCodeXpath),h=p.countryCode,_=p.countryCodeFromXpath;h&&ao(Mr.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:t,country:h,vcConfig:n}});var v={value:s,currency:d||a,ori_value:u,rule_key:o.rule_key,country_code:_};if(!_){var g=vu(t);v.country_code=g}return ao(Mr.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:t,autoProperties:v,vcConfig:n}}),yu(Eu,v),v}}}}catch(e){i.e(e)}finally{i.f()}}return null}catch(e){return co(Mr.CUSTOM_ERROR,e,{custom_name:"updateParameterInferenceData",custom_enum:"updateAutoVCData"}),null}};var yu=function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}},mu=function(e){try{var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},Eu="value_currency_rule",bu="parameter_inference_rule",wu=[bc.CLICK,bc.SCROLL],Iu=function(){function e(t){var n=this;i(this,e),this.handlerArray=t,wu.forEach((function(e){window.addEventListener(e.toLowerCase(),Oi((function(){n.interactionHandler(e)}),Tc,n),{capture:!0,passive:!0})}))}return a(e,[{key:"iterateHandlerArray",value:function(e){this.handlerArray.forEach((function(t){return t(e)}))}},{key:"interactionHandler",value:function(e){var t=this;this.timeoutId&&clearTimeout(this.timeoutId),this.iterateHandlerArray(e),this.timeoutId=setTimeout((function(){t.iterateHandlerArray(e)}),Tc)}}]),e}(),Tu=function(){function e(){i(this,e),this.history={}}return a(e,[{key:"hasReport",value:function(e,t,n){var r=this.genHistoryKey(e,t);return this.history[r]&&this.history[r].indexOf(n)>-1}},{key:"addHistory",value:function(e,t,n){var r=this.genHistoryKey(e,t);this.history[r]||(this.history[r]=[]),this.history[r].push(n)}},{key:"clearHistory",value:function(){this.history={}}},{key:"genHistoryKey",value:function(e,t){return"".concat(e,":").concat(t)}}]),e}(),Ou=function(){function e(t,n,r){i(this,e),this.context=t,this.reportHistory=new Tu,this.reporters=n,this.reportService=r}return a(e,[{key:"report",value:function(e,t,n){var r=this,i=fo(Nr.AUTO_CONFIG),o=this.getReportPixelList(t,n),a=this.assemblyReportData(e,n,o);a&&i&&Po(this.reportService.reportPreposition||[]).then((function(){r.reportService.report(i,a,Bn.defaultReport)}))}},{key:"clearHistory",value:function(){this.reportHistory.clearHistory()}},{key:"getReportPixelList",value:function(e,t){var n=this,r=JSON.stringify(Object.assign({},t,{page_trigger:void 0}));return this.reporters.filter((function(t){return!!Ac(t)&&Pc(t,e)})).filter((function(t){var i=t.getReporterId();return!([mc.AUTO_COLLECTION,mc.AUTO_FORM].indexOf(e)>-1&&n.reportHistory.hasReport(e,i,r))&&(n.reportHistory.addHistory(e,i,r),t)}))}},{key:"assemblyReportData",value:function(e,t,n){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},Nr.AUTO_CONFIG);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=ar(this.context.getPageViewId(),a.reporterInfo.loadId,mr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),Su=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Nu=function(e,t){return function(n,r){t(n,r,e)}},Ru="AutoConfig",Au=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:Ru,reporters:r,context:e})).autoCollectedMetadata={},c.initialize=!1,c.autoFormUpdateHandler=Oi((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={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(e){}if(c.autoForm){if(c.autoCollectedFormDetail=c.autoForm.getOverallFormDetail(),c.autoCollectedFormDetail.length>3e4)return void co(Mr.CUSTOM_ERROR,{message:"".concat(String(c.autoCollectedFormDetail.length))},{custom_name:wc,custom_enum:gc.OVER_LENGTH});c.actTracker.report(yc.METADATA,mc.AUTO_FORM,{page_trigger:e,form_details:c.autoCollectedFormDetail})}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),"auto_config_form_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}}),200,f(c)),c.autoCollectionUpdateHandler=Oi((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={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(e){}c.autoCollectedMetadata=Vc(c.filter),c.actTracker.report(yc.METADATA,mc.AUTO_COLLECTION,{page_trigger:e,content_data:c.autoCollectedMetadata});try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),"auto_config_metadata_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(e){}}),200,f(c)),c.autoClickCallback=function(e){try{c.signal_insights_config&&cu(c.context,c.signal_insights_config);var t=function(e){var t=e,n=e.parentNode,r=0,i=!1;try{i=Pi(t)}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),i=!1}if(i)return t;for(;r<5&&n&&n!==document;){var o=!1;try{o=Pi(n)}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),o=!1}if(o)return n;n=n.parentNode,r++}return e}(e.target);if(t){var n=function(e){var t=e.tag,n=e.class,r=e.destination,i=e.id,o=e.name,a=e.type,c=e.value,u=e.rect,s=e.xpath,l=e.inner_text,f=e.image_url,d={tag:t,attributes:{},inner_text:l,xpath:s,num_child_buttons:e.num_child_buttons,timestamp:(new Date).toISOString(),position:u?{x:u.x,y:u.y}:{x:"",y:""}};return n&&(d.attributes.class=n),r&&(d.attributes.destination=r),i&&(d.attributes.id=i),o&&(d.attributes.name=o),a&&(d.attributes.type=a),c&&(d.attributes.value=c),f&&(d.image_url=f),d}(function(e){for(var t,n,r,i,o,a,c,u=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=e.attributes,l={type:"",value:"",name:"",class:"",dataset:"",id:"",tag:"",destination:"",xpath:"",inner_text:"",image_url:"",num_child_buttons:0},f=0;f-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ne.prototype.clear=function(){this.__data__={hash:new Oe,map:new(pe||Se),string:new Oe}},Ne.prototype.delete=function(e){return xe(this,e).delete(e)},Ne.prototype.get=function(e){return xe(this,e).get(e)},Ne.prototype.has=function(e){return xe(this,e).has(e)},Ne.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new Se},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ne(r)}return n.set(e,t),this};var Ue=se?J(se,Object):function(){return[]},Fe=function(e){return ee.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!Ke(e)}var We=le||function(){return!1};function Ke(e){var t=Ye(e)?ee.call(e):"";return t==c||t==u}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return Je(e)?Ae(e):function(e){if(!qe(e))return fe(e);var t=[];for(var n in Object(e))$.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}}(Pu,Pu.exports);var Cu=Pu.exports,ku={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 invalid. Content type must be either "product" or "product_group".',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:""}},Mu=/^[a-zA-Z\d]([a-zA-Z_\-\d ]{0,}[a-zA-Z_\-\d])?$/,Du=["product","product_group"],Lu=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],xu=["AED","ARS","AUD","BDT","BHD","BIF","BOB","BRL","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DZD","EGP","EUR","GBP","GTQ","HKD","HNL","HUF","IDR","ILS","INR","ISK","JPY","KES","KHR","KRW","KWD","KZT","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RUB","SAR","SEK","SGD","THB","TRY","TWD","UAH","USD","VES","VND","ZAR"],ju=["CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],Uu=function(e){return void 0===e},Fu="CompletePayment",Bu=function(e){var t=e.event,n=void 0===t?"":t;return!!["null","undefined"].includes(n)||(!!/^\s*$/.test(n)||!n)},qu=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Gu=function(e,t){return function(n,r){t(n,r,e)}},Vu=function(e){u(n,e);var t=p(n);function n(e,r,o){var a,c;return i(this,n),(a=t.call(this,{name:"DiagnosticsConsole",reporters:r,context:e})).isEnableDiagnosticsConsole=!1,a.isEnableDiagnosticsConsole=Boolean(null===(c=null==o?void 0:o.plugins)||void 0===c?void 0:c.DiagnosticsConsole),a}return a(n,[{key:"isDisableDiagnosticsConsole",value:function(){try{return!this.isEnableDiagnosticsConsole||Boolean(Object.values(this.reporters).some((function(e){var t,n;return void 0!==(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.diagnostics)&&!(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.diagnostics)})))}catch(e){return!1}}},{key:"warn",value:function(e,t){try{if(this.isDisableDiagnosticsConsole())return;!function(e,t){if(Dr[e]){var n=ei(),r=ku[e],i="".concat("[TikTok Pixel]"," - ").concat(r.title);r.desc&&(i+="\nIssue: ".concat(r.desc)),r.suggestion&&(i+="\nSuggestion: ".concat(r.suggestion)),t&&Object.keys(t).forEach((function(e){i=i.split("{{".concat(e,"}}")).join(t[e])})),i=i.trim(),r.link&&(i+=" See ".concat(r.link," for more information.")),n&&n.console&&n.console.warn&&n.console.warn(i)}}(e,t)}catch(t){co(Mr.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:e})}}},{key:"pixelDidMount",value:function(e){var t=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"console_plugin_pixelDidMount",start:performance.now()}}catch(e){}e.getParameterInfo().then((function(e){t.handlePixelInfoValidate(e)})).catch((function(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"pixel"})}));try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(e){}}},{key:"pixelSend",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;try{r&&r._i||i!==Nr.TRACK||t===Ar||this.handleEventPayloadValidate(Cu(n||{}))}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"track"})}}},{key:"handlePixelInfoValidate",value:function(e){if(e.status===ia.Live);else this.warn(Dr.INVALID_PIXEL_CODE)}},{key:"handleEventPayloadValidate",value:function(e){e.properties||(e.properties={}),Bu(e)&&this.warn(Dr.EMPTY_EVENT_TYPE_NAME),function(e){var t=e.event,n=void 0===t?"":t;return!!Bu(e)||Mu.test(n)}(e)||this.warn(Dr.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),function(e){var t=e.event;return(void 0===t?"":t).length<=50}(e)||this.warn(Dr.LONG_EVENT_TYPE_NAME),function(e){var t=e.event,n=e._inspection;if(t===Fu){var r=(void 0===n?{}:n).identity_params,i=void 0===r?{}:r;return 0===Object.keys(i).length||Lu.every((function(e){return(i[e]||[]).includes(Vn.EMPTY_VALUE)}))}return!1}(e)&&this.warn(Dr.MISSING_EMAIL_AND_PHONE),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Vn.FILTER_EVENTS)||(n.identity_params.sha256_email||[]).includes(Vn.FILTER_EVENTS))}(e)&&this.warn(Dr.INVALID_EMAIL_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Vn.UNKNOWN_INVALID)||(n.identity_params.sha256_email||[]).includes(Vn.UNKNOWN_INVALID))}(e)&&this.warn(Dr.INVALID_EMAIL_FORMAT),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Vn.FILTER_EVENTS)||(n.identity_params.sha256_phone||[]).includes(Vn.FILTER_EVENTS))}(e)&&this.warn(Dr.INVALID_PHONE_NUMBER_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Vn.UNKNOWN_INVALID)||(n.identity_params.sha256_phone||[]).includes(Vn.UNKNOWN_INVALID))}(e)&&this.warn(Dr.INVALID_PHONE_NUMBER_FORMAT),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;if(ju.includes(n)){if(Uu(i.contents)&&Uu(i.content_id))return!0;if(!Uu(i.contents))return!Array.isArray(i.contents)||i.contents.length<1||!i.contents.every((function(e){return e&&!Uu(e.content_id)}))}return!1}(e)&&this.warn(Dr.MISSING_CONTENT_ID),function(e){var t=e.properties,n=void 0===t?{}:t,r=n.content_id,i=n.contents;return!(!Uu(r)&&/^\s*$/.test(r))&&(!(!Uu(i)&&Array.isArray(i))||i.every((function(e){return e&&!Uu(e.content_id)&&!/^\s*$/.test(e.content_id)})))}(e)||this.warn(Dr.INVALID_CONTENT_ID),function(e){var t=e.properties.content_type;return!t||Du.includes(t)}(e)||this.warn(Dr.INVALID_CONTENT_TYPE),function(e){var t=e.properties.value;return!t||"number"==typeof t||!("string"!=typeof t||!/^\d+(\.\d+)?$/.test(t)&&!/^\d+$/.test(t))}(e)||this.warn(Dr.INVALID_EVENT_PARAMETER_VALUE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==Fu||!Uu(i.value))||!(Uu(i.currency)||!Uu(i.value))}(e)&&this.warn(Dr.MISSING_VALUE_PARAMETER),function(e){var t=e.properties.currency;return!t||xu.includes(t)}(e)||this.warn(Dr.INVALID_CURRENCY_CODE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==Fu||!Uu(i.currency))||!(Uu(i.value)||!Uu(i.currency))}(e)&&this.warn(Dr.MISSING_CURRENCY_PARAMETER,{learn_more:""})}}]),n}($o);Vu=qu([R.injectable(),Gu(0,R.inject(kr.CONTEXT)),Gu(1,R.inject(kr.TTQ_REPORTERS)),Gu(2,R.inject(kr.TTQ_GLOBAL_OPTIONS))],Vu);var Hu=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ju=function(e,t){return function(n,r){t(n,r,e)}},Wu=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PangleCookieMatching",reporters:r,context:e})).hasReport=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelPangleCookieMatching",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.reporters;if(e){var n=t.find((function(t){return t.getReporterId()===e}));if(n&&n.plugins.PangleCookieMatching)return!0}else if(t.some((function(e){return Boolean(e.plugins.PangleCookieMatching)})))return!0;return!1}},{key:"disablePangleCookie",value:function(){this.isPixelPangleCookieMatching()&&Ao("https://analytics.pangle-ads.com/api/v2/pangle_disable_cookie")}},{key:"pixelSend",value:function(e,t,n){var r;try{if(0===(null===(r=this.context.getPageSign().pageIndex)||void 0===r?void 0:r.index)&&!Gi(this.env)&&n&&n.message_id&&this.isPixelPangleCookieMatching(e)&&!this.hasReport){var i={event:n.event,message_id:n.message_id,context:{library:n.context.library},timestamp:(new Date).toJSON()};this.hasReport=!0,this.reportService.report("https://analytics.pangle-ads.com/api/v2/pangle_pixel",i,Bn.httpReport)}}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"pangle_report"})}}}]),n}($o);Wu=Hu([R.injectable(),Ju(0,R.inject(kr.CONTEXT)),Ju(1,R.inject(kr.TTQ_REPORTERS)),Ju(2,R.inject(kr.REPORT_SERVICE)),Ju(3,R.inject(kr.ENV))],Wu);var Ku,Yu="https://analytics.tiktok.com/i18n/pixel/eb.js",Xu="_tt_event_builder";!function(e){e.EVENT_BUILD_BOOTSTRAP_ACK="event_builder_bootstrap_ack",e.EVENT_BUILD_WRONG_CODE="event_builder_wrong_code",e.EVENT_BUILD_BOOTSTRAP="event_builder_bootstrap"}(Ku||(Ku={}));var Qu=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},zu=function(e,t){return function(n,r){t(n,r,e)}},Zu=function(e){u(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"EventBuilder",reporters:r,context:e})).pluginMounted=!1,o}return a(n,[{key:"pixelDidMount",value:function(e){var t=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var n={taskName:window.ttq._pf_tn,functionName:"event_builder_plugin_pixelDidMount",start:performance.now()}}catch(e){}if(!this.pluginMounted){this.pluginMounted=!0;var r=ni(),i=function(e){e.data.type!==Ku.EVENT_BUILD_BOOTSTRAP||r._event_builder_pickup_sdk_loaded||(t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))?(r._event_builder_pickup_sdk_loaded=!0,ho(Xu,e.data),Ao(Yu).then((function(){window.opener.window.postMessage({type:Ku.EVENT_BUILD_BOOTSTRAP_ACK},"*")})).catch((function(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"event_builder_load_error",custom_enum:"load_ebjs"})}))):r._event_builder_pickup_sdk_verify_flag||(setTimeout((function(){t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))||window.opener.window.postMessage({type:Ku.EVENT_BUILD_WRONG_CODE},"*")}),5e3),r._event_builder_pickup_sdk_verify_flag=!0))};r._event_builder_pickup_sdk_loaded||(po(Xu)?Ao(Yu).then((function(){r._event_builder_pickup_sdk_loaded=!0})):window.opener&&(window.addEventListener("message",i),setTimeout((function(){window.removeEventListener("message",i)}),8e3)));try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n))}catch(e){}}}}]),n}($o);Zu=Qu([R.injectable(),zu(0,R.inject(kr.CONTEXT)),zu(1,R.inject(kr.TTQ_REPORTERS))],Zu);var $u=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},es=function(e,t){return function(n,r){t(n,r,e)}},ts="tt_pixel_is_enrich_ipv6_triggered_by_enrich_am",ns=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"EnrichIpv6",reporters:r,context:e})).hasReported=!1,c.shouldReportAfterEnrichAM=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelEnrichIpv6",value:function(){var e=this.reporters;return!(!e||0===e.length)&&e.every((function(e){return e&&e.plugins&&!0===e.plugins.EnrichIpv6}))}},{key:"isEnrichIpv6V2SwitchOn",value:function(){var e="EnrichIpv6V2";try{var t=ni()._plugins||{};return null!=t[e]&&!!t[e]}catch(e){return!1}}},{key:"buildEnrichIpv6Data",value:function(e){var t=this.isEnrichIpv6V2SwitchOn()?"#source=2":"#source=1";return Object.assign(Object.assign({},e),{event:"EnrichIpv6",trigger_event:e.event,message_id:e.message_id+t})}},{key:"pixelSend",value:function(e,t,n){var r,i=arguments.length>4?arguments[4]:void 0;try{if(i!==Nr.TRACK)return;if("Shopify"!==ai(e)&&!this.isEnrichIpv6V2SwitchOn())return;if(Gi(this.env)||!n||!n.message_id)return;var o=this.context.getPageSign();0===(null===(r=o.pageIndex)||void 0===r?void 0:r.index)&&!this.hasReported&&this.isPixelEnrichIpv6()&&(this.hasReported=!0,this.reportService.report(Hr,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport));var a="true"===sessionStorage.getItem(ts);if(a)return;t===Cr&&(this.shouldReportAfterEnrichAM=!0),this.shouldReportAfterEnrichAM&&this.isPixelEnrichIpv6()&&(this.shouldReportAfterEnrichAM=!1,sessionStorage.setItem(ts,"true"),this.reportService.report(Hr,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport))}catch(e){co(Mr.CUSTOM_ERROR,e,{custom_name:"enrich_ipv6_report"})}}}]),n}($o);function rs(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:4;try{return Number.isInteger(e)?e:parseFloat(e.toFixed(t))}catch(e){return-1}}ns=$u([R.injectable(),es(0,R.inject(kr.CONTEXT)),es(1,R.inject(kr.TTQ_REPORTERS)),es(2,R.inject(kr.REPORT_SERVICE)),es(3,R.inject(kr.ENV))],ns);var os;!function(e){e.FIRST_CONTENTFUL_PAINT="fcp",e.LARGEST_CONTENTFUL_PAINT="lcp",e.FIRST_INPUT_DELAY="fid",e.TIME_TO_FIRST_BYTE="ttfb",e.PAGE_LEAVE="pl",e.LOAD_FINISH="lf",e.TIME_WINDOW_TRACKER="twt",e.TIME_TO_INTERACTIVE="tti"}(os||(os={}));var as,cs,us,ss,ls=function(){function e(t,n,r,o){i(this,e),o?(this.reportService=r,this.context=t,this.reporters=n,this.reportUrl=o):co(Mr.CUSTOM_ERROR,new Error("empty reportUrl"),{custom_name:"empty_reportUrl",custom_enum:"page_perf_monitor"})}return a(e,[{key:"getResult",value:function(e){return{action_event:e}}},{key:"report",value:function(e){var t=this;if(void 0!==e){var n=this.getReportPixelList(),r=this.assemblyReportData(Nr.PAGE,e,n);r&&Po(this.reportService.reportPreposition||[]).then((function(){t.reportService.report(t.reportUrl,r,Bn.defaultReport)})),this.resetAfterReport()}}},{key:"getReportPixelList",value:function(){return this.reporters}},{key:"assemblyReportData",value:function(e,t,n){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},Nr.PAGE);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=ar(this.context.getPageViewId(),a.reporterInfo.loadId,mr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),fs=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,e,r,o,a)).clickTimes=0,c.scrollTimes=0,c.init(),c}return a(n,[{key:"init",value:function(){var e,t,n=this;e=rs(this.updateClickTimes,this),t=ur((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=ur((function(){e()}),500);window.addEventListener("scroll",t,{passive:!0})}(rs(this.updateScrollTimes,this)),setInterval((function(){n.reportInteraction()}),1e4)}},{key:"reportInteraction",value:function(){this.isUpdated()&&(this.report(this.getResult(os.TIME_WINDOW_TRACKER)),this.resetAfterReport())}},{key:"getResult",value:function(e){return{action_event:e,inter:{ct:this.clickTimes,st:this.scrollTimes},page_inter:{metrics_type:"ct|st",ct:this.clickTimes,st:this.scrollTimes}}}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollTimes",value:function(){this.scrollTimes+=1}},{key:"isUpdated",value:function(){return 0!=this.clickTimes||0!=this.scrollTimes}},{key:"resetAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0}}]),n}(ls),ds=function(e){var t=function(){new Promise((function(e,t){setTimeout((function(){var n=performance.getEntriesByType("navigation");if(n.length>0){var r=n[0];e(r.loadEventEnd-r.startTime)}else window.performance.timing?e(window.performance.timing.loadEventEnd-window.performance.timing.navigationStart||-1):t("Performance timing not supported")}),0)})).then((function(t){e(os.LOAD_FINISH,t)})).catch((function(t){e(os.LOAD_FINISH,-1)}))};"complete"===window.document.readyState?t():window.addEventListener("load",t)},ps=-1,hs=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ps=t.timeStamp,e(t))}),!0)},_s=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},vs=function(){var e=_s();return e&&e.activationStart||0},gs=function(e,t){var n=_s(),r="navigate";return ps>=0?r="back-forward-cache":n&&(document.prerendering||vs()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ys=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},ms=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Es=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},bs=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},ws=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},Is=-1,Ts=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Os=function(e){"hidden"===document.visibilityState&&Is>-1&&(Is="visibilitychange"===e.type?e.timeStamp:0,Ns())},Ss=function(){addEventListener("visibilitychange",Os,!0),addEventListener("prerenderingchange",Os,!0)},Ns=function(){removeEventListener("visibilitychange",Os,!0),removeEventListener("prerenderingchange",Os,!0)},Rs=function(){return Is<0&&(Is=Ts(),Ss(),hs((function(){setTimeout((function(){Is=Ts(),Ss()}),0)}))),{get firstHiddenTime(){return Is}}},As=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Ps=[1800,3e3],Cs=function(e,t){t=t||{},As((function(){var n,r=Rs(),i=gs("FCP"),o=ys("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&cs1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Ls(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Ms),removeEventListener("pointercancel",r,Ms)};addEventListener("pointerup",n,Ms),addEventListener("pointercancel",r,Ms)}(t,e):Ls(t,e)}},Us=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,js,Ms)}))},Fs=[100,300],Bs=[2500,4e3],qs={},Gs=[800,1800],Vs=function e(t){document.prerendering?As((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Hs=function(e,t){t=t||{};var n=gs("TTFB"),r=ms(e,n,Gs,t.reportAllChanges);Vs((function(){var i=_s();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-vs(),0),n.entries=[i],r(!0),hs((function(){n=gs("TTFB",0),(r=ms(e,n,Gs,t.reportAllChanges))(!0)}))}}))},Js=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ws=function(e,t){return function(n,r){t(n,r,e)}},Ks=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,e,r,o,a)).cls=-1,c.init(),c}return a(n,[{key:"init",value:function(){var e;!function(e,t){t=t||{},Cs(ws((function(){var n,r=gs("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,n())},c=ys("layout-shift",a);c&&(n=ms(e,r,ks,t.reportAllChanges),bs((function(){a(c.takeRecords()),n(!0)})),hs((function(){i=0,r=gs("CLS",0),n=ms(e,r,ks,t.reportAllChanges),Es((function(){return n()}))})),setTimeout(n,0))})))}(this.clsHandler.bind(this),{reportAllChanges:!0}),Hs(this.webVitalHandler.bind(this)),Cs(this.webVitalHandler.bind(this)),function(e,t){t=t||{},As((function(){var n,r=Rs(),i=gs("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Xs=function(e,t){return function(n,r){t(n,r,e)}},Qs=function(e){u(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PageData",reporters:r,context:e})).monitors=[],c.ttqOptions={},c.reportService=o,c.context=e,c.reporters=r,c.ttqOptions=a,c.isPluginInit=!1,c}return a(n,[{key:"init",value:function(){if(this.isPageDataEnabled()){var e=this.isHitNewVersion();this.interactionMonitor=new fs(this.context,this.reporters,this.reportService,fo(e?Nr.PAGE_INTERACTION:Nr.AUTO_CONFIG)),this.performanceMonitor=new Ks(this.context,this.reporters,this.reportService,fo(e?Nr.PAGE_PERFORMANCE:Nr.AUTO_CONFIG)),this.monitors.push(this.performanceMonitor),this.monitors.push(this.interactionMonitor)}}},{key:"isPageDataEnabled",value:function(){var e,t;return null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PageData}},{key:"isHitNewVersion",value:function(){var e,t;return null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.HitReservoir}},{key:"report",value:function(e){var t=this.performanceMonitor,n=this.interactionMonitor,r=this.performanceMonitor.getResult(e),i=this.interactionMonitor.getResult(e),o=this.mergeReportData(e,i,r);t.report(o),n.report(o),this.interactionMonitor.resetAfterReport(),this.performanceMonitor.resetAfterReport()}},{key:"mergeReportData",value:function(e,t,n){var r={action_event:e};return r.perf=n.perf,r.inter=t.inter,r.page_perf=n.page_perf,r.page_inter=t.page_inter,r}},{key:"pageWillLeave",value:function(e){this.report(os.PAGE_LEAVE)}},{key:"pixelDidMount",value:function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var t={taskName:window.ttq._pf_tn,functionName:"page_plugin_pixelDidMount",start:performance.now()}}catch(e){}this.isPluginInit||(this.init(),this.isPluginInit=!0);try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t))}catch(e){}}}]),n}($o);Qs=Ys([R.injectable(),Xs(0,R.inject(kr.CONTEXT)),Xs(1,R.inject(kr.TTQ_REPORTERS)),Xs(2,R.inject(kr.REPORT_SERVICE)),Xs(3,R.inject(kr.TTQ_GLOBAL_OPTIONS))],Qs);var zs={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},Zs={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:[zs.initAllModule,zs.webTtqFactory,zs.handleCache,zs.webReporterFactory,zs.initAutoForm,zs.freezeAPI,zs.handlePixelRules,zs.resetExpires,zs.mergeWebGlobalTtq,zs.auto_config_plugin_pixelDidMount,zs.callback_plugin_pixelDidMount,zs.console_plugin_pixelDidMount,zs.event_builder_plugin_pixelDidMount,zs.shopify_plugin_pixelDidMount,zs.page_plugin_pixelDidMount,zs.competitor_insight_plugin_init,zs.getPixelInstalledPosition,zs.getPixelScriptByPixelCode,zs.handleGlobalCache,zs.basettq_init_context_info,zs.initAutoForm_getOverallFormDetail,zs.web_track_handler,zs.identify_api_handler,zs.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:[]}},$s=function(){function e(){i(this,e),this.queue=[],this.currentTaskMap={}}return a(e,[{key:"handleCache",value:function(e){var t=this;e.forEach((function(e){t.push(e)}))}},{key:"push",value:function(e){var t=e.taskName,n=e.functionName,r=e.start,i=e.end,o=Math.round(1e3*(i-r)),a=t&&this.getTaskIdFromName(t);if(a){var c=this.currentTaskMap[a];if(c||(this.currentTaskMap[a]=c={id:a,d:-1}),n){var u=this.getFunctionIdFromName(n);u&&(c.f=[].concat(y(c.f||[]),[{id:u,d:o}]))}else c.d=o,this.queue.push(c),delete this.currentTaskMap[a]}}},{key:"print",value:function(){return this.queue}},{key:"printAndClear",value:function(){var e=this.print();return this.clear(),e}},{key:"clear",value:function(){this.queue=[]}},{key:"getTaskIdFromName",value:function(e){var t;return null===(t=Zs[e])||void 0===t?void 0:t.id}},{key:"getFunctionIdFromName",value:function(e){return zs[e]}}]),e}(),el=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},tl=function(e,t){return function(n,r){t(n,r,e)}},nl=function(e){u(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"RuntimeMeasurement",reporters:r,context:e})).initialize=!1,o.init(),o}return a(n,[{key:"init",value:function(){if(!this.initialize){this.performanceDataQueue=new $s;var e=ni();e&&e._ppf&&(this.performanceDataQueue.handleCache(e._ppf),e._ppf=this.performanceDataQueue),this.initialize=!0}}}]),n}($o);nl=el([R.injectable(),tl(0,R.inject(kr.CONTEXT)),tl(1,R.inject(kr.TTQ_REPORTERS))],nl);var rl,il,ol=[{identifier:kr.CALLBACK_PLUGIN,to:nc,name:"Callback"},{identifier:kr.IDENTIFY_PLUGIN,to:dc,name:"Identify",required:!0},{identifier:kr.WEB_FL_PLUGIN,to:vc,name:"WebFL"},{identifier:kr.AUTO_CONFIG_PLUGIN,to:Au,name:"AutoConfig"},{identifier:kr.DIAGNOSTICS_CONSOLE_PLUGIN,to:Vu,name:"DiagnosticsConsole"},{identifier:kr.PANGLE_COOKIE_MATCHING_PLUGIN,to:Wu,name:"PangleCookieMatching"},{identifier:kr.EVENT_BUILDER_PLUGIN,to:Zu,name:"EventBuilder"},{identifier:kr.ENRICH_IPV6_PLUGIN,to:ns,name:"EnrichIpv6"},{identifier:kr.PAGEDATA_PLUGIN,to:Qs,name:"PageData"},{identifier:kr.RUNTIME_MEASUREMENT_PLUGIN,to:nl,name:"RuntimeMeasurement"}],al=/^[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+(:?\.[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$/,cl=function(e){return"function"==typeof Element?e instanceof Element:e&&"object"===t(e)&&e.nodeType===Node.ELEMENT_NODE&&"string"==typeof e.nodeName},ul=function(e,t){var n=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||null;return!(null===n||!n.call(e,t.join(",")))||e instanceof HTMLButtonElement&&!!t.includes("button[type='".concat(e.type,"']"))},sl=function(e){return e.trim().toLowerCase()},ll=function(e,t){return!(!e||!t)&&e.indexOf(t)>=0},fl=function(e){return"string"==typeof e&&al.test(e)},dl=function(e,t){var n=e.id,r=e.name,i=e.placeholder,o=void 0===i?"":i,a=e.value,c=void 0===a?"":a;return t.filter((function(e){return e.length>2?ll(r,e)||ll(n,e)||ll(o,e)||ll(c,e):r===e||n===e||o===e||c===e}))},pl=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},hl=function(e,t){return function(n,r){t(n,r,e)}},_l=function(e){u(r,e);var n=p(r);function r(e,t,o){var a;return i(this,r),(a=n.call(this,{name:"AutoAdvancedMatching",reporters:t,context:e})).rateMS=1e3,a.lastTime=0,a.lastElement=null,a.matchHistory=[],a.config=o.aam||{in_form:!0,selectors:{},exclude_selectors:[],phone_regex:"",phone_selectors:[],restricted_keywords:[]},a.phoneRegex=a.config.phone_regex?new RegExp(a.config.phone_regex):null,a.init(),a}return a(r,[{key:"init",value:function(){var e=this;document.addEventListener("click",(function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={taskName:window.ttq._pf_tn||"auto_advanced_matching_handler",functionName:window.ttq._pf_tn&&"auto_advanced_matching_handler",start:performance.now()};window.ttq._pf_tn||(window.ttq._pf_tn="auto_advanced_matching_handler")}}catch(t){}try{var r=ni()||[],i=t&&t.target&&t.target instanceof Node&&cl(t.target)?t.target:null;if(!i)return;if(!e.throttle(i))return;var o=e.getWrappingButton(i);if(!o)return;var a=e.getFormByButton(o);if(e.config.in_form&&!a)return;var c=e.getUserDataByForm(a);if(0===Object.keys(c).length)return;null==r||r.identify(Object.assign(c||{},{auto_trigger_type:e.getTriggerType(o,!!a)})),e.matchHistory.push(Object.assign({},c))}catch(t){ao(Mr.CUSTOM_ERROR,{pixelCode:so().pixelCode,custom_name:"advancedMatching"})}try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),"auto_advanced_matching_handler"===window.ttq._pf_tn&&(window.ttq._pf_tn=""))}catch(t){}}),{capture:!0,once:!1,passive:!0})}},{key:"throttle",value:function(e){var t=!1;return(!this.lastElement||!this.lastTime||Date.now()-this.lastTime>=this.rateMS||this.lastElement!==e)&&(t=!0),this.lastElement=e,this.lastTime=Date.now(),t}},{key:"getWrappingButton",value:function(e){if(!e||!function(e){if(!e||e===document.body)return!1;if(e.getBoundingClientRect&&"function"==typeof e.getBoundingClientRect){var t=e.getBoundingClientRect().height||e.offsetHeight||11;return t>10&&t<600}return!0}(e))return null;if((this.config.exclude_selectors||[]).length>0&&ul(e,this.config.exclude_selectors||[]))return null;var t=Object.keys(this.config.selectors||{});if(ul(e,t))return e;var n=e.parentNode;return n&&cl(n)?this.getWrappingButton(n):null}},{key:"getFormByButton",value:function(e){if(void 0!==("undefined"==typeof HTMLInputElement?"undefined":t(HTMLInputElement))&&e instanceof HTMLInputElement)return e.form;for(var n=e;"FORM"!==n.nodeName.toUpperCase();){var r=n.parentElement;if(!r)return null;n=r}return n}},{key:"getUserDataByForm",value:function(e){for(var t={},n=(e||document).querySelectorAll("input,textarea,select"),r=0;r0)return fl(r)&&ao(Mr.CUSTOM_INFO,{custom_name:"aam_hit_restricted",custom_enum:a.join(",")}),null;if(fl(r))return{auto_email:sl(r)};var c,u=function(e){if(!e)return null;for(var t=e.parentElement,n=e,r="";n;)(n=n.previousElementSibling)&&(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(r=n.value,n=null);if(!r||"string"!=typeof r)return null;if(!t||(t.innerText||t.textContent||"").indexOf("@")<0)return null;var i="".concat(r,"@").concat(e.value);return fl(i)?i:null}(e);if(u)return{auto_email:sl(u)};if("US"===((ni()||[])._cc||"").toUpperCase()&&(c=r,c.replace(/\D/g,"")).length<10)return null;var s=!(this.config.phone_selectors.length>0)||("tel"===t||"tel"===n||dl(Object.assign(o,{placeholder:i}),this.config.phone_selectors).length>0),l=!this.phoneRegex||this.phoneRegex.test(r);return s&&l?{auto_phone_number:r}:null}},{key:"getTriggerType",value:function(e,t){var n=this;try{var r=[];return Object.keys(this.config.selectors).forEach((function(t){ul(e,[t])&&r.push(n.config.selectors[t])})),0===r.length?"":"".concat(r.join(","),"-").concat(t?1:0)}catch(e){return""}}}]),r}($o);_l=pl([R.injectable(),hl(0,R.inject(kr.CONTEXT)),hl(1,R.inject(kr.TTQ_REPORTERS)),hl(2,R.inject(kr.TTQ_GLOBAL_OPTIONS))],_l);var vl=function(e,t){rl=t,(il=e).isBound(kr.AUTO_ADVANCED_MATCHING_PLUGIN)||il.bind(kr.AUTO_ADVANCED_MATCHING_PLUGIN).to(_l).inSingletonScope(),function(e,t){return!(!rl._mounted||rl.getPlugin(t)||!il.isBound(e))}(kr.AUTO_ADVANCED_MATCHING_PLUGIN,"AutoAdvancedMatching")&&rl.usePlugin(il.get(kr.AUTO_ADVANCED_MATCHING_PLUGIN))},gl=function(e,t){return gl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},gl(e,t)};function yl(e,t){function n(){this.constructor=e}gl(e,t),e.prototype=null===t?Object._ttq_create(t):(n.prototype=t.prototype,new n)}var ml,El=function(){return El=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(this.setResultIFrame.src=""+this.scheme+this.setResultPath+"&"+t),this.javascriptMessageQueue.splice(0,this.javascriptMessageQueue.length),e},e.prototype.sendMessageToNative=function(e){if("1"!==String(e.JSSDK)&&this.nativeMethodInvoker){var t=this.nativeMethodInvoker(e);if(t){var n=JSON.parse(t);this.handleMessageFromNative(n)}}else this.javascriptMessageQueue.push(e),this.dispatchMessageIFrame||this.tryCreateIFrames(),this.dispatchMessageIFrame.src=""+this.scheme+this.dispatchMessagePath},e.prototype.registerCallback=function(e,t){var n=String(this.callbackId++);return this.callbackMap[n]={method:e,callback:t},n},e.prototype.deregisterCallback=function(e){delete this.callbackMap[e]},e.prototype.tryCreateIFrames=function(){this.dispatchMessageIFrame=this.createIFrame(this.dispatchMessageIFrameId),this.setResultIFrame=this.createIFrame(this.setResultIFrameId)},e.prototype.createIFrame=function(e){var t=document.getElementById(e);return t&&"IFRAME"===t.tagName||((t=document.createElement("iframe")).style.display="none",t.id=e,document.documentElement.appendChild(t)),t},e}(),wl="2.2.15",Il="undefined"!=typeof __PIA_WORKER__?new Function("return this")():"undefined"!=typeof window?window:{},Tl=void 0!==Il&&Il.navigator?Il.navigator.userAgent:"",Ol=(!!Tl.match(/(newsarticle|videoarticle|lv|faceu|ulike|beauty_me_|faceu-os|ulike-os|beauty_me_oversea_|retouch)\/([\d.]+)/i)||/super|automobile/gi.test(Tl))&&!/webcast/gi.test(Tl)&&!/luckycatversion/gi.test(Tl),Sl=!!Tl.match(/(faceu)\/([\d.]+)/i)||/gsdk/gi.test(Tl)||/PIANativeWorker/gi.test(Tl),Nl=!!Tl.match(/ttad\/0/i),Rl=!!Tl.match(/aweme|trill|musical_ly|phoenix_\d+|TikTokNow_\d+/i),Al=!!Tl.match(/live_stream/i),Pl=!!Tl.match(/Webcast/i),Cl=!!Tl.match(/super/i),kl=!!Tl.match(/life_service_merchant/i),Ml=/super/gi.test(Tl);function Dl(){var e;if(Ol)return Il.JSBridge&&Il.JSBridge.on?e=Il.JSBridge.on:Il.JS2NativeBridge&&Il.JS2NativeBridge.on?e=function(e){var t={JSSDK:wl,__msg_type:"event",__callback_id:e,func:e};Il.JS2NativeBridge.on(e,JSON.stringify(t))}:Il.webkit&&Il.webkit.messageHandlers&&Il.webkit.messageHandlers.onMethodParams?e=function(e){var t={JSSDK:wl,__msg_type:"event",__callback_id:e,func:e};Il.webkit.messageHandlers.onMethodParams.postMessage(t)}:Il.onMethodParams&&(e=function(e){var t={JSSDK:wl,__msg_type:"event",__callback_id:e,func:e};return Il.onMethodParams(e,t)}),e}function Ll(e,t){if(("string"!=typeof t||!0!==/^(x|tc)\./.test(t))&&(Rl||Al||Pl||kl)){var n=e.__params;Il.JS2NativeBridge&&Il.JS2NativeBridge._invokeMethod&&(e.__params=El({code:n.code},n.data))}}var xl=function(e){function t(){var t=e.call(this,{version:wl,scheme:"bytedance://",listenNativeEvent:!0,dispatchMessageIFrameId:"__JSBridgeIframe_1.0__",setResultIFrameId:"__JSBridgeIframe_SetResult_1.0__",nativeEventListener:Dl(),callbackProcessor:Ll})||this;return t.publicApi={call:t.call.bind(t),on:t.on.bind(t),once:t.once.bind(t),off:t.off.bind(t),trigger:t.trigger.bind(t),_fetchQueue:t.fetchJavaScriptMessageQueue.bind(t),_handleMessageFromToutiao:t.handleMessageFromNative.bind(t)},t}return yl(t,e),t.prototype.exposePublicApiToGlobal=function(){Il.ToutiaoJSBridge=Object.assign(Il.ToutiaoJSBridge||{},this.publicApi)},t}(bl),jl=function(e){function t(t){var n,r=e.call(this,{version:wl,nativeMethodInvoker:(Il.JS2NativeBridge&&Il.JS2NativeBridge._invokeMethod?n=function(e){return Il.JS2NativeBridge._invokeMethod(JSON.stringify(e))}:Il.ToutiaoJSBridge&&Il.ToutiaoJSBridge.invokeMethod?n=function(e){return Il.ToutiaoJSBridge.invokeMethod(JSON.stringify(e))}:Il.JS2NativeBridge&&Il.JS2NativeBridge.call?n=function(e){return Il.JS2NativeBridge.call(e.func,JSON.stringify(e))}:Il.webkit&&Il.webkit.messageHandlers&&Il.webkit.messageHandlers.callMethodParams?n=function(e){Il.webkit.messageHandlers.callMethodParams.postMessage(e)}:Il.callMethodParams&&(n=function(e){return Il.callMethodParams(e.func,e)}),n),nativeEventListener:Dl(),scheme:Cl?"bds://":Ml?"bytedance://":Ol||Il.JSBridge&&Il.JSBridge._invokeMethod?"nativeapp://":"bytedance://",listenNativeEvent:Ol,callbackProcessor:Ll})||this;return r.toutiaoLegacyJSB=t,r.publicApi={call:r.call.bind(r),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),trigger:r.trigger.bind(r),_fetchQueue:r.fetchJavaScriptMessageQueue.bind(r),_handleMessageFromApp:r.handleMessageFromNative.bind(r),_handleMessageFromToutiao:r.handleMessageFromNative.bind(r)},r}return yl(t,e),t.prototype.call=function(t,n,r,i){void 0===i&&(i=wl),this.isLegacyCall(t)?this.toutiaoLegacyJSB.call(t,n,r,i):e.prototype.call.call(this,t,n,r,i)},t.prototype.on=function(t,n,r,i){return void 0===r&&(r=!1),(i||{}).useLegacy||this.isLegacyCall(t)?this.toutiaoLegacyJSB.on(t,n,r):e.prototype.on.call(this,t,n,r)},t.prototype.once=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.once(t,n):e.prototype.once.call(this,t,n)},t.prototype.off=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.off(t,n):e.prototype.off.call(this,t,n)},t.prototype.trigger=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.trigger(t,n):e.prototype.trigger.call(this,t,n)},t.prototype.exposePublicApiToGlobal=function(){var e=this;Il.JSBridge=Object.assign(Il.JSBridge||{},this.publicApi),Il.__DISABLE_JSB_PROTOCAL2__||(Il.Native2JSBridge=Object.assign(Il.Native2JSBridge||{},this.publicApi)),Ml?Il.ToutiaoJSBridge=Object.assign(Il.ToutiaoJSBridge||{},this.publicApi):(Ol||Nl)&&this.toutiaoLegacyJSB?this.toutiaoLegacyJSB.exposePublicApiToGlobal():Il.ToutiaoJSBridge=Object.assign(Il.ToutiaoJSBridge||{},this.publicApi),Il.parent!==Il&&Il.addEventListener&&Il.addEventListener("message",(function(t){t&&t.data&&t.data.__callback_id&&e.handleMessageFromNative(t.data)}),!1),Object.defineProperties(Il,{JSBridge:{writable:!1},Native2JSBridge:{writable:!1},ToutiaoJSBridge:{writable:!1}}),Object.freeze(Il.JSBridge),Object.freeze(Il.Native2JSBridge),Object.freeze(Il.ToutiaoJSBridge)},t.prototype.isLegacyCall=function(e){return!(!e||"string"!=typeof e||!this.toutiaoLegacyJSB)&&(!!Nl||!Sl&&!Ml&&(Ol&&e.indexOf(".")<0))},t}(bl);function Ul(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r=0;u--)(o=e[u])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ql=function(e,t){return function(n,r){t(n,r,e)}},zl=function(e){u(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:Hl,reporters:r,context:e})).enableListenSPAHistoryChange=!1,o.listenSPAHistoryChange=bi((function(){var e,t=function(){o.enableListenSPAHistoryChange&&o.notifyObservers({tf:Ir.HISTORY_CHANGE})},n=(e=t,function(){setTimeout(e)});window.addEventListener("popstate",n),history.pushState=Wl("pushState",t),history.replaceState=Wl("replaceState",t)})),o.dynamicWebPageviewHandler=Yl.bind(null,f(o)),o}return a(n,[{key:"initListener",value:function(e){this.enableListenSPAHistoryChange=function(e){if(!e)return!1;var t=ai(),n=e.getReporterPartner();return!(t&&!Jl.includes(t)||n&&e.isPartnerReporter()&&!Jl.includes(n))}(e),this.enableListenSPAHistoryChange&&this.listenSPAHistoryChange()}},{key:"pixelSend",value:function(e,t){var n=this.reporters.find((function(t){return t.getReporterId()===e}));n&&Kl(n)&&(t&&"pageview"===t.toLowerCase()&&this.addObserver(this.dynamicWebPageviewHandler),this.initListener(n))}},{key:"pageUrlWillChange",value:function(){this.enableListenSPAHistoryChange?this.notifyObservers({tf:Ir.HISTORY_CHANGE}):this.notifyObservers({tf:Ir.URL_CHANGE,event_experiment:"pageview"})}}]),n}(oa);zl=Xl([R.injectable(),Ql(0,R.inject(kr.CONTEXT)),Ql(1,R.inject(kr.TTQ_REPORTERS))],zl);var Zl=[{identifier:kr.HISTORY_OBSERVER,to:zl,name:"HistoryObserver"}],$l=ni(),ef=(null==$l?void 0:$l._container)||new R.Container,tf=(null==$l?void 0:$l._container)?aa.REBIND:aa.BIND;Bi();var nf=ef[tf](kr.ENV),rf=ef[tf](Rr.SignalType);ef[tf](Rr.ID),ef[tf](Rr.Type),ef[tf](Rr.Options),ef[tf](Rr.Plugins),ef[tf](Rr.Rules),ef[tf](Rr.Info);var of=ef[tf](Rr.WebLibraryInfo),af=ef[tf](kr.TTQ_GLOBAL_OPTIONS);try{if(!ef.get(kr.TTQ_GLOBAL_OPTIONS))throw new Error("")}catch(lo){af.toConstantValue({})}var cf=function(e,t){var n=function(e){return{name:"pixel.js",version:"2.2.0",options:e}}(),r=qi();of.toConstantValue(n),nf.toConstantValue(t),rf.toConstantValue(r),!e||e._mounted||ef.isBound(kr.JS_BRIDGE)||Gi(t)&&(Vi(t)?ef.bind(kr.JS_BRIDGE).toConstantValue(function(){if(window&&window.ToutiaoJSBridge&&window.ToutiaoJSBridge.call)return window.ToutiaoJSBridge}()||Bl):ef.bind(kr.JS_BRIDGE).toConstantValue(Vl))},uf=function(e){(null==e?void 0:e._container)||(ef.bind(kr.TTQ).to(Oa).inSingletonScope(),ef.bind(kr.CONTEXT).to(Ra).inSingletonScope(),ef.bind(kr.REPORTER).to(Ea),ef.bind(kr.TTQ_REPORTERS).toConstantValue([]),ef.bind(kr.REPORT_SERVICE).to(Qa).inSingletonScope(),ef.bind(kr.AD_SERVICE).to(Ca).inSingletonScope(),ef.bind(kr.APP_SERVICE).to(Da).inSingletonScope(),ef.bind(kr.BRIDGE_SERVICE).to(qa).inSingletonScope(),ef.bind(kr.HTTP_SERVICE).to(Ka).inSingletonScope(),ef.bind(Rr.IsOnsitePage).toConstantValue({value:!1}),ef.bind(kr.COOKIE_SERVICE).to($a).inSingletonScope(),ef.bind(kr.CONSENT_SERVICE).to(Ha).inSingletonScope()),e&&!e._container&&(e._container=ef)},sf=function(){ol.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.required,o=void 0!==i&&i,a=e.identifier;!o&&!ui(r)||ef.isBound(a)||ef.bind(a).to(t).inSingletonScope()}))},lf=function(){Zl.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.identifier;ui(r)&&!ef.isBound(i)&&ef.bind(i).to(t).inSingletonScope()}))},ff=function(e){return e&&e.Math==Math&&e},df=ff("object"==typeof globalThis&&globalThis)||ff("object"==typeof window&&window)||ff("object"==typeof self&&self)||ff("object"==typeof S&&S)||Function("return this")(),pf={},hf=function(e){try{return!!e()}catch(e){return!0}},_f=!hf((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),vf={},gf={}.propertyIsEnumerable,yf=Object.getOwnPropertyDescriptor,mf=yf&&!gf.call({1:2},1);vf.f=mf?function(e){var t=yf(this,e);return!!t&&t.enumerable}:gf;var Ef=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},bf={}.toString,wf=function(e){return bf.call(e).slice(8,-1)},If=wf,Tf="".split,Of=hf((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==If(e)?Tf.call(e,""):Object(e)}:Object,Sf=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},Nf=Of,Rf=Sf,Af=function(e){return Nf(Rf(e))},Pf=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Cf=Pf,kf=function(e,t){if(!Cf(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Cf(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Cf(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Cf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Mf={}.hasOwnProperty,Df=function(e,t){return Mf.call(e,t)},Lf=Pf,xf=df.document,jf=Lf(xf)&&Lf(xf.createElement),Uf=function(e){return jf?xf.createElement(e):{}},Ff=Uf,Bf=!_f&&!hf((function(){return 7!=Object.defineProperty(Ff("div"),"a",{get:function(){return 7}}).a})),qf=_f,Gf=vf,Vf=Ef,Hf=Af,Jf=kf,Wf=Df,Kf=Bf,Yf=Object.getOwnPropertyDescriptor;pf.f=qf?Yf:function(e,t){if(e=Hf(e),t=Jf(t,!0),Kf)try{return Yf(e,t)}catch(e){}if(Wf(e,t))return Vf(!Gf.f.call(e,t),e[t])};var Xf={},Qf=Pf,zf=function(e){if(!Qf(e))throw TypeError(String(e)+" is not an object");return e},Zf=_f,$f=Bf,ed=zf,td=kf,nd=Object.defineProperty;Xf.f=Zf?nd:function(e,t,n){if(ed(e),t=td(t,!0),ed(n),$f)try{return nd(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var rd=Xf,id=Ef,od=_f?function(e,t,n){return rd.f(e,t,id(1,n))}:function(e,t,n){return e[t]=n,e},ad={exports:{}},cd=df,ud=od,sd=function(e,t){try{ud(cd,e,t)}catch(n){cd[e]=t}return t},ld=sd,fd="__core-js_shared__",dd=df[fd]||ld(fd,{}),pd=dd,hd=Function.toString;"function"!=typeof pd.inspectSource&&(pd.inspectSource=function(e){return hd.call(e)});var _d=pd.inspectSource,vd=_d,gd=df.WeakMap,yd="function"==typeof gd&&/native code/.test(vd(gd)),md={exports:{}},Ed=dd;(md.exports=function(e,t){return Ed[e]||(Ed[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var bd,wd,Id,Td=0,Od=Math.random(),Sd=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Td+Od).toString(36)},Nd=md.exports,Rd=Sd,Ad=Nd("keys"),Pd=function(e){return Ad[e]||(Ad[e]=Rd(e))},Cd={},kd=yd,Md=Pf,Dd=od,Ld=Df,xd=Pd,jd=Cd,Ud=df.WeakMap;if(kd){var Fd=new Ud,Bd=Fd.get,qd=Fd.has,Gd=Fd.set;bd=function(e,t){return Gd.call(Fd,e,t),t},wd=function(e){return Bd.call(Fd,e)||{}},Id=function(e){return qd.call(Fd,e)}}else{var Vd=xd("state");jd[Vd]=!0,bd=function(e,t){return Dd(e,Vd,t),t},wd=function(e){return Ld(e,Vd)?e[Vd]:{}},Id=function(e){return Ld(e,Vd)}}var Hd={set:bd,get:wd,has:Id,enforce:function(e){return Id(e)?wd(e):bd(e,{})},getterFor:function(e){return function(t){var n;if(!Md(t)||(n=wd(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Jd=df,Wd=od,Kd=Df,Yd=sd,Xd=_d,Qd=Hd.get,zd=Hd.enforce,Zd=String(String).split("String");(ad.exports=function(e,t,n,r){var i=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Kd(n,"name")||Wd(n,"name",t),zd(n).source=Zd.join("string"==typeof t?t:"")),e!==Jd?(i?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=n:Wd(e,t,n)):o?e[t]=n:Yd(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Qd(this).source||Xd(this)}));var $d=df,ep=$d,tp=df,np=function(e){return"function"==typeof e?e:void 0},rp=function(e,t){return arguments.length<2?np(ep[e])||np(tp[e]):ep[e]&&ep[e][t]||tp[e]&&tp[e][t]},ip={},op=Math.ceil,ap=Math.floor,cp=function(e){return isNaN(e=+e)?0:(e>0?ap:op)(e)},up=cp,sp=Math.min,lp=function(e){return e>0?sp(up(e),9007199254740991):0},fp=cp,dp=Math.max,pp=Math.min,hp=Af,_p=lp,vp=function(e,t){var n=fp(e);return n<0?dp(n+t,0):pp(n,t)},gp=function(e){return function(t,n,r){var i,o=hp(t),a=_p(o.length),c=vp(r,a);if(e&&n!=n){for(;a>c;)if((i=o[c++])!=i)return!0}else for(;a>c;c++)if((e||c in o)&&o[c]===n)return e||c||0;return!e&&-1}},yp={includes:gp(!0),indexOf:gp(!1)},mp=Df,Ep=Af,bp=yp.indexOf,wp=Cd,Ip=function(e,t){var n,r=Ep(e),i=0,o=[];for(n in r)!mp(wp,n)&&mp(r,n)&&o.push(n);for(;t.length>i;)mp(r,n=t[i++])&&(~bp(o,n)||o.push(n));return o},Tp=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Op=Ip,Sp=Tp.concat("length","prototype");ip.f=Object.getOwnPropertyNames||function(e){return Op(e,Sp)};var Np={};Np.f=Object.getOwnPropertySymbols;var Rp,Ap=ip,Pp=Np,Cp=zf,kp=rp("Reflect","ownKeys")||function(e){var t=Ap.f(Cp(e)),n=Pp.f;return n?t.concat(n(e)):t},Mp=Df,Dp=kp,Lp=pf,xp=Xf,jp=hf,Up=/#|\.prototype\./,Fp=function(e,t){var n=qp[Bp(e)];return n==Vp||n!=Gp&&("function"==typeof t?jp(t):!!t)},Bp=Fp.normalize=function(e){return String(e).replace(Up,".").toLowerCase()},qp=Fp.data={},Gp=Fp.NATIVE="N",Vp=Fp.POLYFILL="P",Hp=Fp,Jp=df,Wp=pf.f,Kp=od,Yp=ad.exports,Xp=sd,Qp=function(e,t){for(var n=Dp(t),r=xp.f,i=Lp.f,o=0;oo;)sh.f(e,n=r[o++],t[n]);return e},ph=rp("document","documentElement"),hh=zf,_h=dh,vh=Tp,gh=Cd,yh=ph,mh=Uf,Eh=Pd("IE_PROTO"),bh=function(){},wh=function(e){return"