!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 I(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 T()}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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(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),E(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;E(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){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function n(){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 o(t,e,i){return o=n()?Reflect.construct.bind():function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&r(i,n.prototype),i},o.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(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 a(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 a(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 a(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=s(),i=o.getPlugin&&o.getPlugin("Monitor")||null;i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):p("Monitor")&&h.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}(u.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 s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,o=Object._ttq_create(i.prototype),a=new O(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 w()}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 s=l(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.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=u;var f={};function d(){}function p(){}function h(){}var v={};s(v,o,(function(){return this}));var _=Object.getPrototypeOf,g=_&&_(_(S([])));g&&g!==n&&r.call(g,o)&&(v=g);var y=h.prototype=d.prototype=Object._ttq_create(v);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,c){var s=l(e[i],e,o);if("throw"!==s.type){var u=s.arg,f=u.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){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.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 I(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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function S(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"),s=r.call(o,"finallyLoc");if(c&&s){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),T(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;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(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),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).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,s,"next",e)}function s(e){n(a,i,o,c,s,"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 S,w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var n="object"==typeof w?w:"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,s={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]}},u=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(D(n)){if(!q(e))throw new TypeError;if(!W(t))throw new TypeError;return O(e,t)}if(!q(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!D(r)&&!x(r))throw new TypeError;return x(r)&&(r=void 0),S(e,t,n=V(n),r)}function v(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!D(r)&&!K(r))throw new TypeError;C(e,t,n,r)}return n}function _(e,t,n,r){if(!U(n))throw new TypeError;return D(r)||(r=V(r)),C(e,t,n,r)}function g(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),N(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),R(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),A(e,t,n)}function E(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),P(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return D(t)||(t=V(t)),k(e,t)}function I(e,t){if(!U(e))throw new TypeError;return D(t)||(t=V(t)),M(e,t)}function T(e,t,n){if(!U(t))throw new TypeError;D(n)||(n=V(n));var r=w(t,n,!1);if(D(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 O(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!D(r)&&!x(r)){if(!W(r))throw new TypeError;t=r}}return t}function S(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!D(o)&&!x(o)){if(!U(o))throw new TypeError;r=o}}return r}function w(e,t,n){var r=p.get(e);if(D(r)){if(!n)return;r=new f,p.set(e,r)}var i=r.get(t);if(D(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=w(t,n,!1);return!D(r)&&H(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=w(t,n,!1);if(!D(r))return r.get(e)}function C(e,t,n,r){w(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,s=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,v=function(e,t,n,r,i){for(var o=[],a=0;a0?l:e(t,r)}return 0}}(oe);var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.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}();we.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=q,Le=W,De=z,xe=ee,je=re,Ue=oe,Fe=we,Be=ye;function He(e){return e._bindingDictionary}function Ge(e,t,n,r,i){var o=qe(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=qe(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=Le.getServiceIdentifierAsString(e),o=Pe.NOT_REGISTERED;throw o+=Le.listMetadataForTarget(i,n),o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,qe),new Error(o);case Ae.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case Ae.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=Le.getServiceIdentifierAsString(e),o=Pe.AMBIGUOUS_MATCH+" "+i;throw o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,qe),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 s=new je.Plan(r,c);r.addPlan(s)}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=q,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],s=c.scope===Ze.BindingScopeEnum.Singleton,u=c.scope===Ze.BindingScopeEnum.Request;if(s&&c.activated)return c.cache;if(u&&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)),s&&(c.cache=a,c.activated=!0),u&&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={},st={},ut={},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 vt=ht(ft.NAMED_TAG);lt.namedConstraint=vt;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(ut,"__esModule",{value:!0}),ut.BindingWhenSyntax=void 0;var _t=st,gt=lt,yt=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=gt.namedConstraint(e),new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=gt.taggedConstraint(e)(t),new _t.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return gt.typeConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return gt.namedConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return gt.taggedConstraint(e)(t)(n.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e}();ut.BindingWhenSyntax=yt,Object.defineProperty(st,"__esModule",{value:!0}),st.BindingOnSyntax=void 0;var mt=ut,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}();st.BindingOnSyntax=Et,Object.defineProperty(ct,"__esModule",{value:!0}),ct.BindingWhenOnSyntax=void 0;var bt=st,It=ut,Tt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new It.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=Tt,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingInSyntax=void 0;var Ot=k,St=ct,wt=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Request,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Singleton,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Transient,new St.BindingWhenOnSyntax(this._binding)},e}();at.BindingInSyntax=wt,Object.defineProperty(ot,"__esModule",{value:!0}),ot.BindingInWhenOnSyntax=void 0;var Nt=at,Rt=st,At=ut,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,Lt=ct,Dt=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 Lt.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 Lt.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 Lt.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 Lt.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 Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();it.BindingToSyntax=Dt;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 Ht=w&&w.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},Gt=w&&w.__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)},ir=function(){return new Date(Date.now()+864e5).toUTCString()};function or(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 ar,cr="tt_adInfo",sr="tt_appInfo",ur="_tt_enable_cookie",lr="_ttp",fr="messageId",dr="tt_sessionId",pr="tt_pixel_session_index",hr="default_eventId",vr="::";!function(e){e.MUSICAL_LY="musical_ly",e.MUSICALLY_GO="musically_go",e.TRILL="trill"}(ar||(ar={}));var _r,gr,yr,mr,Er,br={expires:390};!function(e){e[e.OFFSITE=0]="OFFSITE",e[e.ONSITE=1]="ONSITE"}(_r||(_r={})),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.BEFORE_SHOPIFY_PIXEL_SEND="beforeShopifyPixelSend",e.PIXEL_SEND="pixelSend",e.PIXEL_DID_MOUNT="pixelDidMount"}(gr||(gr={})),function(e){e.UNKNOWN="-1",e.LOADING="0",e.INTERACTIVE="1",e.COMPLETE="2"}(yr||(yr={})),function(e){e.HISTORY_CHANGE="hc"}(mr||(mr={})),function(e){e.EXTERNAL="external",e.APP="app",e.TIKTOK="tiktok"}(Er||(Er={}));var Ir,Tr={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")},Or="Pageview",Sr=[],wr={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"),PERFORMANCE_INTERACTION_PLUGIN:Symbol.for("PERFORMANCE_INTERACTION_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"}(Ir||(Ir={}));var Nr,Rr,Ar=["EnrichAM"],Pr="https://analytics.tiktok.com/api/v2",Cr="".concat(Pr,"/pixel"),kr="".concat(Pr,"/performance"),Mr="".concat(Pr,"/interaction"),Lr="".concat(Pr,"/performance_interaction"),Dr="".concat(Pr,"/pixel/act"),xr="ttclid",jr="_toutiao_params",Ur=["phone_number","email","external_id"],Fr="email_is_hashed",Br="phone_is_hashed",Hr="sha256_email",Gr="sha256_phone",Vr="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"}(Nr||(Nr={})),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"}(Rr||(Rr={}));var qr=null,Jr=function(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:new Function("return this")()},Wr=function(){return Jr().TiktokAnalyticsObject||"ttq"},Kr=function(){var e=Jr();return qr||e[Wr()]},Yr=function(){return!!Kr()._is_onsite},Xr=function(){var e=Jr();return("object"===("undefined"==typeof navigator?"undefined":t(navigator))&&navigator.userAgent?navigator.userAgent:"")||e._userAgent},Qr=function(e){try{var t=Kr();return t&&t._self_host_config&&t._self_host_config[e]||""}catch(e){return""}},zr=function(e){var t=Kr(),n=t._i||{},r=e&&n[e];return e&&r&&r._partner?r._partner:t._partner?t._partner:""},Zr=function(e){var t=Kr(),n=t._i||{};return Object.keys(n).filter((function(t){return n[t]._partner===e})).length>0||t._partner===e},$r=function(e){try{var t=Kr()._plugins||{};return null==t[e]||!!t[e]}catch(e){return!0}},ei=function(){var e;try{var t=Kr()._ppf;return null===(e=t.printAndClear)||void 0===e?void 0:e.call(t)}catch(e){}};var ti=function(e){return Boolean(e)},ni=function(e){return void 0!==e.metric_name},ri=function(e,t){var n,r;return ni(e)&&(null===(r=null===(n=null==t?void 0:t.plugins)||void 0===n?void 0:n.Monitor)||void 0===r?void 0:r.MonitorMq)?"insight_log_monitor":"insight_log"},ii=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!==Ur.indexOf(e)}))};function oi(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 ci(e,t){var n=Object.assign({},e);return t.forEach((function(e){null!==n[e]&&void 0!==n[e]&&delete n[e]})),n}var si=function(e,t){if(!e)return{};var n={};return Object.keys(e).forEach((function(r){t[r]&&(n[r]=e[r])})),n};function ui(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)}))),fi.apply(this,arguments)}var di=["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"],pi=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],hi=function(e){var t=di.some((function(t){return e.matches(t)})),n=pi.some((function(t){return e.matches(t)}));return t&&!n};function vi(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=vi(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 _i(e,t){return Object.keys(vi(e,t)).length>0}function gi(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():er(e)&&(n=e)),t&&er(t)&&Object.assign(n,t),n}var yi=function(e){try{var t=e&&function(e){for(var t=Array.prototype.slice.call(document.getElementsByTagName("script")),n=0;n-1)return r}}(e);if(t){if(mi(t))return"isInHead";if(Ei(t))return"isInBodyTop10"}return"unknown"}catch(e){return"unknown"}},mi=function e(t){var n=t.parentElement;return!!n&&("HEAD"===n.tagName||e(n))},Ei=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)},bi=function(){var e,t;return(null===(t=null===(e=Kr())||void 0===e?void 0:e._env)||void 0===t?void 0:t.env)||Er.EXTERNAL},Ii=function(){var e,t;return null!==(t=null===(e=Kr())||void 0===e?void 0:e._is_onsite)&&void 0!==t?t:_r.OFFSITE},Ti=function(e){return(e||bi())!==Er.EXTERNAL},Oi=function(e){return(e||bi())===Er.TIKTOK},Si=function(){var e=Xr();return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)?"ios":"pc"},wi=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(e){return Promise.resolve({})}},Ni=function(){return"android"===Si()},Ri=function(){return"ios"===Si()},Ai=oi((function(){return/open_news/i.test(Xr())})),Pi=oi((function(){return/ultralite/i.test(Xr())}));function Ci(){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 ki=function(){try{return function(){try{return self.parent.location.href,!1}catch(e){return!0}}()?function(){try{var e=new URL(decodeURIComponent(self.location.href)),t=/https?:\/\/[^\s/$.?#].[^\s]*/i;return t.test(e.search)||t.test(e.pathname)}catch(e){return!1}}()?Hn.URL_IN_QUERY_IFRAME:self.google_tag_manager?Hn.GTM_IFRAME:self.name&&"web-pixel-sandbox"===self.name?Hn.SANDBOX_IFRAME:Hn.CROSS_DOMAIN_IFRAME:Hn.NOT_CROSS_DOMAIN_IFRAME}catch(e){return Hn.UNKNOWN_IFRAME}},Mi=function(){return(void 0!==(e=Jr()).DedicatedWorkerGlobalScope?e instanceof e.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===e.constructor.name)?Hn.WEB_WORKER:self&&self!==self.top?ki():Hn.NORMAL;var e},Li=function(){var e=Ri()?function(){for(var e=Xr(),t=0,n=Object.keys(ar);ta)return!1}return!0},xi={info:[],error:[]};function ji(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=Kr(),i=r.getPlugin&&r.getPlugin("Monitor")||null;i&&i.info&&"function"==typeof i.info?i.info.call(i,e,t,n):$r("Monitor")&&xi.info.push({event:e,detail:t,withoutJSB:n})}catch(e){}}function Ui(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=Kr(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error?o.error.call(o,e,t,n,r):$r("Monitor")&&xi.error.push({event:e,err:t,detail:n,withoutJSB:r})}catch(e){}}function Fi(e,t){try{var n=Kr(),r=n.getPlugin&&n.getPlugin("DiagnosticsConsole")||null;r&&r.warn.apply(r,[e,t])}catch(e){}}function Bi(){try{0;var e=document&&document.currentScript,t=e&&e.src||"http://emptyURLSrc";return{pixelCode:new URL(t).searchParams.get("sdkid")||e&&e.getAttribute("data-id")||"",lib:Wr()||"ttq"}}catch(e){return{lib:"ttq",pixelCode:""}}}var Hi=function(e,t){if("selfhost"===e&&t&&Qr(t))return"https://".concat(Qr(t),"/api/v2/pixel");var n={track:Cr,performance:kr,interaction:Mr,performance_interaction:Lr,auto_config:Dr}[e];return n||null},Gi=function(e){try{var t=window.sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},Vi=function(e,t){try{var n=JSON.stringify(t);window.sessionStorage.setItem(e,n)}catch(e){}};function qi(e,t){try{return new URL(e).searchParams.get(t)||""}catch(e){return""}}var Ji=function(e,t,n){try{var r=qi(t||window.location.href,e);return r||qi(n||document.referrer,e)}catch(e){}return""},Wi="",Ki=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):""},Yi=function(e,t,n){try{if(n){if(Wi)return n.domain=Wi,void(document.cookie="".concat(e,"=").concat(t).concat(Qi(n)));for(var r=(n.domain||window.location.hostname).split("."),i=r.length,o="",a=0;a2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ir(),i={path:n,expires:r};Yi(e,t,i)};function Zi(){try{var e=document.readyState;return"loading"==e?yr.LOADING:"interactive"==e?yr.INTERACTIVE:"complete"==e?yr.COMPLETE:yr.UNKNOWN}catch(e){return yr.UNKNOWN}}function $i(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 eo=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,$i(n);case 5:return e.abrupt("return",Promise.resolve(!0));case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",eo.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)}}(),to=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||no;return n.includes(e)}function io(e){return!isNaN(e)&&e>=0}var oo=String.fromCharCode.bind(String),ao=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),co=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?oo(192|t>>>6)+oo(128|63&t):oo(224|t>>>12&15)+oo(128|t>>>6&63)+oo(128|63&t)}var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return oo(240|n>>>18&7)+oo(128|n>>>12&63)+oo(128|n>>>6&63)+oo(128|63&n)},so=/[\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+=ao[(t=n<<16|r<<8|i)>>18&63]+ao[t>>12&63]+ao[t>>6&63]+ao[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o}(function(e){return e.replace(so,co)}(e)))},lo=function(e){return t=JSON.stringify(e),uo(t);var t},fo=function(){var e=Kr();return"object"===t(e)&&e._i?e._i:{}},po=function(e,t){var n=fo()||{};Object.keys(n).forEach((function(r){var i=n[r];i._init||i.push([e].concat(t))}))},ho=function(e,t,n){var r=(fo()||{})[e];if(r){if(r._init)return;r.push([t].concat(n))}},vo=function(e,t){try{var n=Ji(xr,e,t)||void 0,r=Ji("ext_params",e,t)||void 0,i=Ji(jr,e,t)||void 0,o=parseInt(Ji("ttuts",e,t),10)||void 0,a=i?JSON.parse(i):{},c=a.log_extra,s=void 0===c?void 0:c,u=a.idc,l=void 0===u?void 0:u,f=a.cid,d=void 0===f?void 0:f;return{callback:n,ext_params:r,log_extra:s,creative_id:d,idc:l,ttuts:o,ad_info_from:(s||l||d)&&"url"}}catch(e){return{}}},_o=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},go=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,s=o.main;r.pageIndex={index:++a,sub:++c,main:s}}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(ai(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=nr("sessionId"),this.setSessionIdToCache(e));var t={sessionId:e,pageId:nr("pageId")};this.pageSign=t}}]),e}();go=_o([R.injectable()],go);var yo=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},mo=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;s--)(o=e[s])&&(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},Io=function(e){s(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,s=t.advertiserID,u=void 0===s?"":s,l=t.is_onsite,f=void 0!==l&&l;return{pixelCode:e.getReporterId(),name:r,status:o,setupMode:c,advertiserID:u.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]?!(!Sr.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||Ir.TRACK,c=i||Bn.defaultReport;return!this.reportService||this.hasReportEventHistory(e,c)?Promise.resolve(null):(this.pushReport(e,this.getReportEventHistoryKey(c)),to(this.reportService.reportPreposition||[]).then((function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:"track_after_report_preposition",functionName:void 0,start:performance.now()};window.ttq._pf_tn="track_after_report_preposition"}}catch(e){}var i=o.getReporterId(),s=o.trackSync(i,e,t,n,a,c);o.trackPostTask({reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:s});var u={reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:s};try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}return Promise.resolve(u)})))}},{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]:Ir.TRACK,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,a=arguments.length>6?arguments[6]:void 0,c=i!==Ir.SELFHOST?this.assemblyData(e,t,n,r,i):this.assemblySelfHostData(e,t,n,r,i),s=a||Hi(i,e);if(null!==s&&this.reportService)return this.emit("beforeReport",e,t,c,r,i),this.reportResultSet.push(this.reportService.report(s,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]||Ir.TRACK;var i=this.context.getAllData(),o=i.adInfo,a=i.userInfo,c=i.appInfo,s=i.pageSign,u=i.libraryInfo,l=i.pageInfo,f=i.signalType,d=s.sessionId,p=s.variationId,h=Object.assign({},n),v=h&&h.pixelMethod||"";h&&h.pixelMethod&&delete h.pixelMethod;var _=Object.assign({},u,{version:this.context.isLegacyPixel(e)?"legacy-".concat(u.version):u.version}),g=ci(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 I=r&&(r.event_id||r.eventID)||"";m.event_id=I||m.event_id||m.eventID||"",delete m.eventID;var T=this.getReporterInfo();T.pixel&&(T.pixel.runtime=Mi(),v&&(T.pixel.mode=v));var O=this.getUserInfo(qn.Manual)||{},S=this.getUserInfo(qn.ManualV2)||{},w=this.getReporterMatchedUserFormatInfoV2()||{},N=this.getUserInfo(qn.Auto)||{};N.auto_trigger_type&&(Object.assign(h,{auto_trigger_type:N.auto_trigger_type}),delete N.auto_trigger_type),Ni()&&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:I,message_id:rr(nr(fr),e),is_onsite:!!f,timestamp:(new Date).toJSON(),context:Object.assign(Object.assign({ad:y,device:{platform:c.platform},user:Object.assign({},R,O,S,N)},T),{page:Object.assign({},l),library:Object.assign({},_),session_id:rr(d,e),pageview_id:rr(this.context.getPageViewId(),this.getReporterUniqueLoadId(),vr),variation_id:p||""}),_inspection:w,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}(mo);Io=bo([R.injectable()],Io);var To=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Oo=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}(),So=function(e){s(n,e);var t=p(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n)}(Oo=To([R.injectable()],Oo)),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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},No=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){this.initContextInfo(e),this.initialize=!0}},{key:"initContextInfo",value:function(e){var t=this;this.dispatch(gr.CONTEXT_INIT_START);var n=e&&e.href?e.href:"";this.initAdInfo(n),this.initAppInfo(n),this.reportService.pushPreposition(Promise.resolve().then((function(){return t.initUserInfo()}))),this.initTestId(n),this.dispatch(gr.CONTEXT_INIT_END)}},{key:"setPageIndex",value:function(e){}},{key:"setPageInfo",value:function(e,t){var n=this.context.getPageInfo();if(n.url!==e){this.dispatch(gr.PAGE_URL_WILL_CHANGE,n.url,e);var r=this.context.setPageInfo(e,t);r&&(r.pageIndex&&this.setPageIndex(r.pageIndex),this.dispatch(gr.PAGE_URL_DID_CHANGE,e,r.from||""))}}},{key:"initAdInfo",value:function(e){}},{key:"initOffsiteAdInfo",value:function(e){}},{key:"initAppInfo",value:function(e){}},{key:"initUserInfo",value:function(){}},{key:"initTestId",value:function(e){}},{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||(Ui(Nr.PIXEL_EMPTY,new Error(""),{pixelCode:e}),new Eo(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:"identify_api_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="identify_api_handler"}}catch(e){}var r=gi(e,t);this.context.setUserInfo(r);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),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:"page_api_handler",functionName:void 0,start:performance.now()};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),window.ttq._pf_tn="")}catch(e){}}},{key:"isOnsitePage",value:function(){return this.context.getSignalType()===_r.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:"track_api_handler",functionName:void 0,start:performance.now()};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),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;s--)(o=e[s])&&(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},Ao=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}();Ao=Ro([R.injectable()],Ao);var Po,Co=function(e){s(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}(Oo);!function(e){e[e.Live=0]="Live",e[e.NoRecord=1]="NoRecord"}(Po||(Po={}));var ko,Mo=function(e,t,n){e.isBound(t)?e.rebind(t).toConstantValue(n):e.bind(t).toConstantValue(n)},Lo=function(e,t){var n=t.id,r=t.type,i=void 0===r?Zn.PIXEL_CODE:r,o=t.info,a=t.options,s=void 0===a?{}:a,u=t.plugins,l=void 0===u?{}:u,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(wr.TTQ),v=e.get(wr.TTQ_REPORTERS);if(!v.some((function(e){return e.getReporterId()===n}))){Mo(e,Tr.ID,n),Mo(e,Tr.Type,i),Mo(e,Tr.Info,o||c({},i,n)),Mo(e,Tr.Options,s),Mo(e,Tr.Plugins,l),Mo(e,Tr.Rules,d),h.enableFirstPartyCookie((null==o?void 0:o.firstPartyCookieEnabled)||!1);var _=e.get(wr.REPORTER);if(l){var g=l.AdvancedMatching,y=l.AutoAdvancedMatching,m={};g&&Object.assign(m,g),y&&Object.assign(m,y),_.setAdvancedMatchingAvailableProperties(m)}_.on("beforeReport",(function(e,t,n,r,i){h.dispatch(gr.PIXEL_SEND,e,t,n,r,i)})),v.push(_),e.rebind(wr.TTQ_REPORTERS).toConstantValue(v),h.dispatch(gr.PIXEL_DID_MOUNT,_);try{window.ttq&&window.ttq._ppf&&(p.end=performance.now(),window.ttq._ppf.push(p))}catch(e){}return _}},Do=function(e,t){var n=e.get(wr.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,s=n._cc,u=n._variation_id,l=n._server_unique_id,f=n._currency_list,d=n._plugins,p=n._aam,h=n._auto_config,v=n._sm,_=n._cde;Object.assign(t,{partner:r,ttp:i,cc:s,self_host_config:o,usd_exchange_rate:a,legacy:c,variation_id:u,server_unqiue_id:l,currency_list:f,plugins:d,aam:p,auto_config:h,sm:v,cde:_})}(t,n),e.isBound(wr.TTQ_GLOBAL_OPTIONS)?e.rebind(wr.TTQ_GLOBAL_OPTIONS).toConstantValue(n):e.bind(wr.TTQ_GLOBAL_OPTIONS).toConstantValue(n)},xo=function(e){var t=Jr(),n=Wr(),r=Kr(),i=Bi().pixelCode,o=void 0===i?"":i,a=["holdConsent","revokeConsent","grantConsent"];["instance","instances","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){ji(Nr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:JSON.stringify(n)})})),e[t].apply(e,n)}catch(e){return Ui(Nr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),["page","track","identify"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=1===arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){var e=JSON.stringify(n.map((function(e){return er(e)?Object.keys(e):e})));ji(Nr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:e})})),po(t,n),e[t].apply(e,n)}catch(e){return Ui(Nr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),t[n]._mounted=!0,t[n].initialize=!0,function(e){qr=e}(t[n])},jo=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=Kr(),o=function(){var e=Kr();return e&&e._i||{}}();if(Object.entries(o).forEach((function(r){var i=_(r,2),o=i[0],a=i[1];if(!a._init&&("Tealium"===zr(o)||Yr()||a.info)){if(t.getReporter(o))Fi(Rr.DUPLICATE_PIXEL_CODE);else(n||Lo)(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 s=g(c),u=s[0],l=s.slice(1),f=t.instance(o);if(f)switch(u){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[u]?f[u](l[0],l[1],l[2]||{}):Ui(Nr.CUSTOM_ERROR,new Error("action not find: ".concat(f[u])))}}}}})),i.length>0)for(;i.length;){var a=i.shift();if(a){var c=g(a),s=c[0],u=c.slice(1);switch(Zr("Tealium")||po(s,u),s){case"identify":t.identify(u[0],u[1]);break;case"page":t.page(u[0]);break;case"track":t.track(u[0],u[1],u[2]||{});break;case"enableCookie":t.enableCookie();break;case"disableCookie":t.disableCookie();break;case"holdConsent":t.holdConsent();break;case"revokeConsent":t.revokeConsent();break;case"grantConsent":t.grantConsent()}}}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(e){}},Uo={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"},Fo=["event_experiment","dynamic_parameter_config","eb_version","tf"],Bo=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},Ho=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},Go=function(){return"Shopify"===zr()},Vo=function(e){s(r,e);var n=p(r);function r(e){var t,o;i(this,r);var a=e.id,s=e.type,u=e.isOnsitePage,l=e.context,f=e.reporterInfo,d=e.ttqOptions,p=e.reportService,h=e.plugins,v=void 0===h?{}:h,_=e.rules,g=void 0===_?[]:_,y=e.options,m=void 0===y?{}:y;return(o=n.call(this,l,p)).ttp="",o.loaded=!1,o.id=a,o.pixelCode=a,o.type=s,o.isOnsitePage=u,o.options=m||{},o.plugins=v||{},o.rules=g||[],o.reporterInfo=Object.assign(f||{},(c(t={},s,a),c(t,"isDroppedShopifyPixel",d&&d.sm&&!!d.sm[o.id]),t)),o.ttp=d.ttp||"",o.currency_list=d.currency_list||null,o.ttqPartner=d.partner||"",o.selfHostConfig=d.self_host_config||{},o.pixelPromise=o.getInstance(),o}return a(r,[{key:"identify",value:function(e,t){var n=gi(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?v(u(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=si(t,Object.assign({},this.advancedMatchingAvailableProperties));switch(e){case qn.Manual:return si(this.isPartnerReporter()?n:t,{external_id:!0,email:!0,phone_number:!0});case qn.ManualV2:return si(this.isPartnerReporter()?n:t,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0});case qn.Auto:var r=si(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=_(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=si(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=_(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=si(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]:Ir.TRACK,a=v(u(r.prototype),"assemblyData",this).call(this,e,t,n,i,o);a.is_onsite=this.isOnsitePage.value;var c=zr(e)||this.ttqPartner;c&&(a.partner=c),a.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var s=Xr();s&&(a.context.userAgent=s);var l=Zi();return l&&(a.context.page.load_progress=l),a._inspection=Ho(Fo,a.properties,a._inspection),a._inspection.ppf=ei(),a.context.ad.sdk_env=bi(),a.context.ad.jsb_status=Ci(),o!==Ir.INTERACTION&&o!==Ir.PERFORMANCE&&o!==Ir.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(a.context.user={},a.context.ad=this.context.getOffsiteAdInfo(),a.context.ad=ci(a.context.ad,Xn)),a}},{key:"page",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.location.href!==this.currentHref&&(this.currentHref=window.location.href,this.track(Or,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]:Ir.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:"track_after_reporter_init",functionName:void 0,start:performance.now()};window.ttq._pf_tn="track_after_reporter_init"}}catch(e){}var s=t.getReporterId();if(Ar.includes(e))return v(u(r.prototype),"track",t).call(t,e,n,i,o,a);var l=Object.assign({},i);t.selfHostConfig[s]&&!i.eventID&&(l=Object.assign({},l,{eventID:rr(nr(hr),s)}));try{window.ttq&&window.ttq._ppf&&(c.end=performance.now(),window.ttq._ppf.push(c),window.ttq._pf_tn="")}catch(e){}return v(u(r.prototype),"track",t).call(t,e,n,l,o,a)}))}},{key:"getEventType",value:function(e){return Uo[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]:Ir.TRACK,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,l=arguments.length>6?arguments[6]:void 0;if("track"===c&&ji(Nr.PIXEL_SEND,{pixelCode:e,extJSON:{event:n}}),c===Ir.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=Bo(d);return null===(i=null==this?void 0:this.reportService)||void 0===i||i.report(l||Cr,p,Bn.httpReport),p}if(o&&"object"===t(o)){var h=o.value,_=o.currency;void 0===h||io(h)||ji(Nr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:n,value:h,currency:_}}),void 0===_||ro(_,this.currency_list)||ji(Nr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:n,value:h,currency:_}})}return v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}},{key:"trackPostTask",value:function(e){var t=e.reporterId,n=e.eventType,r=e.properties,i=e.eventConfig;Ar.includes(n)||this.selfHostConfig[t]&&!this.hasReportEventHistory(n,Bn.htmlHttpReport)&&(this.pushReport(n,this.getReportEventHistoryKey(Bn.htmlHttpReport)),this.trackSync(t,n,r,i,Ir.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}(Io),qo=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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(e,t){return function(n,r){t(n,r,e)}},Wo=function(e){s(n,e);var t=p(n);function n(e,r,o,a,c,s,u,l,f,d){return i(this,n),t.call(this,{id:e,type:r,isOnsitePage:o,context:a,reporterInfo:c,ttqOptions:s,reportService:u,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 fo()[e]||{}}(this.id);return Yr()||t&&t.info?(this.loaded=!0,this.pixelPromise=Promise.resolve(this)):(this.pixelPromise=new Promise((function(t,n){var r,i;eo((r=e.id,i=location&&location.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)}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ir.TRACK,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Bn.defaultReport,a=r.event_id||t.event_id||"";return Go()&&this.reporterInfo.isDroppedShopifyPixel&&a&&("Purchase"===e||a.startsWith("sh-"))&&(t.event_id&&delete t.event_id,r.event_id="trekkie_".concat(a),Object.assign(t,{event_experiment:"trekkie"})),v(u(n.prototype),"track",this).call(this,e,t,r,i,o)}}]),n}(Vo),Ko=function(e){s(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 ho(this.getReporterId(),"track",[e,t,n]),Promise.resolve(null)}}]),n}(Wo=qo([R.injectable(),Jo(0,R.inject(Tr.ID)),Jo(1,R.inject(Tr.Type)),Jo(2,R.inject(Tr.IsOnsitePage)),Jo(3,R.inject(wr.CONTEXT)),Jo(4,R.inject(Tr.Info)),Jo(5,R.inject(wr.TTQ_GLOBAL_OPTIONS)),Jo(6,R.inject(wr.REPORT_SERVICE)),Jo(6,R.optional()),Jo(7,R.inject(Tr.Plugins)),Jo(7,R.optional()),Jo(8,R.inject(Tr.Rules)),Jo(8,R.optional()),Jo(9,R.inject(Tr.Options)),Jo(9,R.optional())],Wo)),Yo=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Xo=function(e,t){return function(n,r){t(n,r,e)}},Qo=function(t){s(c,t);var n,o=p(c);function c(e,t,n,r,a,s,u,l,f,d,p,h,v,_,g,y,m,E,b,I,T,O,S,w){var N;return i(this,c),(N=o.call(this,e,a)).env=l,N.reporters=t,N.cookieService=s,N.consentService=u,N.adService=n,N.appService=r,N.historyObserver=S,N.autoAdvancedMatchingPlugin=d,N.callbackPlugin=p,N.identifyPlugin=h,N.monitorPlugin=f,N.performanceInteractionPlugin=v,N.webFLPlugin=_,N.shopifyPlugin=g,N.autoConfigPlugin=y,N.diagnosticsConsolePlugin=m,N.competitorInsightPlugin=E,N.pangleCookieMatchingPlugin=b,N.eventBuilderPlugin=I,N.pagedataPlugin=O,N.enrichIpv6Plugin=T,N.runtimeMeasurementPlugin=w,N.historyObserver&&N.useObserver(N.historyObserver),N.autoAdvancedMatchingPlugin&&N.usePlugin(N.autoAdvancedMatchingPlugin),N.callbackPlugin&&N.usePlugin(N.callbackPlugin),N.identifyPlugin&&N.usePlugin(N.identifyPlugin),N.monitorPlugin&&N.usePlugin(N.monitorPlugin),N.performanceInteractionPlugin&&N.usePlugin(N.performanceInteractionPlugin),N.webFLPlugin&&N.usePlugin(N.webFLPlugin),N.shopifyPlugin&&N.usePlugin(N.shopifyPlugin),N.autoConfigPlugin&&N.usePlugin(N.autoConfigPlugin),N.diagnosticsConsolePlugin&&N.usePlugin(N.diagnosticsConsolePlugin),N.competitorInsightPlugin&&N.usePlugin(N.competitorInsightPlugin),N.pangleCookieMatchingPlugin&&N.usePlugin(N.pangleCookieMatchingPlugin),N.eventBuilderPlugin&&N.usePlugin(N.eventBuilderPlugin),N.enrichIpv6Plugin&&N.usePlugin(N.enrichIpv6Plugin),N.runtimeMeasurementPlugin&&N.usePlugin(N.runtimeMeasurementPlugin),N.monitorPlugin&&(xi.info.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.info(e.event,e.detail,e.withoutJSB)})),xi.error.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.error(e.event,e.err,e.detail,e.withoutJSB)})),xi.info=[],xi.error=[]),N.dispatch(gr.INIT_START),N.pagedataPlugin&&N.usePlugin(N.pagedataPlugin),N.onPageLoaded(),N.onPageLeave(),N.init(window.location),N.setPageInfo(location.href,document.referrer),N.dispatch(gr.INIT_END),N}return a(c,[{key:"initAdInfo",value:function(e){this.dispatch(gr.BEFORE_AD_INFO_INIT_START);var t=Gi(cr);if(t)this.initAdCache(t);else if(Li()){var n=vo(e);n&&(n.creative_id&&n.log_extra||n.callback)&&(this.dispatch(gr.AD_INFO_INIT_START),Vi(cr,n),this.setAdInfo(n),this.initOffsiteAdInfo(n))}else this.initBaseAdInfo(e)}},{key:"initAdCache",value:function(e){this.dispatch(gr.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){var n=this;this.adService.webBridgeService.jsbridge&&this.dispatch(gr.AD_INFO_INIT_START),this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.adService.getAdInfo(t);case 3:i=e.sent,n.context.setAdInfo(i),n.initOffsiteAdInfo(i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),Ui(Nr.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,s=e.log_extra,u=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),u&&(n.ext_params=u),l&&(n.ATTStatus=l),s){var f=JSON.parse(s),d=f.ad_user_agent,p=f.ad_id,h=f.rit,v=f.ocbs,_=f.vid,g=f.idc,y=f.country_id;p&&(n.ad_id=p),h&&(n.rit=h),d&&(n.ad_user_agent=d),v&&(n.ocbs=v),_&&(n.vid=_),g&&(n.idc=g),y&&(n.country_id=y)}return n}catch(e){return t&&t(e),n}}(e,(function(e){Ui(Nr.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!Ri()||(Oi(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(gr.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:n}})}},{key:"initAppInfo",value:function(t){var n=this,i=Gi(sr);i?this.context.setAppInfo(i):this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.initBaseAppInfo(t);case 2:return i=e.sent,e.abrupt("return",i);case 4:case"end":return e.stop()}}),r)})))())}},{key:"initBaseAppInfo",value:(n=r(e().mark((function t(n){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appService.getAppInfo(n);case 2:return r=e.sent,this.context.setAppInfo(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"initTestId",value:function(e){if(!this.context.getTestID()){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{var n=Ji("tt_test_id",e);return n&&n!==t&&zi("tt_test_id",n,void 0,"session"),n||t}catch(e){return""}}(e,Ki("tt_test_id"));this.context.setTestID(t)}}},{key:"initUserInfo",value:function(){this.setCookieInfo()}},{key:"setPageIndex",value:function(e){e&&Xi(e)}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||new Ko(e,Zn.PIXEL_CODE,{value:!1},this.context,{pixelCode:e},{})}},{key:"instances",value:function(){return this.reporters}},{key:"page",value:function(e){v(u(c.prototype),"page",this).call(this,Object.assign({url:(null==e?void 0:e.page)||location.href,referrer:(null==e?void 0:e.referrer)||document.referrer},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]:{},r=n.pixel_code;if(void 0===r)v(u(c.prototype),"track",this).call(this,e,t,n);else{var i=this.instance(r);if(i instanceof Ko)return;i.track(e,t,n)}}},{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(gr.PAGE_DID_LOAD)}),{once:!0})}},{key:"onPageLeave",value:function(){var e=this,t=function(){var t=Date.now();e.dispatch(gr.PAGE_WILL_LEAVE,t),e.consentService.updateCache()};window.addEventListener("beforeunload",t,{once:!0}),Ri()&&window.addEventListener("onpagehide"in window?"pagehide":"unload",t)}},{key:"loadPixel",value:function(e,t){e&&(this.reporters.find((function(t){return t.getReporterId()===e}))?Fi(Rr.DUPLICATE_PIXEL_CODE):Kr().load(e,t||{}))}}]),c}(No),zo=Qo=Yo([R.injectable(),Xo(0,R.inject(wr.CONTEXT)),Xo(1,R.inject(wr.TTQ_REPORTERS)),Xo(2,R.inject(wr.AD_SERVICE)),Xo(3,R.inject(wr.APP_SERVICE)),Xo(4,R.inject(wr.REPORT_SERVICE)),Xo(5,R.inject(wr.COOKIE_SERVICE)),Xo(6,R.inject(wr.CONSENT_SERVICE)),Xo(7,R.inject(wr.ENV)),Xo(8,R.inject(wr.MONITOR_PLUGIN)),Xo(8,R.optional()),Xo(9,R.inject(wr.AUTO_ADVANCED_MATCHING_PLUGIN)),Xo(9,R.optional()),Xo(10,R.inject(wr.CALLBACK_PLUGIN)),Xo(10,R.optional()),Xo(11,R.inject(wr.IDENTIFY_PLUGIN)),Xo(11,R.optional()),Xo(12,R.inject(wr.PERFORMANCE_INTERACTION_PLUGIN)),Xo(12,R.optional()),Xo(13,R.inject(wr.WEB_FL_PLUGIN)),Xo(13,R.optional()),Xo(14,R.inject(wr.SHOPIFY_PLUGIN)),Xo(14,R.optional()),Xo(15,R.inject(wr.AUTO_CONFIG_PLUGIN)),Xo(15,R.optional()),Xo(16,R.inject(wr.DIAGNOSTICS_CONSOLE_PLUGIN)),Xo(16,R.optional()),Xo(17,R.inject(wr.COMPETITOR_INSIGHT_PLUGIN)),Xo(17,R.optional()),Xo(18,R.inject(wr.PANGLE_COOKIE_MATCHING_PLUGIN)),Xo(18,R.optional()),Xo(19,R.inject(wr.EVENT_BUILDER_PLUGIN)),Xo(19,R.optional()),Xo(20,R.inject(wr.ENRICH_IPV6_PLUGIN)),Xo(20,R.optional()),Xo(21,R.inject(wr.PAGEDATA_PLUGIN)),Xo(21,R.optional()),Xo(22,R.inject(wr.HISTORY_OBSERVER)),Xo(22,R.optional()),Xo(23,R.inject(wr.RUNTIME_MEASUREMENT_PLUGIN)),Xo(23,R.optional())],Qo);!function(e){e.BIND="bind",e.REBIND="rebind"}(ko||(ko={}));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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},$o=function(e,t){return function(n,r){t(n,r,e)}},ea=function(e){s(n,e);var t=p(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,e)).setSignalType(c||_r.OFFSITE),s.pageSign={sessionId:"",pageId:"",variationId:"",pageIndex:{main:-1,sub:-1,index:-1}},s.legacy=o.legacy||[],s.variationId=o.variation_id||"",s.serverUniqueId=o.server_unqiue_id||"",s.reportService=r,s.initPageSign(),Oi(a)&&Ri()&&(s.enableAdTracking=!1),s.data=f(s),s}return a(n,[{key:"getSessionIdFromCache",value:function(){var e=null;try{e=JSON.parse(sessionStorage.getItem(dr)||"")}catch(e){}return e}},{key:"setSessionIdToCache",value:function(e){Vi(dr,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(pr)||"{}");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=_(t,2),i=r[0],o=r[1];o&&(i!==Vr?n[i]=String(o).trim():e.setUserInfoWithoutIdentifyPlugin(c({},Vr,o)))}));var r=Kr(),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:"identify_after_encryption",functionName:void 0,start:performance.now()};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 s=e.getUserFormatInfo()||{},u=e.getUserFormatInfoV2()||{},l=e.getSignalDiagnosticLabels()||{};if(e.setUserFormatInfo(Object.assign({},s,a)),e.setUserFormatInfoV2(Object.assign({},u,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(qn.Manual),f.getUserInfo(qn.Auto))):[];f&&d.length&&f.track("EnrichAM",{},{},Ir.TRACK)}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}})).catch((function(e){Ui(Nr.API_ERROR,e,{extJSON:{api:"identify"}})})))}}},{key:"initPageSign",value:function(){var e,t=this.getSessionIdFromCache();null===t&&(t=(e=this.serverUniqueId)?"".concat(e).concat(vr).concat(ai(20)):nr("sessionId"),this.setSessionIdToCache(t));var n,r=this.getPageId((n=t)?n.split(vr)[0]:""),i=this.getVariationId(),o=this.getSessionIndex();o.main++,this.pageSign={sessionId:t,pageId:r,variationId:i,pageIndex:o}}}]),n}(go);ea=Zo([R.injectable(),$o(0,R.inject(Tr.WebLibraryInfo)),$o(1,R.inject(wr.REPORT_SERVICE)),$o(2,R.inject(wr.TTQ_GLOBAL_OPTIONS)),$o(3,R.inject(wr.ENV)),$o(3,R.optional()),$o(4,R.inject(Tr.SignalType)),$o(4,R.optional())],ea);var ta=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAdInfo",value:(n=r(e().mark((function t(){var n,r,i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:window.location.href,r=this.getAdInfoFromURL(n),!this.webBridgeService.jsbridge){e.next=8;break}return e.next=5,this.webBridgeService.getAdInfo();case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0={};case 9:return i=e.t0,(o=Object.assign({},r,i))&&(o.creative_id&&o.log_extra||o.callback)&&Vi(cr,o),e.abrupt("return",o);case 13:case"end":return e.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getAdInfoFromURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href;return vo(e)}}]),t}();ra=ta([R.injectable(),na(0,R.inject(wr.BRIDGE_SERVICE))],ra);var ia=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},oa=function(e,t){return function(n,r){t(n,r,e)}},aa=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){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n||window.location.href,(i=this.getAppInfoFromURL(r)).platform=Si(),!Ni()){e.next=11;break}return e.next=6,wi();case 6:o=e.sent,a=o.model,c=o.platformVersion,i.device_model=a,i.android_version=c;case 11:return tr(i)||Vi(sr,i),e.abrupt("return",i);case 13:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"getAppInfoFromURL",value:function(e){try{var t=Ji(jr,e||window.location.href),n=t&&JSON.parse(t);return{device_id:n.device_id,user_id:n.uid}}catch(e){return{}}}}]),t}();aa=ia([R.injectable(),oa(0,R.inject(wr.BRIDGE_SERVICE))],aa);var ca="ad_analytics_msg",sa=function(e){return!!(e.code&&e.data&&e.ret)};function ua(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(sa(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&&Ui(Nr.JSB_ERROR,e,{extJSON:{position:"getCallPromise bridge.call"}})}return n}var la,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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},da=function(e,t){return function(n,r){t(n,r,e)}},pa=function(){function t(e,n,r){i(this,t),this.env=n,Ti(this.env)&&(this.jsbridge=r),this.bridgeTimeout=400,this.ttqOptions=e}var n,o,c,s,u,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 Ui(Nr.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({}),Ui(Nr.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",{},window.top!==window?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 ji(Nr.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),e.abrupt("return",{ad_info_status:"timeout"});case 17:return Ui(Nr.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:(u=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 u.apply(this,arguments)})},{key:"send",value:(s=r(e().mark((function t(n,r){var i,o,a,c,s,u,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=lo(n),s=ri(n,this.ttqOptions),u={analytics_message:c,trackLogData:JSON.stringify(n),category:"ad_analytics_msg",tag:ca,label:s},d={eventName:ca,labelName:s,value:a,extValue:"0",extJson:u},Li()||ni(n)?(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):Oi(this.env)?Ri()&&r?(p={eventName:s,params:u},f="sendLogWithAdInfo",l=this.call("sendLogWithAdInfo",p,this.bridgeTimeout)):(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):(h={event_name:s,version:2,properties:u},f="track_event",l=this.call("track_event",h,400)),ji(Nr.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 s.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&&Ui(Nr.JSB_ERROR,new Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}}));var c;i>0&&(c=window.setTimeout((function(){t("JSBRIDGE TIMEOUT"),o&&Ui(Nr.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=ua(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(!Oi(this.env)||!Ri()){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}();pa=fa([R.injectable(),da(0,R.inject(wr.TTQ_GLOBAL_OPTIONS)),da(1,R.inject(wr.ENV)),da(1,R.optional()),da(2,R.inject(wr.JS_BRIDGE)),da(2,R.optional())],pa),function(e){e[e.P0=4]="P0",e[e.P1=3]="P1",e[e.P2=2]="P2",e[e.P3=1]="P3"}(la||(la={}));var ha=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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",_a=function(e){s(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=ui((function(){e.updateCache()}),200,f(e)),e.handleHistoryQueue=oi((function(){var t=Gi(va);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())})),e}return a(n,[{key:"on",value:function(e,t){v(u(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&&Vi(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?la.P0:e.action&&e.action.length>0?la.P1:""===e.event?la.P2:la.P3}}]),n}(mo);_a=ha([R.injectable()],_a);var ga=function(e){return Boolean(e)},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 s=e.length-1;s>=0;s--)(o=e[s])&&(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(){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,li(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}();ma=ya([R.injectable()],ma);var 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 s=e.length-1;s>=0;s--)(o=e[s])&&(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)}},Ia=function(t){s(f,t);var n,o,c,u,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:(u=r(e().mark((function t(n,r,i){var o,a,c,s,u,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=!!(u=r).context&&"timeout"===(null===(a=null===(o=u.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(u,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 ti(u.event)&&ji(Nr.JSB_SEND,{pixelCode:null===(c=u.context.pixel)||void 0===c?void 0:c.code,app_name:Pi()?"ultralite":"",extJSON:{event:u.event,event_id:u.event_id,need_inject_ad_info:l}}),e.abrupt("return",f);case 15:e.prev=15,e.t0=e.catch(5),ti(u.event)&&Ui(Nr.JSB_ERROR,e.t0,{pixelCode:null===(s=u.context.pixel)||void 0===s?void 0:s.code,custom_name:"sendReportData",custom_enum:f&&f.code?"".concat(f.code):"non",app_name:Pi()?"ultralite":"",extJSON:{position:"sendReportData"}}),Pi()&&Ni()&&this.sendHttpReport(n,u,i);case 19:case"end":return e.stop()}}),t,this,[[5,15]])}))),function(e,t,n){return u.apply(this,arguments)})},{key:"sendHttpReport",value:(c=r(e().mark((function t(n,r,i){var o,a,c,s=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=!(s.length>3&&void 0!==s[3])||s[3],a=s.length>4?s[4]:void 0,e.next=4,this.httpService.send(n,r,a);case 4:e.sent||this.httpService.sendByImage(n,{analytics_message:i}),o&&ji(Nr.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,s,u=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]?u[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=lo(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||!Oi(this.env)||Ai()||!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,s=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,s;case 22:if(1!==c){e.next=24;break}return e.abrupt("return");case 24:throw s;case 27:e.prev=27,e.t0=e.catch(13),Ui(Nr.CUSTOM_ERROR,e.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 30:this.sendHttpReport(n,r,o,!(!ti(r.event)||!ii(r)),ga(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}(Ao);Ia=Ea([R.injectable(),ba(0,R.inject(wr.HTTP_SERVICE)),ba(1,R.inject(wr.BRIDGE_SERVICE)),ba(2,R.inject(wr.CONSENT_SERVICE)),ba(3,R.inject(wr.ENV)),ba(3,R.optional())],Ia);var Ta=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Oa=function(e,t){return function(n,r){t(n,r,e)}},Sa=function(){function t(e){i(this,t),this.cookieExpireOption=function(e){if(e&&e.cde){var t=e.cde;return Object.assign({},br,{expires:t})}return br}(e)}var n;return a(t,[{key:"genCookieID",value:function(){return ai(27)}},{key:"enableCookie",value:(n=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Yi(ur,"1",this.cookieExpireOption),e.abrupt("return",eo("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){Yi(ur,"1",this.cookieExpireOption);var t=this.genCookieID(),n=this.getAnonymousId();this.setAnonymousId(n||t)}}},{key:"disableCookie",value:function(){Yi(ur,"0",this.cookieExpireOption),Yi(lr,"",Object.assign(this.cookieExpireOption,{expires:-1})),eo("https://analytics.tiktok.com/i18n/pixel/disable_cookie")}},{key:"setAnonymousId",value:function(e){var t=this.getAnonymousId()||e;t&&Yi(lr,t,this.cookieExpireOption)}},{key:"getAnonymousId",value:function(){return Ki(lr)||""}},{key:"canUseCookie",value:function(){try{return"0"!==Ki(ur)}catch(e){}return!1}},{key:"resetExpires",value:function(){var e=Ki(ur);e&&Yi(ur,e,this.cookieExpireOption);var t=this.getAnonymousId();t&&this.setAnonymousId(t)}}]),t}();Sa=Ta([R.injectable(),Oa(0,R.inject(wr.TTQ_GLOBAL_OPTIONS))],Sa);var 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 s=e.length-1;s>=0;s--)(o=e[s])&&(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){s(n,e);var t=p(n);function n(e,r){return i(this,n),t.call(this,{name:"Callback",reporters:r,context:e})}return a(n,[{key:"pixelDidMount",value:function(e){var t=Ji("ttclid");t&&zi("ttclid",t)}},{key:"beforeShopifyPixelSend",value:function(e,t){var n=qi(e,"ttclid");n||(n=qi(t,"ttclid")),n&&zi("ttclid",n)}}]),n}(So);Ra=wa([R.injectable(),Na(0,R.inject(wr.CONTEXT)),Na(1,R.inject(wr.TTQ_REPORTERS))],Ra);var Aa={isHash:function(e){return!1},genIdentifierLabelByUserProperties:function(e){return{}}},Pa={validatePhoneNumberLength:function(e){},parsePhoneNumberFromString:function(e){}},Ca={tryDecodeHashedBase64String:function(e){return null},tryDecodeHashedBase64Hex:function(e){return null}},ka=function(e){var t,n=e.parsePhoneNumberFromString,r=e.validatePhoneNumberLength,i=e.isHash,o=e.genIdentifierLabelByUserProperties,a=e.tryDecodeHashedBase64String,c=e.tryDecodeHashedBase64Hex,s=e.checkEmailFormat,u=e.checkMDNEmailFormat;e.sha256,t={checkEmailFormat:s,checkMDNEmailFormat:u},t.checkMDNEmailFormat,function(e){var t=e.tryDecodeHashedBase64String,n=e.tryDecodeHashedBase64Hex;Ca.tryDecodeHashedBase64String=t,Ca.tryDecodeHashedBase64Hex=n}({tryDecodeHashedBase64String:a,tryDecodeHashedBase64Hex:c}),function(e){var t=e.isHash,n=e.genIdentifierLabelByUserProperties;Aa.isHash=t,Aa.genIdentifierLabelByUserProperties=n}({isHash:i,genIdentifierLabelByUserProperties:o}),function(e){var t=e.parsePhoneNumberFromString,n=e.validatePhoneNumberLength;Pa.parsePhoneNumberFromString=t,Pa.validatePhoneNumberLength=n}({parsePhoneNumberFromString:n,validatePhoneNumberLength:r})},Ma=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Pa.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},La=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"],Da=function(e){s(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,s=e.checkEmailFormat,u=e.checkMDNEmailFormat,l=e.getCookieDeprecationLabel,f=void 0===l?function(){}:l,d=e.getAllTopics,p=void 0===d?function(){}:d;ka({isHash:t,sha256:n,genIdentifierLabelByUserProperties:r,tryDecodeHashedBase64String:i,tryDecodeHashedBase64Hex:o,validatePhoneNumberLength:a,parsePhoneNumberFromString:c,checkEmailFormat:s,checkMDNEmailFormat:u}),this.parsePhoneNumberFromString=c,this.checkMDNEmailFormat=u,this.checkEmailFormat=s,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:"identify_encryption",functionName:void 0,start:performance.now()};window.ttq._pf_tn="identify_encryption"}}catch(e){}if(e){var i=this.identifyParamsFormattedInfo(e),o=this.identifyParamsFormattedInfoV2(e),a=Aa.genIdentifierLabelByUserProperties(t);this.handlePIIDiagnostics(o),Object.entries(e).forEach((function(t){var r=_(t,2),i=r[0],a=r[1],c=void 0===a?"":a;if(c){var s=String(c);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(i)){var u=n.getUserDataFormatInfoV2KeyName(i),l=Ca.tryDecodeHashedBase64Hex(s);if(null!==l)e[i]=l,null!==u&&(o=n.updateUserDataFormatV2Label(u,Vn.BASE64_HEX_HASHED,o));else{var f=Ca.tryDecodeHashedBase64String(s);f&&(e[i]=f,null!==u&&(o=n.updateUserDataFormatV2Label(u,Vn.BASE64_STRING_HASHED,o)))}}switch("zip_code"===i&&s&&(Aa.isHash(s)?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(s,5)),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_US,o)):(e.zip_code=n.sha256(s),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_NOT_US,o)))),i){case"email":e.email=Aa.isHash(s)&&!n.checkEmailFormat(s)?s:n.sha256(n.handleEmail(s));break;case"phone_number":e.phone_number=Aa.isHash(s)?s:n.sha256(n.handlePhoneNumber(s));break;case"auto_email":e.auto_email=n.sha256(n.handleEmail(s));break;case"auto_phone_number":e.auto_phone_number=n.sha256(n.handlePhoneNumber(s));break;case"first_name":e.first_name=Aa.isHash(s)?s:n.sha256(s);break;case"last_name":e.last_name=Aa.isHash(s)?s:n.sha256(s);break;case"city":e.city=n.truncateString(s,80);break;case"state":e.state=n.truncateString(s,80);break;case"country":e.country=n.truncateString(s,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),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=_(e,2),o=i[0],a=i[1],c=String(void 0===a?"":a),s=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(s||{}).input:var u=null==s?void 0:s.pop();u&&Ur.includes(u)&&(n[u]=[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=_(e,2),i=r[0],o=r[1],a=String(void 0===o?"":o);switch(i){case"email":t.handlePixelValidation(a,Fr,n);break;case"phone_number":t.handlePixelValidation(a,Br,n);break;case"sha256_email":t.handlePixelValidation(a,Hr,n);break;case"sha256_phone_number":t.handlePixelValidation(a,Gr,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 Ma(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||[],Aa.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||[],Aa.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]=[],La.includes(e)&&n[t].push(Vn.FILTER_EVENTS),e&&Aa.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(Aa.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?Aa.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}(So),xa=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},ja=function(e,t){return function(n,r){t(n,r,e)}},Ua=function(t){s(u,t);var n,o,c=p(u);function u(e,t){var n;return i(this,u),(n=c.call(this,{name:"Identify",reporters:t,context:e})).init(),n}return a(u,[{key:"init",value:function(){var e=this;return this.pluginPromise||(ji(Nr.IDENTIFY_INIT_START),this.pluginPromise=eo("https://analytics.tiktok.com/i18n/pixel/static/identify_7bf75739.js").then((function(){e.detectTopics(),ji(Nr.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,s=void 0===c?[]:c;if(n.includes(Vn.UNKNOWN_INVALID)||i.includes(Vn.UNKNOWN_INVALID))return void Fi(Rr.INVALID_EMAIL_FORMAT);if(a.includes(Vn.UNKNOWN_INVALID)||s.includes(Vn.UNKNOWN_INVALID))return void Fi(Rr.INVALID_PHONE_NUMBER_FORMAT);if(n.includes(Vn.FILTER_EVENTS)||i.includes(Vn.FILTER_EVENTS))return void Fi(Rr.INVALID_EMAIL_INFORMATION);if(a.includes(Vn.FILTER_EVENTS)||s.includes(Vn.FILTER_EVENTS))return void Fi(Rr.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)&&ji(Nr.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)})}]),u}(Da);function Fa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=Date.now();return function(){var r=Array.prototype.slice.call(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,y(r)),n=i)}}Ua=xa([R.injectable(),ja(0,R.inject(wr.CONTEXT)),ja(1,R.inject(wr.TTQ_REPORTERS))],Ua);var Ba={fcp:"first_contentful_paint",lcp:"largest_contentful_paint",cls:"cumulative_layout_shift",fid:"first_input_delay",tti:"time_to_interactive",navigationStart:"navigation_start",loadEventStart:"load_event_start",requestStart:"request_start",enterTime:"enter_time",leaveTime:"leave_time",docHeight:"doc_height",maxScrollHeight:"max_scroll_height",clickTimes:"click_times",scrollTimes:"scroll_times",connectionType:"connection_type"};function Ha(){var e=document.body,t=document.documentElement;return Math.max(e?e.scrollHeight:0,e?e.offsetHeight:0,t?t.clientHeight:0,t?t.scrollHeight:0,t?t.offsetHeight:0)}function Ga(){return document.documentElement.clientHeight+window.pageYOffset}var Va=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},qa=function(){function e(){i(this,e),this.connectionType="",this._docHeight=0,this._maxScrollHeight=0,this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.enterTime=0,this.leaveTime=0,this.isFirstReport=!0}return a(e,[{key:"init",value:function(){var e,t;e=this.updateClickTimes.bind(this),t=Fa((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=Fa((function(){var t={scrollHeight:Ga(),docHeight:Ha()};e(t)}),500);window.addEventListener("scroll",t,{passive:!0})}(this.updateScrollData.bind(this))}},{key:"pageUrlWillChange",value:function(e,t){""!==e?this.leaveTime=Date.now():this.enterTime=window.performance.timing.navigationStart}},{key:"pageUrlDidChange",value:function(e){0!==this.enterTime&&(this.resetAfterPageChange(),this.initInteractionData(),this.enterTime=Date.now())}},{key:"pageWillLeave",value:function(e){this.leaveTime=e}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollData",value:function(e){var t=e.scrollHeight,n=e.docHeight;this.scrollTimes+=1,this.maxScrollHeight=t,this.docHeight=n}},{key:"initInteractionData",value:function(){var e,t={docHeight:Ha(),scrollHeight:Ga(),connectionType:(e=navigator.connection,e&&e.effectiveType?e.effectiveType:"")},n=t.docHeight,r=t.scrollHeight,i=t.connectionType;this.docHeight=n,this.maxScrollHeight=r,this.connectionType=i}},{key:"resetAfterPageChange",value:function(){this.clearAfterReport(),this.maxScrollHeight=0,this.docHeight=0,this.leaveTime=0,this.isFirstReport=!0,this.connectionType=""}},{key:"clearAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.isFirstReport=!1}},{key:"getResult",value:function(){var e={};return this.scrollTimes&&(e.scrollTimes=this.scrollTimes),this.clickTimes&&(e.clickTimes=this.clickTimes),this.leaveTime&&(e.leaveTime=this.leaveTime),this.isDocHeightChanged&&(e.docHeight=this.docHeight),this.isMaxScrollHeightChanged&&(e.maxScrollHeight=this.maxScrollHeight),this.isFirstReport&&(e.connectionType=this.connectionType,e.enterTime=this.enterTime),this.clearAfterReport(),e}},{key:"isChanged",value:function(){return this.isDocHeightChanged||this.isMaxScrollHeightChanged||0!==this.scrollTimes||0!==this.clickTimes||0!==this.leaveTime}},{key:"docHeight",get:function(){return this._docHeight},set:function(e){e>this._docHeight?(this._docHeight=e,this.isDocHeightChanged=!0):0===e&&(this._docHeight=0,this.isDocHeightChanged=!1)}},{key:"maxScrollHeight",get:function(){return this._maxScrollHeight},set:function(e){e>this._maxScrollHeight?(this._maxScrollHeight=e,this.isMaxScrollHeightChanged=!0):0===e&&(this._maxScrollHeight=0,this.isMaxScrollHeightChanged=!1)}}]),e}();qa=Va([R.injectable()],qa);var Ja,Wa=function(e,t){try{var n=null==t?void 0:t.type;if(n&&PerformanceObserver.supportedEntryTypes.indexOf(n)>-1){var r=new PerformanceObserver((function(t){t.getEntries().forEach(e)}));return r.observe(t),r}}catch(e){}},Ka=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];document.addEventListener("visibilitychange",(function(t){"hidden"===document.visibilityState&&e(t)}),{once:t})},Ya=function(){return void 0===Ja&&(Ja="hidden"===document.visibilityState?0:1/0,Ka((function(e){Ja=Math.min(Ja,e.timeStamp)}))),{get timeStamp(){return Ja}}},Xa="first-contentful-paint";function Qa(e){if(!(window&&window.performance&&(null===(t=window.performance)||void 0===t?void 0:t.getEntries)))return-1;var t,n=performance.getEntriesByType("paint");if(Array.isArray(n)){var r=n.filter((function(t){return t.name===e}));return r.length&&r[0]&&r[0].startTime&&r[0].startTime||-1}return-1}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 s=e.length-1;s>=0;s--)(o=e[s])&&(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=["fcp","lcp","cls","fid","tti","navigationStart","loadEventStart","requestStart"],$a=function(){function e(){i(this,e),this.fcp=-1,this.lcp=-1,this.cls=-1,this.fid=-1,this.tti=-1,this.navigationStart=-1,this.loadEventStart=-1,this.requestStart=-1,this.everythingDone=!1,this.changedMap={},this.init()}return a(e,[{key:"init",value:function(){var e,t,n,r;this.updatePerformanceTiming(),e=this.baseHandler.bind(this,"cls"),t=0,r=Wa(n=function(e){e.hadRecentInput||(t+=e.value)},{type:"layout-shift",buffered:!0}),Ka((function(){r&&(r.takeRecords().forEach(n),r.disconnect()),e(t)})),function(e){var t=Qa(Xa);if(-1===t){var n=Ya();Wa((function(t){if(t.name===Xa){if(t.startTime=0;s--)(o=e[s])&&(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){s(n,e);var t=p(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,{name:"PerformanceInteraction",reporters:o,context:r})).monitors=[],s.currentUrl="",s.ttqOptions={},s.env=e,s.reportService=a,s.ttqOptions=c,s.init(),s}return a(n,[{key:"reportSwitch",value:function(){var e,t,n=Ji(xr),r="";try{var i=window.sessionStorage&&window.sessionStorage.getItem(cr);if(i)r=JSON.parse(i).callback}catch(e){}return!!(n||r||Oi(this.env)||(null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PerformanceInteraction))}},{key:"init",value:function(){var e=this;this.reportSwitch()&&(this.interactionMonitor=new qa,this.performanceMonitor=new $a,this.monitors.push(this.interactionMonitor),this.monitors.push(this.performanceMonitor),this.monitors.forEach((function(e){e.init()})),setInterval((function(){e.report()}),1e4))}},{key:"pageUrlWillChange",value:function(e,t){this.reportSwitch()&&(this.monitors.forEach((function(n){n.pageUrlWillChange(e,t)})),e&&this.report())}},{key:"pageWillLeave",value:function(e){this.reportSwitch()&&(this.monitors.forEach((function(t){t.pageWillLeave(e)})),this.report())}},{key:"pageUrlDidChange",value:function(e){this.currentUrl!==e&&this.reportSwitch()&&(this.currentUrl=e,this.monitors.forEach((function(t){t.pageUrlDidChange(e)})),this.report())}},{key:"report",value:function(){var e=this;if(this.reportSwitch()){var t=this.transformReportData(this.collectorData());if(Object.keys(t).length){var n=Ir.PERFORMANCE_INTERACTION,r=Hi(n);null!==r&&to(this.reportService.reportPreposition||[]).then((function(){e.reportService.report(r,e.assemblyMergedData(t,n),function(e){return{performance_interaction:Bn.httpReport}[e]||Bn.htmlHttpReport}(n))}))}}}},{key:"assemblyMergedData",value:function(e,t){var n,r=this.context.getPageSign(),i=this.reporters[0],o=(null==i?void 0:i.getReporterId())||"",a=this.reporters.map((function(e){return e.getReporterId()})).join("|"),c=null==i?void 0:i.assemblyData(o,"",e,{},t);return c&&(c.context.pixel&&(c.context.pixel.codes=a),c.context.index=null===(n=r.pageIndex)||void 0===n?void 0:n.index,c.context.session_id=r.sessionId),c||{}}},{key:"collectorData",value:function(){return this.monitors.reduce((function(e,t){return t.isChanged()&&(e=Object.assign({},e,t.getResult())),e}),{})}},{key:"transformReportData",value:function(e){return Object.entries(e).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return e[Ba[r]]=i,e}),{})}}]),n}(So);nc=ec([R.injectable(),tc(0,R.inject(wr.ENV)),tc(1,R.inject(wr.CONTEXT)),tc(2,R.inject(wr.TTQ_REPORTERS)),tc(3,R.inject(wr.REPORT_SERVICE)),tc(4,R.inject(wr.TTQ_GLOBAL_OPTIONS))],nc);var rc,ic=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},oc=function(e,t){return function(n,r){t(n,r,e)}},ac=function(e){s(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)},s=o.value,u=o.currency,l=function(e,t,n){return isNaN(e)||e<0||null===n||!n[t]?"":(e/n[t]*1e5).toFixed(0)}(s,u,this.useExchangeRate||null),f=r.pixel?r.pixel.code:"";l&&(c.usd_value=l,ji(Nr.CUSTOM_INFO,{pixelCode:f,custom_name:"odfl_rate_exchange",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event,value:s,currency:u,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),ji(Nr.CUSTOM_INFO,{pixelCode:f,custom_name:"fl_jsb_report",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event}}))}}}]),n}(So);ac=ic([R.injectable(),oc(0,R.inject(wr.CONTEXT)),oc(1,R.inject(wr.TTQ_REPORTERS)),oc(2,R.inject(wr.REPORT_SERVICE)),oc(3,R.inject(wr.TTQ_GLOBAL_OPTIONS))],ac),function(e){e.ERROR_FORMAT="error_format",e.OVER_LENGTH="over_length_3e4",e.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields"}(rc||(rc={}));var cc,sc,uc,lc,fc,dc="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"}(cc||(cc={})),function(e){e.METADATA="Metadata",e.CLICK="Click"}(sc||(sc={})),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"}(uc||(uc={})),function(e){e.AUTO_FORM="form_rules",e.AUTO_VC="vc_rules",e.AUTO_VC_REVERSE="vc_rules_reverse"}(lc||(lc={})),function(e){e.PAGE_LEAVE="PageLeave",e.PAGE_VIEW="PageView",e.DOM_CHANGE="DomChange",e.URL_CHANGE="UrlChange",e.CLICK="Click",e.SCROLL="Scroll"}(fc||(fc={}));var pc=["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"],hc=2e3;function vc(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)||pc.some((function(t){return e.toLowerCase().indexOf(t.toLowerCase())>-1}))}var _c=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 gc(e){return _c(e)}function yc(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 Nc(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?Tc(t):""}function Rc(e,n){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Rc(e,n)}));var r={};for(var i in e)Ac(i,n)||(r[i]=Rc(e[i],n));return r}return e}function Ac(e,t){return!!(t&&t.length>0)&&t.some((function(t){return e.toLowerCase()===t.toLowerCase()}))}function Pc(e){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Pc(e)}));var n=Object.assign({},e),r=n["@type"];for(var i in n)"@type"!==i&&"@context"!==i&&("object"===t(n[i])?n[i]=Pc(n[i]):r&&Cc(r)&&delete n[i]);return n}return e}function Cc(e){return Array.isArray(e)?e.some((function(e){return Cc(e)})):"string"==typeof e&&(e=e.toLowerCase().replace(/https?:\/\/schema\.org\//,""),pc.some((function(t){return e===t.toLowerCase()})))}function kc(e){var t={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{t.microdata=function(){for(var e=document.querySelectorAll("[itemscope]"),t=[],n=wc(),r=0;r=0;i--){var o=e[i],a=o.getAttribute("itemtype");if("string"==typeof a&&""!==a){for(var c={},s=o.querySelectorAll("[itemprop]"),u=0;u=0;E--){if(h[E].scope.contains(y)){h[E].schema.subscopes.push(m);break}h.pop()}0===h.length&&v.push(m),h.push({schema:m,scope:y})}return JSON.stringify(v)}()}catch(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"microdata"})}try{var n=function(){for(var e=[],t=[],n=document.querySelectorAll('script[type="application/ld+json"]'),r=0,i=0;i3e4)return{data:JSON.stringify([]),errors:[{name:rc.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:rc.ERROR_FORMAT,message:e.message})}try{a=Pc(a)}catch(e){return{data:JSON.stringify([]),errors:[{name:rc.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;Ui(Nr.CUSTOM_ERROR,{message:n},{custom_name:"parse_json_ld_failed",custom_enum:t})}))}catch(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{t.open_graph=function(e){for(var t=wc(["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 Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.GET_ELEMENTS_ERROR}),[]}}function Bc(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 Hc(e){if(!e)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&("visible"===t.visibility&&(!Gc(e)&&(0!==e.offsetWidth||0!==e.offsetHeight)))}function Gc(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||Gc(e.parentElement))}function Vc(e){var t=e.getAttribute("type");return!!t&&Uc.indexOf(t)>-1}function qc(e){return e&&vc(e)?"__Text__":e}!function(e){e[e.CONTAIN=0]="CONTAIN",e[e.ID=1]="ID",e[e.SELECTOR=2]="SELECTOR"}(Mc||(Mc={}));var Jc=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[lc.AUTO_FORM]}},{key:"init",value:function(){var e=this;try{this.forms=this.detectFormElement(),this.forms&&this.forms.forEach((function(t){t.formDetail=e.assembleFormDetail(t),e.startFormObserver(t,e.formUpdateHandlers)}))}catch(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.INIT_ERROR})}}},{key:"getOverallFormDetail",value:function(){try{return this.forms&&this.forms.length>0?(this.forms.some((function(e){var t=e.el;return!document.body.contains(t)}))&&this.init(),JSON.stringify(this.forms.map((function(e){return e.formDetail})).filter((function(e){return e})))):"[]"}catch(e){return Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.GET_OVERALL_FORM_DETAIL_ERROR}),"[]"}}},{key:"addFormUpdateHandler",value:function(e){this.formUpdateHandlers.push(e)}},{key:"startFormObserver",value:function(e,t){var n=this;try{var r=ui((function(){var r=n.assembleFormDetail(e);(!e.formDetail||r&&_i(r,e.formDetail))&&(e.formDetail=r,t.forEach((function(t){return t.call(n,e.formDetail)})))}),hc,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){Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.FORM_OBSERVER_ERROR})}}},{key:"detectFormElement",value:function(){try{var e=[0,0,0],t=function(e){return(t=Fc(e||Lc,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 Fc(Dc,e)}(t.el),i=new Set([]);r.forEach((function(n){var r=function(e,t){var n=Fc(xc,e);if(n&&n.length)return{els:n,from:Mc.CONTAIN};var r=e.getAttribute("for");return!(!r||(n=function(e,t){return Fc(["input[id='".concat(e,"'],select[id='").concat(e,"'],textarea[id='").concat(e,"']")],t)}(r,t),!n))&&{els:n,from:Mc.ID}}(n,t.el);if(r){var o=r.els,a=r.from,c=o.filter((function(e){return!Vc(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,Fc(xc,n)).filter((function(e){return!Vc(e)})).forEach((function(n){if(!i.has(n)){e[Mc.SELECTOR]=1;var r=function(e,t){return function e(n){return null==n||n.isSameNode(t)?t:Bc(n).length>0?n:e(n.parentNode)}(e.parentNode)}(n,t.el);t.questions.push({el:r,answers:[{el:n,from:Mc.SELECTOR}]})}}))})),ji(Nr.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:e.join("")}),n}catch(e){return Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.DETECT_FORM_ELEMENT_ERROR}),[]}}},{key:"calculateQuestionFilledTime",value:function(e){var t=e.el,n=e.answers,r=gc(t),i=n.reduce((function(e,t){var n=t.el,r=n.getAttribute("type");return r&&jc.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:gc(n),id:n.id,name:qc(n.getAttribute("name")),tag:n.tagName.toLowerCase(),class_name:n.className,questions:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Hc(n)};return i.questions=r.map((function(e){var n=e.el,r=e.answers,i={xpath:gc(n),id:n.id,name:qc(Bc(n)),tag:n.tagName.toLowerCase(),class_name:n.className,filled_time:t.calculateQuestionFilledTime(e),answers:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Hc(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:gc(e),id:e.id,name:qc(e.value||e.innerText),tag:e.tagName.toLowerCase(),class_name:e.className,from:n,width:e.offsetWidth,height:e.offsetHeight,is_visible:Hc(t)}}))):i.answers.push({xpath:gc(t),id:t.id,name:qc(t.getAttribute("name")),tag:t.tagName.toLowerCase(),class_name:t.className,input_type:t.getAttribute("type"),placeholder:qc(t.getAttribute("placeholder")),from:n,width:t.offsetWidth,height:t.offsetHeight,is_visible:Hc(t)})})),i})),i}catch(e){return void Ui(Nr.CUSTOM_ERROR,e,{custom_name:dc,custom_enum:cc.ASSEMBLE_FORM_DETAIL_ERROR})}}}]),e}(),Wc=["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()})),Kc=["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"],Yc=function(e){try{var t=e.plugins&&e.plugins.AutoConfig;return t&&t.vc_rules}catch(e){return}},Xc=function(e,t){var n,r;try{var i=e.getPageInfo();if(i.url.includes("checkout")){var o=Object.values(t)[0];for(var a in t)i.url.includes(a)&&(o=t[a]);if(o){var c,s=O(o);try{for(s.s();!(c=s.n()).done;){var u=c.value,l=u.currency.val,f=Qc(u.valueXpath,u.valueClass),d=null==f?void 0:f.textContent;if(d){var p=zc(d);if(p){var h=void 0,v=void 0,_=void 0;if(u.currency.xpath){var g=null===(n=document.evaluate(u.currency.xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===n?void 0:n.textContent;g&&ji(Nr.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:i.url,currencyCode:g,vcConfig:t}}),g&&Kc.includes(g.toUpperCase().trim())&&(v=g.toUpperCase().trim())}if(u.countryCodeXpath){var y=null===(r=document.evaluate(u.countryCodeXpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===r?void 0:r.textContent;y&&ji(Nr.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:i.url,country:y,vcConfig:t}}),y&&Wc.includes(y.toUpperCase().trim())&&(h=y.toUpperCase().trim())}try{var m=new URL(null==i?void 0:i.url).hostname.split(".");for(var E in m)Wc.includes(m[E].toUpperCase())&&(_=m[E].toUpperCase())}catch(e){}var b={vc_properties:{value:p,currency:v||l,ori_value:d,rule_key:u.rule_key,country_code:h||_}};return ji(Nr.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:i.url,autoProperties:b,vcConfig:t}}),Zc(es,b),b}}}}catch(e){s.e(e)}finally{s.f()}}return null}return null}catch(e){return Ui(Nr.CUSTOM_ERROR,e,{custom_name:"auto_value_currency_update_error",custom_enum:"auto_value_currency",extJSON:{error:e}}),null}};function Qc(e,t){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=t.length-3&&(i=!0),i&&(n=n.slice(0,r-(t.length-1))+"."+n.slice(r-(t.length-1))),n}return null}var Zc=function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}},$c=function(e){try{var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},es="value_currency_rule",ts=[fc.CLICK,fc.SCROLL],ns=function(){function e(t){var n=this;i(this,e),this.handlerArray=t,ts.forEach((function(e){window.addEventListener(e.toLowerCase(),ui((function(){n.interactionHandler(e)}),hc,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)}),hc)}}]),e}(),rs=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}(),is=function(){function e(t,n,r){i(this,e),this.context=t,this.reportHistory=new rs,this.reporters=n,this.reportService=r}return a(e,[{key:"report",value:function(e,t,n){var r=this,i=Hi(Ir.AUTO_CONFIG),o=this.getReportPixelList(t,n),a=this.assemblyReportData(e,n,o);a&&i&&to(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!!mc(t)&&Ec(t,e)})).filter((function(t){var i=t.getReporterId();return!([uc.AUTO_COLLECTION,uc.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(),"",{},{},Ir.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=rr(this.context.getPageViewId(),a.reporterInfo.loadId,vr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),os=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},as=function(e,t){return function(n,r){t(n,r,e)}},cs="AutoConfig",ss=function(e){s(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:cs,reporters:r,context:e})).autoCollectedMetadata={},c.initialize=!1,c.autoFormUpdateHandler=ui((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={taskName:"auto_config_form_handler",functionName:void 0,start:performance.now()};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 Ui(Nr.CUSTOM_ERROR,{message:"".concat(String(c.autoCollectedFormDetail.length))},{custom_name:dc,custom_enum:cc.OVER_LENGTH});c.actTracker.report(sc.METADATA,uc.AUTO_FORM,{page_trigger:e,form_details:c.autoCollectedFormDetail})}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),window.ttq._pf_tn="")}catch(e){}}),200,f(c)),c.autoCollectionUpdateHandler=ui((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={taskName:"auto_config_metadata_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="auto_config_metadata_handler"}}catch(e){}c.autoCollectedMetadata=kc(c.filter),c.actTracker.report(sc.METADATA,uc.AUTO_COLLECTION,{page_trigger:e,content_data:c.autoCollectedMetadata});try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),window.ttq._pf_tn="")}catch(e){}}),200,f(c)),c.autoClickCallback=function(e){try{c.signal_insights_config&&Xc(c.context,c.signal_insights_config);var t=function(e){var t=e,n=e.parentNode,r=0,i=!1;try{i=hi(t)}catch(e){Ui(Nr.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=hi(n)}catch(e){Ui(Nr.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,s=e.rect,u=e.xpath,l=e.inner_text,f=e.image_url,d={tag:t,attributes:{},inner_text:l,xpath:u,num_child_buttons:e.num_child_buttons,timestamp:(new Date).toISOString(),position:s?{x:s.x,y:s.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,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=e.attributes,l={type:"",value:"",name:"",class:"",dataset:"",id:"",tag:"",destination:"",xpath:"",inner_text:"",image_url:"",num_child_buttons:0},f=0;f-1},we.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 Se,map:new(pe||we),string:new Se}},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 we},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 we){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=ue?J(ue,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==s}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return Je(e)?Ae(e):function(e){if(!He(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)}}(us,us.exports);var ls=us.exports,fs={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:""}},ds=/^[a-zA-Z\d]([a-zA-Z_\-\d ]{0,}[a-zA-Z_\-\d])?$/,ps=["product","product_group"],hs=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],vs=["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"],_s=["CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],gs=function(e){return void 0===e},ys="CompletePayment",ms=function(e){var t=e.event,n=void 0===t?"":t;return!!["null","undefined"].includes(n)||(!!/^\s*$/.test(n)||!n)},Es=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},bs=function(e,t){return function(n,r){t(n,r,e)}},Is=function(e){s(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(Rr[e]){var n=Jr(),r=fs[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){Ui(Nr.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:e})}}},{key:"pixelDidMount",value:function(e){var t=this;e.getParameterInfo().then((function(e){t.handlePixelInfoValidate(e)})).catch((function(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"pixel"})}))}},{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!==Ir.TRACK||t===Or||this.handleEventPayloadValidate(ls(n||{}))}catch(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"track"})}}},{key:"handlePixelInfoValidate",value:function(e){if(e.status===Po.Live);else this.warn(Rr.INVALID_PIXEL_CODE)}},{key:"handleEventPayloadValidate",value:function(e){e.properties||(e.properties={}),ms(e)&&this.warn(Rr.EMPTY_EVENT_TYPE_NAME),function(e){var t=e.event,n=void 0===t?"":t;return!!ms(e)||ds.test(n)}(e)||this.warn(Rr.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),function(e){var t=e.event;return(void 0===t?"":t).length<=50}(e)||this.warn(Rr.LONG_EVENT_TYPE_NAME),function(e){var t=e.event,n=e._inspection;if(t===ys){var r=(void 0===n?{}:n).identity_params,i=void 0===r?{}:r;return 0===Object.keys(i).length||hs.every((function(e){return(i[e]||[]).includes(Vn.EMPTY_VALUE)}))}return!1}(e)&&this.warn(Rr.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(Rr.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(Rr.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(Rr.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(Rr.INVALID_PHONE_NUMBER_FORMAT),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;if(_s.includes(n)){if(gs(i.contents)&&gs(i.content_id))return!0;if(!gs(i.contents))return!Array.isArray(i.contents)||i.contents.length<1||!i.contents.every((function(e){return e&&!gs(e.content_id)}))}return!1}(e)&&this.warn(Rr.MISSING_CONTENT_ID),function(e){var t=e.properties,n=void 0===t?{}:t,r=n.content_id,i=n.contents;return!(!gs(r)&&/^\s*$/.test(r))&&(!(!gs(i)&&Array.isArray(i))||i.every((function(e){return e&&!gs(e.content_id)&&!/^\s*$/.test(e.content_id)})))}(e)||this.warn(Rr.INVALID_CONTENT_ID),function(e){var t=e.properties.content_type;return!t||ps.includes(t)}(e)||this.warn(Rr.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(Rr.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!==ys||!gs(i.value))||!(gs(i.currency)||!gs(i.value))}(e)&&this.warn(Rr.MISSING_VALUE_PARAMETER),function(e){var t=e.properties.currency;return!t||vs.includes(t)}(e)||this.warn(Rr.INVALID_CURRENCY_CODE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==ys||!gs(i.currency))||!(gs(i.value)||!gs(i.currency))}(e)&&this.warn(Rr.MISSING_CURRENCY_PARAMETER,{learn_more:""})}}]),n}(So);Is=Es([R.injectable(),bs(0,R.inject(wr.CONTEXT)),bs(1,R.inject(wr.TTQ_REPORTERS)),bs(2,R.inject(wr.TTQ_GLOBAL_OPTIONS))],Is);var Ts=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Os=function(e,t){return function(n,r){t(n,r,e)}},Ss=function(e){s(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()&&eo("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)&&!Ti(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){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"pangle_report"})}}}]),n}(So);Ss=Ts([R.injectable(),Os(0,R.inject(wr.CONTEXT)),Os(1,R.inject(wr.TTQ_REPORTERS)),Os(2,R.inject(wr.REPORT_SERVICE)),Os(3,R.inject(wr.ENV))],Ss);var ws,Ns="https://analytics.tiktok.com/i18n/pixel/eb.js",Rs="_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"}(ws||(ws={}));var As=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Ps=function(e,t){return function(n,r){t(n,r,e)}},Cs=function(e){s(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;if(!this.pluginMounted){this.pluginMounted=!0;var n=Kr(),r=function(e){e.data.type!==ws.EVENT_BUILD_BOOTSTRAP||n._event_builder_pickup_sdk_loaded||(t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))?(n._event_builder_pickup_sdk_loaded=!0,Vi(Rs,e.data),eo(Ns).then((function(){window.opener.window.postMessage({type:ws.EVENT_BUILD_BOOTSTRAP_ACK},"*")})).catch((function(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"event_builder_load_error",custom_enum:"load_ebjs"})}))):n._event_builder_pickup_sdk_verify_flag||(setTimeout((function(){t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))||window.opener.window.postMessage({type:ws.EVENT_BUILD_WRONG_CODE},"*")}),5e3),n._event_builder_pickup_sdk_verify_flag=!0))};n._event_builder_pickup_sdk_loaded||(Gi(Rs)?eo(Ns).then((function(){n._event_builder_pickup_sdk_loaded=!0})):window.opener&&(window.addEventListener("message",r),setTimeout((function(){window.removeEventListener("message",r)}),8e3)))}}}]),n}(So);Cs=As([R.injectable(),Ps(0,R.inject(wr.CONTEXT)),Ps(1,R.inject(wr.TTQ_REPORTERS))],Cs);var ks="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",Ms=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Ls=function(e,t){return function(n,r){t(n,r,e)}},Ds="tt_pixel_is_enrich_ipv6_triggered_by_enrich_am",xs=function(e){s(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=Kr()._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!==Ir.TRACK)return;if("Shopify"!==zr(e)&&!this.isEnrichIpv6V2SwitchOn())return;if(Ti(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(ks,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport));var a="true"===sessionStorage.getItem(Ds);if(a)return;"EnrichAM"===t&&(this.shouldReportAfterEnrichAM=!0),this.shouldReportAfterEnrichAM&&this.isPixelEnrichIpv6()&&(this.shouldReportAfterEnrichAM=!1,sessionStorage.setItem(Ds,"true"),this.reportService.report(ks,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport))}catch(e){Ui(Nr.CUSTOM_ERROR,e,{custom_name:"enrich_ipv6_report"})}}}]),n}(So);function js(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}}xs=Ms([R.injectable(),Ls(0,R.inject(wr.CONTEXT)),Ls(1,R.inject(wr.TTQ_REPORTERS)),Ls(2,R.inject(wr.REPORT_SERVICE)),Ls(3,R.inject(wr.ENV))],xs);var Fs;!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"}(Fs||(Fs={}));var Bs,Hs,Gs,Vs,qs=function(){function e(t,n,r){i(this,e),this.reportService=r,this.context=t,this.reporters=n}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=Hi(Ir.AUTO_CONFIG);if(void 0!==n){var r=this.getReportPixelList(),i=this.assemblyReportData(Ir.PAGE,e,r);i&&n&&to(this.reportService.reportPreposition||[]).then((function(){t.reportService.report(n,i,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(),"",{},{},Ir.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=rr(this.context.getPageViewId(),a.reporterInfo.loadId,vr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),Js=function(e){s(n,e);var t=p(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).clickTimes=0,a.scrollTimes=0,a.init(),a}return a(n,[{key:"init",value:function(){var e,t,n=this;e=js(this.updateClickTimes,this),t=or((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=or((function(){e()}),500);window.addEventListener("scroll",t,{passive:!0})}(js(this.updateScrollTimes,this)),setInterval((function(){n.reportInteraction()}),1e4)}},{key:"reportInteraction",value:function(){this.isUpdated()&&(this.report(this.getResult(Fs.TIME_WINDOW_TRACKER)),this.resetAfterReport())}},{key:"getResult",value:function(e){return{action_event:e,inter:{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}(qs),Ws=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(Fs.LOAD_FINISH,t)})).catch((function(t){e(Fs.LOAD_FINISH,-1)}))};"complete"===window.document.readyState?t():window.addEventListener("load",t)},Ks=-1,Ys=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Ks=t.timeStamp,e(t))}),!0)},Xs=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Qs=function(){var e=Xs();return e&&e.activationStart||0},zs=function(e,t){var n=Xs(),r="navigate";return Ks>=0?r="back-forward-cache":n&&(document.prerendering||Qs()>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}},Zs=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){}},$s=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))}},eu=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},tu=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},nu=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},ru=-1,iu=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},ou=function(e){"hidden"===document.visibilityState&&ru>-1&&(ru="visibilitychange"===e.type?e.timeStamp:0,cu())},au=function(){addEventListener("visibilitychange",ou,!0),addEventListener("prerenderingchange",ou,!0)},cu=function(){removeEventListener("visibilitychange",ou,!0),removeEventListener("prerenderingchange",ou,!0)},su=function(){return ru<0&&(ru=iu(),au(),Ys((function(){setTimeout((function(){ru=iu(),au()}),0)}))),{get firstHiddenTime(){return ru}}},uu=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},lu=[1800,3e3],fu=function(e,t){t=t||{},uu((function(){var n,r=su(),i=zs("FCP"),o=Zs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&Hs1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){vu(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,pu),removeEventListener("pointercancel",r,pu)};addEventListener("pointerup",n,pu),addEventListener("pointercancel",r,pu)}(t,e):vu(t,e)}},yu=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,gu,pu)}))},mu=[100,300],Eu=[2500,4e3],bu={},Iu=[800,1800],Tu=function e(t){document.prerendering?uu((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Ou=function(e,t){t=t||{};var n=zs("TTFB"),r=$s(e,n,Iu,t.reportAllChanges);Tu((function(){var i=Xs();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Qs(),0),n.entries=[i],r(!0),Ys((function(){n=zs("TTFB",0),(r=$s(e,n,Iu,t.reportAllChanges))(!0)}))}}))},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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},wu=function(e,t){return function(n,r){t(n,r,e)}},Nu=function(e){s(n,e);var t=p(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).cls=-1,a.init(),a}return a(n,[{key:"init",value:function(){var e;!function(e,t){t=t||{},fu(nu((function(){var n,r=zs("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=Zs("layout-shift",a);c&&(n=$s(e,r,du,t.reportAllChanges),tu((function(){a(c.takeRecords()),n(!0)})),Ys((function(){i=0,r=zs("CLS",0),n=$s(e,r,du,t.reportAllChanges),eu((function(){return n()}))})),setTimeout(n,0))})))}(this.clsHandler.bind(this),{reportAllChanges:!0}),Ou(this.webVitalHandler.bind(this)),fu(this.webVitalHandler.bind(this)),function(e,t){t=t||{},uu((function(){var n,r=su(),i=zs("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime=0;s--)(o=e[s])&&(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},Au=function(e,t){return function(n,r){t(n,r,e)}},Pu=function(e){s(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(){this.isPageDataEnabled()&&(this.interactionMonitor=new Js(this.context,this.reporters,this.reportService),this.performanceMonitor=new Nu(this.context,this.reporters,this.reportService),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:"report",value:function(e){var t=this.performanceMonitor,n=this.performanceMonitor.getResult(e),r=this.interactionMonitor.getResult(e),i=this.mergeReportData(e,r,n);t.report(i),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}},{key:"pageWillLeave",value:function(e){this.report(Fs.PAGE_LEAVE)}},{key:"pixelDidMount",value:function(e){this.isPluginInit||(this.init(),this.isPluginInit=!0)}}]),n}(So);Pu=Ru([R.injectable(),Au(0,R.inject(wr.CONTEXT)),Au(1,R.inject(wr.TTQ_REPORTERS)),Au(2,R.inject(wr.REPORT_SERVICE)),Au(3,R.inject(wr.TTQ_GLOBAL_OPTIONS))],Pu);var Cu={initAllModule:1,webTtqFactory:2,handleCache:3,webReporterFactory:4,initAutoForm:5},ku={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:[Cu.initAllModule,Cu.webTtqFactory,Cu.handleCache,Cu.webReporterFactory,Cu.initAutoForm]},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:[]}},Mu=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 s=this.getFunctionIdFromName(n);s&&(c.f=[].concat(y(c.f||[]),[{id:s,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=ku[e])||void 0===t?void 0:t.id}},{key:"getFunctionIdFromName",value:function(e){return Cu[e]}}]),e}(),Lu=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Du=function(e,t){return function(n,r){t(n,r,e)}},xu=function(e){s(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 Mu;var e=Kr();e&&e._ppf&&(this.performanceDataQueue.handleCache(e._ppf),e._ppf=this.performanceDataQueue),this.initialize=!0}}}]),n}(So);xu=Lu([R.injectable(),Du(0,R.inject(wr.CONTEXT)),Du(1,R.inject(wr.TTQ_REPORTERS))],xu);var ju,Uu,Fu=[{identifier:wr.CALLBACK_PLUGIN,to:Ra,name:"Callback"},{identifier:wr.IDENTIFY_PLUGIN,to:Ua,name:"Identify",required:!0},{identifier:wr.WEB_FL_PLUGIN,to:ac,name:"WebFL"},{identifier:wr.PERFORMANCE_INTERACTION_PLUGIN,to:nc,required:!0,name:"PerformanceInteraction"},{identifier:wr.AUTO_CONFIG_PLUGIN,to:ss,name:"AutoConfig"},{identifier:wr.DIAGNOSTICS_CONSOLE_PLUGIN,to:Is,name:"DiagnosticsConsole"},{identifier:wr.PANGLE_COOKIE_MATCHING_PLUGIN,to:Ss,name:"PangleCookieMatching"},{identifier:wr.EVENT_BUILDER_PLUGIN,to:Cs,name:"EventBuilder"},{identifier:wr.ENRICH_IPV6_PLUGIN,to:xs,name:"EnrichIpv6"},{identifier:wr.PAGEDATA_PLUGIN,to:Pu,name:"PageData"},{identifier:wr.RUNTIME_MEASUREMENT_PLUGIN,to:xu,name:"RuntimeMeasurement"}],Bu=/^[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+(:?\.[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$/,Hu=function(e){return"function"==typeof Element?e instanceof Element:e&&"object"===t(e)&&e.nodeType===Node.ELEMENT_NODE&&"string"==typeof e.nodeName},Gu=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,"']"))},Vu=function(e){return e.trim().toLowerCase()},qu=function(e,t){return!(!e||!t)&&e.indexOf(t)>=0},Ju=function(e){return"string"==typeof e&&Bu.test(e)},Wu=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?qu(r,e)||qu(n,e)||qu(o,e)||qu(c,e):r===e||n===e||o===e||c===e})).length>0},Ku=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 s=e.length-1;s>=0;s--)(o=e[s])&&(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},Yu=function(e,t){return function(n,r){t(n,r,e)}},Xu=function(e){s(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:"auto_advanced_matching_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="auto_advanced_matching_handler"}}catch(t){}try{var r=Kr()||[],i=t&&t.target&&t.target instanceof Node&&Hu(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){ji(Nr.CUSTOM_ERROR,{pixelCode:Bi().pixelCode,custom_name:"advancedMatching"})}try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),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&&Gu(e,this.config.exclude_selectors||[]))return null;var t=Object.keys(this.config.selectors||{});if(Gu(e,t))return e;var n=e.parentNode;return n&&Hu(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)||("tel"===t||"tel"===n||Wu(Object.assign(o,{placeholder:i}),this.config.phone_selectors)),u=!this.phoneRegex||this.phoneRegex.test(r);return s&&u?{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){Gu(e,[t])&&r.push(n.config.selectors[t])})),0===r.length?"":"".concat(r.join(","),"-").concat(t?1:0)}catch(e){return""}}}]),r}(So);Xu=Ku([R.injectable(),Yu(0,R.inject(wr.CONTEXT)),Yu(1,R.inject(wr.TTQ_REPORTERS)),Yu(2,R.inject(wr.TTQ_GLOBAL_OPTIONS))],Xu);var Qu=function(e,t){ju=t,(Uu=e).isBound(wr.AUTO_ADVANCED_MATCHING_PLUGIN)||Uu.bind(wr.AUTO_ADVANCED_MATCHING_PLUGIN).to(Xu).inSingletonScope(),function(e,t){return!(!ju._mounted||ju.getPlugin(t)||!Uu.isBound(e))}(wr.AUTO_ADVANCED_MATCHING_PLUGIN,"AutoAdvancedMatching")&&ju.usePlugin(Uu.get(wr.AUTO_ADVANCED_MATCHING_PLUGIN))},zu=function(e,t){return zu=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])},zu(e,t)};function Zu(e,t){function n(){this.constructor=e}zu(e,t),e.prototype=null===t?Object._ttq_create(t):(n.prototype=t.prototype,new n)}var $u,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}(),nl="2.2.15",rl="undefined"!=typeof __PIA_WORKER__?new Function("return this")():"undefined"!=typeof window?window:{},il=void 0!==rl&&rl.navigator?rl.navigator.userAgent:"",ol=(!!il.match(/(newsarticle|videoarticle|lv|faceu|ulike|beauty_me_|faceu-os|ulike-os|beauty_me_oversea_|retouch)\/([\d.]+)/i)||/super|automobile/gi.test(il))&&!/webcast/gi.test(il)&&!/luckycatversion/gi.test(il),al=!!il.match(/(faceu)\/([\d.]+)/i)||/gsdk/gi.test(il)||/PIANativeWorker/gi.test(il),cl=!!il.match(/ttad\/0/i),sl=!!il.match(/aweme|trill|musical_ly|phoenix_\d+|TikTokNow_\d+/i),ul=!!il.match(/live_stream/i),ll=!!il.match(/Webcast/i),fl=!!il.match(/super/i),dl=!!il.match(/life_service_merchant/i),pl=/super/gi.test(il);function hl(){var e;if(ol)return rl.JSBridge&&rl.JSBridge.on?e=rl.JSBridge.on:rl.JS2NativeBridge&&rl.JS2NativeBridge.on?e=function(e){var t={JSSDK:nl,__msg_type:"event",__callback_id:e,func:e};rl.JS2NativeBridge.on(e,JSON.stringify(t))}:rl.webkit&&rl.webkit.messageHandlers&&rl.webkit.messageHandlers.onMethodParams?e=function(e){var t={JSSDK:nl,__msg_type:"event",__callback_id:e,func:e};rl.webkit.messageHandlers.onMethodParams.postMessage(t)}:rl.onMethodParams&&(e=function(e){var t={JSSDK:nl,__msg_type:"event",__callback_id:e,func:e};return rl.onMethodParams(e,t)}),e}function vl(e,t){if(("string"!=typeof t||!0!==/^(x|tc)\./.test(t))&&(sl||ul||ll||dl)){var n=e.__params;rl.JS2NativeBridge&&rl.JS2NativeBridge._invokeMethod&&(e.__params=el({code:n.code},n.data))}}var _l=function(e){function t(){var t=e.call(this,{version:nl,scheme:"bytedance://",listenNativeEvent:!0,dispatchMessageIFrameId:"__JSBridgeIframe_1.0__",setResultIFrameId:"__JSBridgeIframe_SetResult_1.0__",nativeEventListener:hl(),callbackProcessor:vl})||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 Zu(t,e),t.prototype.exposePublicApiToGlobal=function(){rl.ToutiaoJSBridge=Object.assign(rl.ToutiaoJSBridge||{},this.publicApi)},t}(tl),gl=function(e){function t(t){var n,r=e.call(this,{version:nl,nativeMethodInvoker:(rl.JS2NativeBridge&&rl.JS2NativeBridge._invokeMethod?n=function(e){return rl.JS2NativeBridge._invokeMethod(JSON.stringify(e))}:rl.ToutiaoJSBridge&&rl.ToutiaoJSBridge.invokeMethod?n=function(e){return rl.ToutiaoJSBridge.invokeMethod(JSON.stringify(e))}:rl.JS2NativeBridge&&rl.JS2NativeBridge.call?n=function(e){return rl.JS2NativeBridge.call(e.func,JSON.stringify(e))}:rl.webkit&&rl.webkit.messageHandlers&&rl.webkit.messageHandlers.callMethodParams?n=function(e){rl.webkit.messageHandlers.callMethodParams.postMessage(e)}:rl.callMethodParams&&(n=function(e){return rl.callMethodParams(e.func,e)}),n),nativeEventListener:hl(),scheme:fl?"bds://":pl?"bytedance://":ol||rl.JSBridge&&rl.JSBridge._invokeMethod?"nativeapp://":"bytedance://",listenNativeEvent:ol,callbackProcessor:vl})||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 Zu(t,e),t.prototype.call=function(t,n,r,i){void 0===i&&(i=nl),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;rl.JSBridge=Object.assign(rl.JSBridge||{},this.publicApi),rl.__DISABLE_JSB_PROTOCAL2__||(rl.Native2JSBridge=Object.assign(rl.Native2JSBridge||{},this.publicApi)),pl?rl.ToutiaoJSBridge=Object.assign(rl.ToutiaoJSBridge||{},this.publicApi):(ol||cl)&&this.toutiaoLegacyJSB?this.toutiaoLegacyJSB.exposePublicApiToGlobal():rl.ToutiaoJSBridge=Object.assign(rl.ToutiaoJSBridge||{},this.publicApi),rl.parent!==rl&&rl.addEventListener&&rl.addEventListener("message",(function(t){t&&t.data&&t.data.__callback_id&&e.handleMessageFromNative(t.data)}),!1),Object.defineProperties(rl,{JSBridge:{writable:!1},Native2JSBridge:{writable:!1},ToutiaoJSBridge:{writable:!1}}),Object.freeze(rl.JSBridge),Object.freeze(rl.Native2JSBridge),Object.freeze(rl.ToutiaoJSBridge)},t.prototype.isLegacyCall=function(e){return!(!e||"string"!=typeof e||!this.toutiaoLegacyJSB)&&(!!cl||!al&&!pl&&(ol&&e.indexOf(".")<0))},t}(tl);function yl(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r=0;s--)(o=e[s])&&(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},Pl=function(e,t){return function(n,r){t(n,r,e)}},Cl=function(e){s(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:Ol,reporters:r,context:e})).listenSPAHistoryChange=oi((function(){var e=function(){o.notifyObservers()};window.addEventListener("popstate",e),history.pushState=wl("pushState",e),history.replaceState=wl("replaceState",e)})),o.dynamicWebPageviewHandler=Rl.bind(null,f(o)),o}return a(n,[{key:"initListener",value:function(e){(function(e){if(!e)return!1;var t=zr(),n=e.getReporterPartner();return!(t&&!Sl.includes(t)||n&&e.isPartnerReporter()&&!Sl.includes(n))})(e)&&this.listenSPAHistoryChange()}},{key:"pixelSend",value:function(e,t){var n=this.reporters.find((function(t){return t.getReporterId()===e}));n&&Nl(n)&&("Pageview"===t&&this.addObserver(this.dynamicWebPageviewHandler),this.initListener(n))}}]),n}(Co);Cl=Al([R.injectable(),Pl(0,R.inject(wr.CONTEXT)),Pl(1,R.inject(wr.TTQ_REPORTERS))],Cl);var kl=[{identifier:wr.HISTORY_OBSERVER,to:Cl,name:"HistoryObserver"}],Ml=Kr(),Ll=(null==Ml?void 0:Ml._container)||new R.Container,Dl=(null==Ml?void 0:Ml._container)?ko.REBIND:ko.BIND;bi();var xl=Ll[Dl](wr.ENV),jl=Ll[Dl](Tr.SignalType);Ll[Dl](Tr.ID),Ll[Dl](Tr.Type),Ll[Dl](Tr.Options),Ll[Dl](Tr.Plugins),Ll[Dl](Tr.Rules),Ll[Dl](Tr.Info);var Ul=Ll[Dl](Tr.WebLibraryInfo),Fl=Ll[Dl](wr.TTQ_GLOBAL_OPTIONS);try{if(!Ll.get(wr.TTQ_GLOBAL_OPTIONS))throw new Error("")}catch(e){Fl.toConstantValue({})}var Bl=function(e,t){var n=function(e){return{name:"pixel.js",version:"2.2.0",options:e}}(),r=Ii();Ul.toConstantValue(n),xl.toConstantValue(t),jl.toConstantValue(r),!e||e._mounted||Ll.isBound(wr.JS_BRIDGE)||Ti(t)&&(Oi(t)?Ll.bind(wr.JS_BRIDGE).toConstantValue(function(){if(window&&window.ToutiaoJSBridge&&window.ToutiaoJSBridge.call)return window.ToutiaoJSBridge}()||El):Ll.bind(wr.JS_BRIDGE).toConstantValue(Tl))},Hl=function(e){(null==e?void 0:e._container)||(Ll.bind(wr.TTQ).to(zo).inSingletonScope(),Ll.bind(wr.CONTEXT).to(ea).inSingletonScope(),Ll.bind(wr.REPORTER).to(Wo),Ll.bind(wr.TTQ_REPORTERS).toConstantValue([]),Ll.bind(wr.REPORT_SERVICE).to(Ia).inSingletonScope(),Ll.bind(wr.AD_SERVICE).to(ra).inSingletonScope(),Ll.bind(wr.APP_SERVICE).to(aa).inSingletonScope(),Ll.bind(wr.BRIDGE_SERVICE).to(pa).inSingletonScope(),Ll.bind(wr.HTTP_SERVICE).to(ma).inSingletonScope(),Ll.bind(Tr.IsOnsitePage).toConstantValue({value:!1}),Ll.bind(wr.COOKIE_SERVICE).to(Sa).inSingletonScope(),Ll.bind(wr.CONSENT_SERVICE).to(_a).inSingletonScope()),e&&!e._container&&(e._container=Ll)},Gl=function(){Fu.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&&!$r(r)||Ll.isBound(a)||Ll.bind(a).to(t).inSingletonScope()}))},Vl=function(){kl.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.identifier;$r(r)&&!Ll.isBound(i)&&Ll.bind(i).to(t).inSingletonScope()}))},ql=function(e){return e&&e.Math==Math&&e},Jl=ql("object"==typeof globalThis&&globalThis)||ql("object"==typeof window&&window)||ql("object"==typeof self&&self)||ql("object"==typeof w&&w)||Function("return this")(),Wl={},Kl=function(e){try{return!!e()}catch(e){return!0}},Yl=!Kl((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Xl={},Ql={}.propertyIsEnumerable,zl=Object.getOwnPropertyDescriptor,Zl=zl&&!Ql.call({1:2},1);Xl.f=Zl?function(e){var t=zl(this,e);return!!t&&t.enumerable}:Ql;var $l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ef={}.toString,tf=function(e){return ef.call(e).slice(8,-1)},nf=tf,rf="".split,of=Kl((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==nf(e)?rf.call(e,""):Object(e)}:Object,af=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},cf=of,sf=af,uf=function(e){return cf(sf(e))},lf=function(e){return"object"==typeof e?null!==e:"function"==typeof e},ff=lf,df=function(e,t){if(!ff(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ff(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ff(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ff(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},pf={}.hasOwnProperty,hf=function(e,t){return pf.call(e,t)},vf=lf,_f=Jl.document,gf=vf(_f)&&vf(_f.createElement),yf=function(e){return gf?_f.createElement(e):{}},mf=yf,Ef=!Yl&&!Kl((function(){return 7!=Object.defineProperty(mf("div"),"a",{get:function(){return 7}}).a})),bf=Yl,If=Xl,Tf=$l,Of=uf,Sf=df,wf=hf,Nf=Ef,Rf=Object.getOwnPropertyDescriptor;Wl.f=bf?Rf:function(e,t){if(e=Of(e),t=Sf(t,!0),Nf)try{return Rf(e,t)}catch(e){}if(wf(e,t))return Tf(!If.f.call(e,t),e[t])};var Af={},Pf=lf,Cf=function(e){if(!Pf(e))throw TypeError(String(e)+" is not an object");return e},kf=Yl,Mf=Ef,Lf=Cf,Df=df,xf=Object.defineProperty;Af.f=kf?xf:function(e,t,n){if(Lf(e),t=Df(t,!0),Lf(n),Mf)try{return xf(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 jf=Af,Uf=$l,Ff=Yl?function(e,t,n){return jf.f(e,t,Uf(1,n))}:function(e,t,n){return e[t]=n,e},Bf={exports:{}},Hf=Jl,Gf=Ff,Vf=function(e,t){try{Gf(Hf,e,t)}catch(n){Hf[e]=t}return t},qf=Vf,Jf="__core-js_shared__",Wf=Jl[Jf]||qf(Jf,{}),Kf=Wf,Yf=Function.toString;"function"!=typeof Kf.inspectSource&&(Kf.inspectSource=function(e){return Yf.call(e)});var Xf=Kf.inspectSource,Qf=Xf,zf=Jl.WeakMap,Zf="function"==typeof zf&&/native code/.test(Qf(zf)),$f={exports:{}},ed=Wf;($f.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 td,nd,rd,id=0,od=Math.random(),ad=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++id+od).toString(36)},cd=$f.exports,sd=ad,ud=cd("keys"),ld=function(e){return ud[e]||(ud[e]=sd(e))},fd={},dd=Zf,pd=lf,hd=Ff,vd=hf,_d=ld,gd=fd,yd=Jl.WeakMap;if(dd){var md=new yd,Ed=md.get,bd=md.has,Id=md.set;td=function(e,t){return Id.call(md,e,t),t},nd=function(e){return Ed.call(md,e)||{}},rd=function(e){return bd.call(md,e)}}else{var Td=_d("state");gd[Td]=!0,td=function(e,t){return hd(e,Td,t),t},nd=function(e){return vd(e,Td)?e[Td]:{}},rd=function(e){return vd(e,Td)}}var Od={set:td,get:nd,has:rd,enforce:function(e){return rd(e)?nd(e):td(e,{})},getterFor:function(e){return function(t){var n;if(!pd(t)||(n=nd(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Sd=Jl,wd=Ff,Nd=hf,Rd=Vf,Ad=Xf,Pd=Od.get,Cd=Od.enforce,kd=String(String).split("String");(Bf.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||Nd(n,"name")||wd(n,"name",t),Cd(n).source=kd.join("string"==typeof t?t:"")),e!==Sd?(i?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=n:wd(e,t,n)):o?e[t]=n:Rd(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Pd(this).source||Ad(this)}));var Md=Jl,Ld=Md,Dd=Jl,xd=function(e){return"function"==typeof e?e:void 0},jd=function(e,t){return arguments.length<2?xd(Ld[e])||xd(Dd[e]):Ld[e]&&Ld[e][t]||Dd[e]&&Dd[e][t]},Ud={},Fd=Math.ceil,Bd=Math.floor,Hd=function(e){return isNaN(e=+e)?0:(e>0?Bd:Fd)(e)},Gd=Hd,Vd=Math.min,qd=function(e){return e>0?Vd(Gd(e),9007199254740991):0},Jd=Hd,Wd=Math.max,Kd=Math.min,Yd=uf,Xd=qd,Qd=function(e,t){var n=Jd(e);return n<0?Wd(n+t,0):Kd(n,t)},zd=function(e){return function(t,n,r){var i,o=Yd(t),a=Xd(o.length),c=Qd(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}},Zd={includes:zd(!0),indexOf:zd(!1)},$d=hf,ep=uf,tp=Zd.indexOf,np=fd,rp=function(e,t){var n,r=ep(e),i=0,o=[];for(n in r)!$d(np,n)&&$d(r,n)&&o.push(n);for(;t.length>i;)$d(r,n=t[i++])&&(~tp(o,n)||o.push(n));return o},ip=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],op=rp,ap=ip.concat("length","prototype");Ud.f=Object.getOwnPropertyNames||function(e){return op(e,ap)};var cp={};cp.f=Object.getOwnPropertySymbols;var sp,up=Ud,lp=cp,fp=Cf,dp=jd("Reflect","ownKeys")||function(e){var t=up.f(fp(e)),n=lp.f;return n?t.concat(n(e)):t},pp=hf,hp=dp,vp=Wl,_p=Af,gp=Kl,yp=/#|\.prototype\./,mp=function(e,t){var n=bp[Ep(e)];return n==Tp||n!=Ip&&("function"==typeof t?gp(t):!!t)},Ep=mp.normalize=function(e){return String(e).replace(yp,".").toLowerCase()},bp=mp.data={},Ip=mp.NATIVE="N",Tp=mp.POLYFILL="P",Op=mp,Sp=Jl,wp=Wl.f,Np=Ff,Rp=Bf.exports,Ap=Vf,Pp=function(e,t){for(var n=hp(t),r=_p.f,i=vp.f,o=0;oo;)Vp.f(e,n=r[o++],t[n]);return e},Kp=jd("document","documentElement"),Yp=Cf,Xp=Wp,Qp=ip,zp=fd,Zp=Kp,$p=yf,eh=ld("IE_PROTO"),th=function(){},nh=function(e){return"