try{(()=>{var t={9302:function(t,e,r){var n,i;n=0,i=function(){var t=t||function(t,e){if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(4882)}catch(t){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),(!e.hasOwnProperty("init")||this.init===e.init)&&(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(t,r){t=this.words=t||[],e!=r?this.sigBytes=r:this.sigBytes=4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new u.init(r,e/2)}},p=l.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new u.init(r,e)}},d=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},h=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,l=t.min(4*c,o);if(c){for(var f=0;f>>7)^(h<<14|h>>>18)^h>>>3,_=c[d-2],g=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;c[d]=v+c[d-7]+g+c[d-16]}var I=u&l^~u&f,y=n&i^n&o^i&o,m=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),E=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),S=p+E+I+a[d]+c[d],b=m+y;p=f,f=l,l=u,u=s+S|0,s=o,o=i,i=n,n=S+b|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+u|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=e.floor(n/4294967296),r[(i+64>>>9<<4)+15]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}}),t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u),t.SHA256},t.exports=i(r(9302))},3462:function(){},4882:function(){},5080:function(t,e,r){t.exports=r(7500)},2443:function(t,e,r){t.exports=r(4761)},4738:function(t,e,r){t.exports=r(2514)},4269:function(t,e,r){var n=r(4738);function i(t,e,r,i,o,s,a){try{var c=t[s](a),u=c.value}catch(t){r(t);return}c.done?e(u):n.resolve(u).then(i,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new n(function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,c,"next",t)}function c(t){i(s,n,o,a,c,"throw",t)}a(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},7227:function(t,e,r){var n=r(2443),i=r(5080);function o(){return t.exports=o=n?i(n).call(n):function(t){for(var e=1;el;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2339:function(t,e,r){"use strict";var n=r(2280);t.exports=function(t,e){var r=[][t];return!!r&&n(function(){r.call(null,e||function(){return 1},1)})}},4090:function(t,e,r){"use strict";var n=r(5168),i=r(6707),o=r(9110),s=r(3934),a=TypeError,c="Reduce of empty array with no initial value",u=function(t){return function(e,r,u,l){var f=i(e),p=o(f),d=s(f);if(n(r),0===d&&u<2)throw new a(c);var h=t?d-1:0,v=t?-1:1;if(u<2)for(;;){if(h in p){l=p[h],h+=v;break}if(h+=v,t?h<0:d<=h)throw new a(c)}for(;t?h>=0:d>h;h+=v)h in p&&(l=r(l,p[h],h,f));return l}};t.exports={left:u(!1),right:u(!0)}},296:function(t,e,r){"use strict";var n=r(5562),i=r(9996),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7514:function(t,e,r){"use strict";var n=r(1335);t.exports=n([].slice)},4684:function(t,e,r){"use strict";var n=r(7514),i=Math.floor,o=function(t,e){var r=t.length;if(r<8){for(var s,a,c=1;c0;)t[a]=t[--a];a!==c++&&(t[a]=s)}}else{for(var u=i(r/2),l=o(n(t,0,u),e),f=o(n(t,u),e),p=l.length,d=f.length,h=0,v=0;h=e(l[h],f[v])?l[h++]:f[v++]:h9007199254740991)throw e("Maximum allowed index exceeded");return t}},2:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},7681:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7346:function(t,e,r){"use strict";var n=r(3545).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},3253:function(t,e,r){"use strict";var n=r(3545);t.exports=/MSIE|Trident/.test(n)},7176:function(t,e,r){"use strict";var n=r(3545);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},3171:function(t,e,r){"use strict";var n=r(3545);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},7238:function(t,e,r){"use strict";var n=r(5285);t.exports="NODE"===n},6481:function(t,e,r){"use strict";var n=r(3545);t.exports=/web0s(?!.*chrome)/i.test(n)},3545:function(t,e,r){"use strict";var n=r(5017).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},1898:function(t,e,r){"use strict";var n,i,o=r(5017),s=r(3545),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},4352:function(t,e,r){"use strict";var n=r(3545).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},5285:function(t,e,r){"use strict";var n=r(5017),i=r(3545),o=r(6684),s=function(t){return i.slice(0,t.length)===t};t.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===o(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},4549:function(t,e,r){"use strict";var n,i=r(1335),o=Error,s=i("".replace);var a=(n="zxcasd",String(new o(n).stack)),c=/\n\s*at [^:]*:[^\n]*/,u=c.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=s(t,c,"");return t}},1441:function(t,e,r){"use strict";var n=r(5245),i=r(4549),o=r(7031),s=Error.captureStackTrace;t.exports=function(t,e,r,a){o&&(s?s(t,e):n(t,"stack",i(r,a)))}},7031:function(t,e,r){"use strict";var n=r(2280),i=r(3067);t.exports=!n(function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)})},5633:function(t,e,r){"use strict";var n=r(5017),i=r(5473),o=r(3102),s=r(309),a=r(788).f,c=r(9118),u=r(5236),l=r(9141),f=r(5245),p=r(1615);r(1258);var d=function(t){var e=function(r,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var r,i,h,v,_,g,I,y,m,E=t.target,S=t.global,b=t.stat,O=t.proto,T=S?n:b?n[E]:n[E]&&n[E].prototype,R=S?u:u[E]||f(u,E,{})[E],x=R.prototype;for(v in e)i=!(r=c(S?v:E+(b?".":"#")+v,t.forced))&&T&&p(T,v),g=R[v],i&&(I=t.dontCallGetSet?(m=a(T,v))&&m.value:T[v]),_=i&&I?I:e[v],(r||O||typeof g!=typeof _)&&(y=t.bind&&i?l(_,n):t.wrap&&i?d(_):O&&s(_)?o(_):_,(t.sham||_&&_.sham||g&&g.sham)&&f(y,"sham",!0),f(R,v,y),O&&(h=E+"Prototype",!p(u,h)&&f(u,h,{}),f(u[h],v,_),t.real&&x&&(r||!x[v])&&f(x,v,_)))}},2280:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},5473:function(t,e,r){"use strict";var n=r(7364),i=Function.prototype,o=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(o):function(){return s.apply(o,arguments)})},9141:function(t,e,r){"use strict";var n=r(3102),i=r(5168),o=r(7364),s=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},7364:function(t,e,r){"use strict";var n=r(2280);t.exports=!n(function(){var t=(function(){}).bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},8683:function(t,e,r){"use strict";var n=r(1335),i=r(5168),o=r(3054),s=r(1615),a=r(7514),c=r(7364),u=Function,l=n([].concat),f=n([].join),p={},d=function(t,e,r){if(!s(p,e)){for(var n=[],i=0;iI;I++)if((m=N(t[I]))&&u(v,m))return m;return new h(!1)}_=l(t,g)}for(E=T?t.next:_.next;!(S=i(E,_)).done;){try{m=N(S.value)}catch(t){p(_,"throw",t)}if("object"==typeof m&&m&&u(v,m))return m}return new h(!1)}},3742:function(t,e,r){"use strict";var n=r(5568),i=r(1985),o=r(7522);t.exports=function(t,e,r){var s,a;i(t);try{if(!(s=o(t,"return"))){if("throw"===e)throw r;return r}s=n(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw r;if(a)throw s;return i(s),r}},133:function(t,e,r){"use strict";var n=r(9693).IteratorPrototype,i=r(7546),o=r(3067),s=r(7592),a=r(9122),c=function(){return this};t.exports=function(t,e,r,u){var l=e+" Iterator";return t.prototype=i(n,{next:o(+!u,r)}),s(t,l,!1,!0),a[l]=c,t}},4088:function(t,e,r){"use strict";var n=r(5633),i=r(5568),o=r(1088),s=r(1020),a=r(309),c=r(133),u=r(6759),l=r(3527),f=r(7592),p=r(5245),d=r(9491),h=r(5737),v=r(9122),_=r(9693),g=s.PROPER,I=s.CONFIGURABLE,y=_.IteratorPrototype,m=_.BUGGY_SAFARI_ITERATORS,E=h("iterator"),S="keys",b="values",O="entries",T=function(){return this};t.exports=function(t,e,r,s,h,_,R){c(r,e,s);var x,P,A,N=function(t){if(t===h&&L)return L;if(!m&&t&&t in w)return w[t];switch(t){case S:return function(){return new r(this,t)};case b:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},C=e+" Iterator",D=!1,w=t.prototype,k=w[E]||w["@@iterator"]||h&&w[h],L=!m&&k||N(h),M="Array"===e&&w.entries||k;if(M&&(x=u(M.call(new t)))!==Object.prototype&&x.next&&(!o&&u(x)!==y&&(l?l(x,y):!a(x[E])&&d(x,E,T)),f(x,C,!0,!0),o&&(v[C]=T)),g&&h===b&&k&&k.name!==b&&(!o&&I?p(w,"name",b):(D=!0,L=function(){return i(k,this)})),h){if(P={values:N(b),keys:_?L:N(S),entries:N(O)},R)for(A in P)(m||D||!(A in w))&&d(w,A,P[A]);else n({target:e,proto:!0,forced:m||D},P)}return(!o||R)&&w[E]!==L&&d(w,E,L,{name:h}),v[e]=L,P}},9693:function(t,e,r){"use strict";var n,i,o,s=r(2280),a=r(309),c=r(3054),u=r(7546),l=r(6759),f=r(9491),p=r(5737),d=r(1088),h=p("iterator"),v=!1;[].keys&&(o=[].keys(),"next"in o?(i=l(l(o)))!==Object.prototype&&(n=i):v=!0),!c(n)||s(function(){var t={};return n[h].call(t)!==t})?n={}:d&&(n=u(n)),!a(n[h])&&f(n,h,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},9122:function(t){"use strict";t.exports={}},3934:function(t,e,r){"use strict";var n=r(3586);t.exports=function(t){return n(t.length)}},6542:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},578:function(t,e,r){"use strict";var n,i,o,s,a,c=r(5017),u=r(461),l=r(9141),f=r(8151).set,p=r(2962),d=r(3171),h=r(7176),v=r(6481),_=r(7238),g=c.MutationObserver||c.WebKitMutationObserver,I=c.document,y=c.process,m=c.Promise,E=u("queueMicrotask");if(!E){var S=new p,b=function(){var t,e;for(_&&(t=y.domain)&&t.exit();e=S.get();)try{e()}catch(t){throw S.head&&n(),t}t&&t.enter()};d||_||v||!g||!I?!h&&m&&m.resolve?((s=m.resolve(void 0)).constructor=m,a=l(s.then,s),n=function(){a(b)}):_?n=function(){y.nextTick(b)}:(f=l(f,c),n=function(){f(b)}):(i=!0,o=I.createTextNode(""),new g(b).observe(o,{characterData:!0}),n=function(){o.data=i=!i}),E=function(t){!S.head&&n(),S.add(t)}}t.exports=E},3441:function(t,e,r){"use strict";var n=r(5168),i=TypeError,o=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},5732:function(t,e,r){"use strict";var n=r(2952);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},3769:function(t,e,r){"use strict";var n=r(1130),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},8268:function(t,e,r){"use strict";var n=r(5562),i=r(1335),o=r(5568),s=r(2280),a=r(9340),c=r(4858),u=r(8571),l=r(6707),f=r(9110),p=Object.assign,d=Object.defineProperty,h=i([].concat);t.exports=!p||s(function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach(function(t){e[t]=t}),7!==p({},t)[r]||a(p({},e)).join("")!==i})?function(t,e){for(var r=l(t),i=arguments.length,s=1,p=c.f,d=u.f;i>s;){for(var v,_=f(arguments[s++]),g=p?h(a(_),p(_)):a(_),I=g.length,y=0;I>y;)v=g[y++],(!n||o(d,_,v))&&(r[v]=_[v])}return r}:p},7546:function(t,e,r){"use strict";var n,i=r(1985),o=r(7659),s=r(7681),a=r(9090),c=r(7526),u=r(4155),l=r(3137),f="prototype",p="script",d=l("IE_PROTO"),h=function(){},v=function(t){return"<"+p+">"+t+""},_=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){var t,e=u("iframe");return e.style.display="none",c.appendChild(e),e.src=String("java"+p+":"),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F},I=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}I="undefined"!=typeof document?document.domain&&n?_(n):g():_(n);for(var t=s.length;t--;)delete I[f][s[t]];return I()};a[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(h[f]=i(t),r=new h,h[f]=null,r[d]=t):r=I(),void 0===e?r:o.f(r,e)}},7659:function(t,e,r){"use strict";var n=r(5562),i=r(5622),o=r(8250),s=r(1985),a=r(4259),c=r(9340);e.f=n&&!i?Object.defineProperties:function(t,e){s(t);for(var r,n=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,r=i[l++],n[r]);return t}},8250:function(t,e,r){"use strict";var n=r(5562),i=r(7360),o=r(5622),s=r(1985),a=r(9948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",d="writable";e.f=n?o?function(t,e,r){if(s(t),e=a(e),s(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=l(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(s(t),e=a(e),s(r),i)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},788:function(t,e,r){"use strict";var n=r(5562),i=r(5568),o=r(8571),s=r(3067),a=r(4259),c=r(9948),u=r(1615),l=r(7360),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},9300:function(t,e,r){"use strict";var n=r(1570),i=r(7681).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},4858:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},6759:function(t,e,r){"use strict";var n=r(1615),i=r(309),o=r(6707),s=r(3137),a=r(6034),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(n(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof u?l:null}},5040:function(t,e,r){"use strict";var n=r(1335);t.exports=n({}.isPrototypeOf)},1570:function(t,e,r){"use strict";var n=r(1335),i=r(1615),o=r(4259),s=r(7868).indexOf,a=r(9090),c=n([].push);t.exports=function(t,e){var r,n=o(t),u=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&c(l,r);for(;e.length>u;)i(n,r=e[u++])&&(~s(l,r)||c(l,r));return l}},9340:function(t,e,r){"use strict";var n=r(1570),i=r(7681);t.exports=Object.keys||function(t){return n(t,i)}},8571:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},3527:function(t,e,r){"use strict";var n=r(5446),i=r(3054),o=r(9762),s=r(6211);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return(o(r),s(n),i(r))?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},191:function(t,e,r){"use strict";var n=r(5562),i=r(2280),o=r(1335),s=r(6759),a=r(9340),c=r(4259),u=r(8571).f,l=o(u),f=o([].push),p=n&&i(function(){var t=Object.create(null);return t[2]=2,!l(t,2)}),d=function(t){return function(e){for(var r,i=c(e),o=a(i),u=p&&null===s(i),d=o.length,h=0,v=[];d>h;)r=o[h++],(!n||(u?r in i:l(i,r)))&&f(v,t?[r,i[r]]:i[r]);return v}};t.exports={entries:d(!0),values:d(!1)}},8566:function(t,e,r){"use strict";var n=r(6630),i=r(4362);t.exports=n?({}).toString:function(){return"[object "+i(this)+"]"}},357:function(t,e,r){"use strict";var n=r(5568),i=r(309),o=r(3054),s=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!o(a=n(r,t))||i(r=t.valueOf)&&!o(a=n(r,t))||"string"!==e&&i(r=t.toString)&&!o(a=n(r,t)))return a;throw new s("Can't convert object to primitive value")}},6026:function(t,e,r){"use strict";var n=r(3878),i=r(1335),o=r(9300),s=r(4858),a=r(1985),c=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=s.f;return r?c(e,r(t)):e}},5236:function(t){"use strict";t.exports={}},4112:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8845:function(t,e,r){"use strict";var n=r(5017),i=r(61),o=r(309),s=r(9118),a=r(8910),c=r(5737),u=r(5285),l=r(1088),f=r(1898),p=i&&i.prototype,d=c("species"),h=!1,v=o(n.PromiseRejectionEvent),_=s("Promise",function(){var t=a(i),e=t!==String(i);if(!e&&66===f||l&&!(p.catch&&p.finally))return!0;if(!f||f<51||!/native code/.test(t)){var r=new i(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[d]=n,!(h=r.then(function(){}) instanceof n))return!0}return!e&&("BROWSER"===u||"DENO"===u)&&!v});t.exports={CONSTRUCTOR:_,REJECTION_EVENT:v,SUBCLASSING:h}},61:function(t,e,r){"use strict";var n=r(5017);t.exports=n.Promise},2270:function(t,e,r){"use strict";var n=r(1985),i=r(3054),o=r(3441);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},2555:function(t,e,r){"use strict";var n=r(61),i=r(1314),o=r(8845).CONSTRUCTOR;t.exports=o||!i(function(t){n.all(t).then(void 0,function(){})})},2962:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return null===e&&(this.tail=null),t.item}}},t.exports=e},9762:function(t,e,r){"use strict";var n=r(2190),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},461:function(t,e,r){"use strict";var n=r(5017),i=r(5562),o=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=o(n,t);return e&&e.value}},66:function(t,e,r){"use strict";var n=r(3878),i=r(5269),o=r(5737),s=r(5562),a=o("species");t.exports=function(t){var e=n(t);s&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},7592:function(t,e,r){"use strict";var n=r(6630),i=r(8250).f,o=r(5245),s=r(1615),a=r(8566),c=r(5737)("toStringTag");t.exports=function(t,e,r,u){var l=r?t:t&&t.prototype;l&&(!s(l,c)&&i(l,c,{configurable:!0,value:e}),u&&!n&&o(l,"toString",a))}},3137:function(t,e,r){"use strict";var n=r(2025),i=r(4289),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},1258:function(t,e,r){"use strict";var n=r(1088),i=r(5017),o=r(4945),s="__core-js_shared__",a=t.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"\xa9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},2025:function(t,e,r){"use strict";var n=r(1258);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},3360:function(t,e,r){"use strict";var n=r(1985),i=r(3900),o=r(2190),s=r(5737)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||o(r=n(a)[s])?e:i(r)}},1760:function(t,e,r){"use strict";var n=r(1335),i=r(3642),o=r(2952),s=r(9762),a=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(t){return function(e,r){var n,l,f=o(s(e)),p=i(r),d=f.length;return p<0||p>=d?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===d||(l=c(f,p+1))<56320||l>57343?t?a(f,p):n:t?u(f,p,p+2):(n-55296<<10)+(l-56320)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},4222:function(t,e,r){"use strict";var n=r(1020).PROPER,i=r(2280),o=r(5598),s="​\x85᠎";t.exports=function(t){return i(function(){return!!o[t]()||s[t]()!==s||n&&o[t].name!==t})}},2971:function(t,e,r){"use strict";var n=r(1335),i=r(9762),o=r(2952),s=r(5598),a=n("".replace),c=RegExp("^["+s+"]+"),u=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(t){return function(e){var r=o(i(e));return 1&t&&(r=a(r,c,"")),2&t&&(r=a(r,u,"$1")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},7076:function(t,e,r){"use strict";var n=r(1898),i=r(2280),o=r(5017).String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t) instanceof Symbol)||!Symbol.sham&&n&&n<41})},8151:function(t,e,r){"use strict";var n,i,o,s,a=r(5017),c=r(5473),u=r(9141),l=r(309),f=r(1615),p=r(2280),d=r(7526),h=r(7514),v=r(4155),_=r(2257),g=r(3171),I=r(7238),y=a.setImmediate,m=a.clearImmediate,E=a.process,S=a.Dispatch,b=a.Function,O=a.MessageChannel,T=a.String,R=0,x={},P="onreadystatechange";p(function(){n=a.location});var A=function(t){if(f(x,t)){var e=x[t];delete x[t],e()}},N=function(t){return function(){A(t)}},C=function(t){A(t.data)},D=function(t){a.postMessage(T(t),n.protocol+"//"+n.host)};(!y||!m)&&(y=function(t){_(arguments.length,1);var e=l(t)?t:b(t),r=h(arguments,1);return x[++R]=function(){c(e,void 0,r)},i(R),R},m=function(t){delete x[t]},I?i=function(t){E.nextTick(N(t))}:S&&S.now?i=function(t){S.now(N(t))}:O&&!g?(s=(o=new O).port2,o.port1.onmessage=C,i=u(s.postMessage,s)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!p(D)?(i=D,a.addEventListener("message",C,!1)):i=P in v("script")?function(t){d.appendChild(v("script"))[P]=function(){d.removeChild(this),A(t)}}:function(t){setTimeout(N(t),0)}),t.exports={set:y,clear:m}},3299:function(t,e,r){"use strict";var n=r(3642),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},4259:function(t,e,r){"use strict";var n=r(9110),i=r(9762);t.exports=function(t){return n(i(t))}},3642:function(t,e,r){"use strict";var n=r(6542);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},3586:function(t,e,r){"use strict";var n=r(3642),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},6707:function(t,e,r){"use strict";var n=r(9762),i=Object;t.exports=function(t){return i(n(t))}},9643:function(t,e,r){"use strict";var n=r(5568),i=r(3054),o=r(4341),s=r(7522),a=r(357),c=r(5737),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=s(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9948:function(t,e,r){"use strict";var n=r(9643),i=r(4341);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6630:function(t,e,r){"use strict";var n=r(5737)("toStringTag"),i={};i[n]="z",t.exports="[object z]"===String(i)},2952:function(t,e,r){"use strict";var n=r(4362),i=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},1024:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},4289:function(t,e,r){"use strict";var n=r(1335),i=0,o=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},6878:function(t,e,r){"use strict";var n=r(7076);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5622:function(t,e,r){"use strict";var n=r(5562),i=r(2280);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2257:function(t){"use strict";var e=TypeError;t.exports=function(t,r){if(t2&&f(r,arguments[2]);var a=[];return d(t,g,{that:a}),u(r,"errors",a),r};s?s(I,_):a(I,_,{name:!0});var y=I.prototype=c(_.prototype,{constructor:l(1,I),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:I})},370:function(t,e,r){"use strict";r(4704)},2644:function(t,e,r){"use strict";var n=r(5633),i=r(7868).includes,o=r(2280),s=r(4809),a=o(function(){return![,].includes()});n({target:"Array",proto:!0,forced:a},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},7300:function(t,e,r){"use strict";var n=r(4259),i=r(4809),o=r(9122),s=r(7179),a=r(8250).f,c=r(4088),u=r(6616),l=r(1088),f=r(5562),p="Array Iterator",d=s.set,h=s.getterFor(p);t.exports=c(Array,"Array",function(t,e){d(this,{type:p,target:n(t),index:0,kind:e})},function(){var t=h(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,u(void 0,!0);switch(t.kind){case"keys":return u(r,!1);case"values":return u(e[r],!1)}return u([r,e[r]],!1)},"values");var v=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&f&&"values"!==v.name)try{a(v,"name",{value:"values"})}catch(t){}},7985:function(t,e,r){"use strict";var n=r(5633),i=r(6707),o=r(3934),s=r(296),a=r(3385),c=r(2280)(function(){return 4294967297!==[].push.call({length:4294967296},1)}),u=c||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}();n({target:"Array",proto:!0,arity:1,forced:u},{push:function(t){var e=i(this),r=o(e),n=arguments.length;a(r+n);for(var c=0;c79&&s<83||!o("reduce");n({target:"Array",proto:!0,forced:c},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},9721:function(t,e,r){"use strict";var n=r(5633),i=r(1335),o=r(5168),s=r(6707),a=r(3934),c=r(8180),u=r(2952),l=r(2280),f=r(4684),p=r(2339),d=r(7346),h=r(3253),v=r(1898),_=r(4352),g=[],I=i(g.sort),y=i(g.push),m=l(function(){g.sort(void 0)}),E=l(function(){g.sort(null)}),S=p("sort"),b=!l(function(){if(v)return v<70;if(!d||!(d>3)){if(h)return!0;if(_)return _<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:e+n,v:r})}for(g.sort(function(t,e){return e.v-t.v}),n=0;nu(r)?1:-1})),r=a(l),n=0;n1?arguments[1]:void 0)}})},3998:function(t,e,r){"use strict";var n=r(1760).charAt,i=r(2952),o=r(7179),s=r(4088),a=r(6616),c="String Iterator",u=o.set,l=o.getterFor(c);s(String,"String",function(t){u(this,{type:c,string:i(t),index:0})},function(){var t,e=l(this),r=e.string,i=e.index;return i>=r.length?a(void 0,!0):(t=n(r,i),e.index+=t.length,a(t,!1))})},2896:function(t,e,r){"use strict";var n=r(5633),i=r(2971).trim,o=r(4222);n({target:"String",proto:!0,forced:o("trim")},{trim:function(){return i(this)}})},398:function(t,e,r){"use strict";r(370)},4644:function(t,e,r){"use strict";r(1190)},856:function(t,e,r){"use strict";r(1402)},4716:function(t,e,r){"use strict";var n=r(5633),i=r(5017),o=r(5473),s=r(7514),a=r(3441),c=r(5168),u=r(4112),l=i.Promise,f=!1,p=!l||!l.try||u(function(){l.try(function(t){f=8===t},8)}).error||!f;n({target:"Promise",stat:!0,forced:p},{try:function(t){var e=arguments.length>1?s(arguments,1):[],r=a.f(this),n=u(function(){return o(c(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}})},5320:function(t,e,r){"use strict";r(6242)},6432:function(t,e,r){"use strict";r(7300);var n=r(2),i=r(5017),o=r(7592),s=r(9122);for(var a in n)o(i[a],a),s[a]=s.Array},577:function(t,e,r){"use strict";var n=r(8612);t.exports=n},4168:function(t,e,r){"use strict";var n=r(7225);t.exports=n},4141:function(t,e,r){"use strict";var n=r(8411);t.exports=n},2589:function(t,e,r){"use strict";var n=r(8606);t.exports=n},6762:function(t,e,r){"use strict";var n=r(2862);t.exports=n},4132:function(t,e,r){"use strict";var n=r(4583);t.exports=n},1189:function(t,e,r){"use strict";var n=r(733);t.exports=n},2206:function(t,e,r){"use strict";var n=r(3437);t.exports=n},4378:function(t,e,r){"use strict";var n=r(6951);t.exports=n},5880:function(t,e,r){"use strict";var n=r(8640);r(6432),t.exports=n},9392:function(t,e,r){"use strict";var n=r(6670);r(6432),t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.rv=function(){return"1.0.0-rc.0"},r.ruid="bundler=rspack@1.0.0-rc.0";(()=>{"use strict";var t,e,n,i,o=r("577"),s=r.n(o),a=r("4141"),c=r.n(a),u="TiktokAnalyticsObject",l="tt_adInfo_v2",f="tt_appInfo_v2",p="_ttp",d="_sttp",h="tt_sessionId",v="tt_s_pixel_session_index",_="ttcsid",g=function(t){return t.WINDOWS_PHONE="Windows Phone",t.ANDROID="android",t.IOS="ios",t.PC="pc",t}({}),I=function(t){return t.MUSICAL_LY="musical_ly",t.MUSICALLY_GO="musically_go",t.TRILL="trill",t.ULTRALITE="ultralite",t.LEMON8="lemon8",t.TTLINK="ttlink",t}({});I.LEMON8,I.TTLINK,I.MUSICAL_LY,g.IOS,g.ANDROID,I.TRILL,g.IOS,g.ANDROID;var y={expires:390},m="ttoclid",E={TTQ:Symbol.for("TTQ"),GLOBAL_TTQ:Symbol.for("GLOBAL_TTQ"),SHOPIFY_TTQ:Symbol.for("SHOPIFY_TTQ"),ENV:Symbol.for("ENV"),CONTEXT:Symbol.for("CONTEXT"),REPORTER:Symbol.for("REPORTER"),REPORTERS:Symbol.for("REPORTERS"),PLUGIN:Symbol.for("PLUGIN"),PLUGINS:Symbol.for("PLUGINS"),TTQ_GLOBAL_OPTIONS:Symbol.for("TTQ_GLOBAL_OPTIONS"),EVENT_EMITTER:Symbol.for("EVENT_EMITTER"),SENSITIVE_REDACTOR:Symbol.for("SENSITIVE_REDACTOR"),PERFORMANCE_PLUGIN:Symbol.for("PERFORMANCE_PLUGIN"),INTERACTION_PLUGIN:Symbol.for("INTERACTION_PLUGIN"),INTERACTION_PLUGIN_MONITOR:Symbol.for("INTERACTION_PLUGIN_MONITOR"),PERFORMANCE_PLUGIN_MONITOR:Symbol.for("PERFORMANCE_PLUGIN_MONITOR"),ADVANCED_MATCHING_PLUGIN:Symbol.for("ADVANCED_MATCHING_PLUGIN"),AUTO_ADVANCED_MATCHING_PLUGIN:Symbol.for("AUTO_ADVANCED_MATCHING_PLUGIN"),CALLBACK_PLUGIN:Symbol.for("CALLBACK_PLUGIN"),IDENTIFY_PLUGIN:Symbol.for("IDENTIFY_PLUGIN"),MONITOR_PLUGIN:Symbol.for("MONITOR_PLUGIN"),WEB_FL_PLUGIN:Symbol.for("WEB_FL_PLUGIN"),SHOPIFY_PLUGIN:Symbol.for("SHOPIFY_PLUGIN"),AUTO_CONFIG_PLUGIN:Symbol.for("AUTO_CONFIG_PLUGIN"),DIAGNOSTICS_CONSOLE_PLUGIN:Symbol.for("DIAGNOSTICS_CONSOLE_PLUGIN"),COMPETITOR_INSIGHT_PLUGIN:Symbol.for("COMPETITOR_INSIGHT_PLUGIN"),EVENT_BUILDER_PLUGIN:Symbol.for("EVENT_BUILDER_PLUGIN"),ENRICH_IPV6_PLUGIN:Symbol.for("ENRICH_IPV6_PLUGIN"),LPV_PLUGIN:Symbol.for("LPV_PLUGIN"),RUNTIME_MEASUREMENT_PLUGIN:Symbol.for("RUNTIME_MEASUREMENT_PLUGIN"),TEXT_TREE_WALKER_PLUGIN:Symbol.for("TEXT_TREE_WALKER_PLUGIN"),PAGE_PERFORMANCE_MONITOR:Symbol.for("PAGE_PERFORMANCE_MONITOR"),PAGE_INTERACTION_MONITOR:Symbol.for("PAGE_INTERACTION_MONITOR"),PAGEDATA_PLUGIN:Symbol.for("PAGEDATA_PLUGIN"),CDP_VISITER_PLUGIN:Symbol.for("CDP_VISITER_PLUGIN"),HISTORY_OBSERVER:Symbol.for("HISTORY_OBSERVER"),INTERACTION_OBSERVER:Symbol.for("INTERACTION_OBSERVER"),BATCH_SERVICE:Symbol.for("BATCH_SERVICE"),REPORT_SERVICE:Symbol.for("REPORT_SERVICE"),AD_SERVICE:Symbol.for("AD_SERVICE"),APP_SERVICE:Symbol.for("APP_SERVICE"),BRIDGE_SERVICE:Symbol.for("BRIDGE"),HTTP_SERVICE:Symbol.for("HTTP_SERVICE"),COOKIE_SERVICE:Symbol.for("COOKIE_SERVICE"),CONSENT_SERVICE:Symbol.for("CONSENT_SERVICE"),INTER_ID_SERVICE:Symbol.for("INTER_ID_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")},S=function(t){return t.LOAD_START="load_start",t.LOAD_END="load_end",t.BEFORE_INIT="before_init",t.INIT_START="init_start",t.INIT_END="init_end",t.JSB_INIT_START="jsb_init_start",t.JSB_INIT_END="jsb_init_end",t.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",t.AD_INFO_INIT_START="ad_info_init_start",t.AD_INFO_INIT_END="ad_info_init_end",t.IDENTIFY_INIT_START="identify_init_start",t.IDENTIFY_INIT_END="identify_init_end",t.PLUGIN_INIT_START="_init_start",t.PLUGIN_INIT_END="_init_end",t.PIXEL_SEND="pixel_send",t.PIXEL_SEND_PCM="pixel_send_PCM",t.JSB_SEND="jsb_send",t.HTTP_SEND="http_send",t.HANDLE_CACHE="handle_cache",t.INIT_ERROR="init_error",t.PIXEL_EMPTY="pixel_empty",t.JSB_ERROR="jsb_error",t.API_ERROR="api_error",t.PLUGIN_ERROR="plugin_error",t.CUSTOM_INFO="custom_info",t.CUSTOM_ERROR="custom_error",t.CUSTOM_TIMER="custom_timer",t}({}),b=r("2589"),O=r.n(b),T={info:[],error:[]};function R(t,e,r,n){void 0===e&&(e={}),void 0===r&&(r=!1),void 0===n&&(n=!1);try{var i,o=D(),s=null==o.getPlugin?void 0:o.getPlugin("Monitor");s&&s.info&&"function"==typeof s.info?s.info.call(s,t,e,r,n):j("Monitor")&&O()(i=T.info).call(i,{event:t,detail:e,withoutJSB:r,forceReport:n})}catch(t){}}function x(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n=!1);try{var i,o=D(),s=null==o.getPlugin?void 0:o.getPlugin("Monitor");s&&s.error&&"function"==typeof s.error?s.error.call(s,t,e,r,n):j("Monitor")&&O()(i=T.error).call(i,{event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}var P=()=>{try{var t=D();if(!(t&&t._legacy&&0!==t._legacy.length))return!1;return Object.keys(t._t).length>Object.keys(t._legacy||[]).length||t.reporters.length>Object.keys(t._legacy||[]).length}catch(t){return!1}},A=null,N=()=>"undefined"!=typeof window?window:void 0!==s()?s():"undefined"!=typeof self?self:void 0!==r.g?r.g:Function("return this")(),C=()=>N()[u]||"ttq",D=()=>{var t=N();return A||t[C()]},w=()=>{var t=N();return void 0!==t.DedicatedWorkerGlobalScope?t instanceof t.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===t.constructor.name},k=()=>{var t=N();return("object"==typeof navigator&&navigator.userAgent?navigator.userAgent:"")||t._userAgent},L=t=>{try{var e=D();return e&&e._self_host_config&&e._self_host_config[t]||""}catch(t){return""}},M=function(t,e){void 0===e&&(e=[]);try{return c()(e).call(e,t)}catch(t){return!1}},U=t=>{var e=D(),r=e._i||{},n=t&&r[t];return t&&n&&n._partner?n._partner:e._partner?e._partner:""},j=t=>{try{var e=D()._plugins||{};if(null!=e[t])return!!e[t];return!0}catch(t){return!0}},F=()=>{try{var t=D()._ppf;return null==t.printAndClear?void 0:t.printAndClear()}catch(t){}},H=()=>{try{var t,e=D(),r=null==(t=e._container)?void 0:t.get(E.INTER_ID_SERVICE);if(r)return r.getInterId()||null}catch(t){x(S.CUSTOM_ERROR,t,{custom_name:"getCurrentInterId"})}return null},B=r("9392"),G=r.n(B),V=function(t){return t[t.NOT_SURE=0]="NOT_SURE",t[t.INVOKE_METHOD_ENABLED=1]="INVOKE_METHOD_ENABLED",t[t.INVOKE_METHOD_NOT_ENABLED=2]="INVOKE_METHOD_NOT_ENABLED",t}({}),K=function(t){return t.NORMAL="1",t.NOT_CROSS_DOMAIN_IFRAME="2",t.CROSS_DOMAIN_IFRAME="3",t.WEB_WORKER="4",t.SANDBOX_IFRAME="5",t.GTM_IFRAME="6",t.URL_IN_QUERY_IFRAME="7",t.UNKNOWN_IFRAME="8",t}({}),q=r("7227"),W=r.n(q),J=r("4269"),z=r.n(J),X=r("4378"),Y=r.n(X);let Z=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>((e&=63)<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"");function Q(t){var e=Error(t);return e.source="ulid",e}var $="0123456789ABCDEFGHJKMNPQRSTVWXYZ",tt=$.length,te=0xffffffffffff;function tr(t,e,r){return e>t.length-1?t:t.substr(0,e)+r+t.substr(e+1)}function tn(t,e){if(isNaN(t))throw Error(t+" must be a number");if(t>te)throw Q("cannot encode time greater than "+te);if(t<0)throw Q("time must be positive");if(!1===Number.isInteger(t))throw Q("time must be an integer");for(var r=void 0,n="";e>0;e--)r=t%tt,n=$.charAt(r)+n,t=(t-r)/tt;return n}function ti(t,e){for(var r="";t>0;t--)r=function(t){var e=Math.floor(t()*tt);return e===tt&&(e=tt-1),$.charAt(e)}(e)+r;return r}function to(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments[1];!e&&(e="undefined"!=typeof window?window:null);var n=e&&(e.crypto||e.msCrypto);if(n)return function(){var t=new Uint8Array(1);return n.getRandomValues(t),t[0]/255};try{var i=r(3462);return function(){return i.randomBytes(1).readUInt8()/255}}catch(t){}if(t)return function(){return Math.random()};throw Q("secure crypto unusable, insecure Math.random not allowed")}var ts=function(t){return!t&&(t=to()),function(e){return isNaN(e)&&(e=Date.now()),tn(e,10)+ti(16,t)}}(),ta={Email:1,Phone:2},tc=function(t){return t.EMPTY_VALUE="empty_value",t.WRONG_FORMAT="wrong_format",t.CORRECT_FORMAT="correct_format",t.HASHED="hashed",t.HASHED_ERR="hashed_err",t.HASHED_CORRECT="hashed_correct",t.PLAINTEXT_EMAIL="plaintext_email",t.PLAINTEXT_PHONE="plaintext_phone",t}({}),tu=function(t){return t.EMPTY_VALUE="empty_value",t.PLAIN_EMAIL="plain_email",t.PLAIN_PHONE="plain_phone",t.HASHED="hashed",t.FILTER_EVENTS="filter_events",t.UNKNOWN_INVALID="unknown_invalid",t.BASE64_STRING_HASHED="base64_string_hashed",t.BASE64_HEX_HASHED="base64_hex_hashed",t.PLAIN_MDN_EMAIL="plain_mdn_email",t.ZIP_CODE_IS_NOT_HASHED="zip_code_is_not_hashed",t.ZIP_CODE_IS_NOT_US="zip_code_is_not_us",t.ZIP_CODE_IS_HASHED="zip_code_is_hashed",t.ZIP_CODE_IS_US="zip_code_is_us",t}({}),tl=function(t){return t.Manual="manual",t.ManualV2="manual_v2",t.Auto="auto",t.EBManual="eb_manual",t}({}),tf=function(t){return t.missing="missing",t.valid="valid",t.invalid="invalid",t}({}),tp={raw_email:{label:tf.missing},raw_auto_email:{label:tf.missing},raw_phone:{label:tf.missing},raw_auto_phone:{label:tf.missing},hashed_email:{label:tf.missing},hashed_phone:{label:tf.missing},raw_eb_email:{label:tf.missing},raw_eb_phone:{label:tf.missing},hashed_eb_email:{label:tf.missing},hashed_eb_phone:{label:tf.missing}};function td(){var t=Date.now();return("number"!=typeof t||isNaN(t)||!isFinite(t)||t<0)&&(t=new Date().getTime()),t}var th=t=>"string"==typeof t,tv=t=>"number"==typeof t,t_=t=>"[object Object]"===Object.prototype.toString.call(t),tg=t=>"{}"===JSON.stringify(t),tI=t=>t+"-"+td()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12),ty=function(t,e,r){return void 0===r&&(r="-"),""+t+r+e},tm=()=>new Date(getTimestamp()+864e5),tE=t=>/^(0|([1-9]\d*))$/.test(""+t),tS=t=>t,tb=t=>tS(t),tO=t=>void 0!==t.metric_name,tT=t=>"CompletePayment"===t||"Purchase"===t;function tR(t,e){var r,n=t;return function(){if(n){for(var i=arguments.length,o=Array(i),s=0;sZ(t),tP=t=>t?""+t+"::"+tx(20):tI("sessionId"),tA=()=>{for(var t=ts(td());27!==t.length;)t.length>27?t=t.slice(0,27):t+="_";return t},tN=t=>t?t.split("::")[0]:"",tC=()=>isDev()?"/static/config.js":CONFIG_URL,tD=(t,e)=>{if(0===Object.keys(t).length)return{};var r={identity_params:{}},n={email:["email_is_hashed","sha256_email"],phone_number:["phone_is_hashed","sha256_phone"],zip_code:["zip_code"]};return Y()(e).forEach(e=>{var[i,o]=e;o&&n[i]&&n[i].forEach(e=>{if(r.identity_params[e]=[tc.EMPTY_VALUE],t[e]){var n=t[e]||[tc.EMPTY_VALUE];r.identity_params&&(r.identity_params[e]=[...n])}})}),r},tw=(t,e)=>{var r={identity_params:{}};return 0===Object.keys(t).length?{}:(Y()(e).forEach(e=>{var[n,i]=e;if(i){if(t[n]&&t[n].length){var o=t[n]||[tc.EMPTY_VALUE];r.identity_params[n]=[...o]}else r.identity_params[n]=[tc.EMPTY_VALUE]}}),r)};function tk(t,e){var r=Object.assign({},t);return e.forEach(t=>{null!==r[t]&&void 0!==r[t]&&delete r[t]}),r}var tL=(t,e)=>{if(!t)return{};var r={};return Object.keys(t).forEach(n=>{e[n]&&(r[n]=t[n])}),r};function tM(){return(tM=_asyncToGenerator(function*(t){return void 0===t&&(t=500),new _Promise(e=>{setTimeout(()=>{e(!0)},t)})})).apply(this,arguments)}var tU=t=>{var e=null.some(e=>t.matches(e)),r=null.some(e=>t.matches(e));return e&&!r};function tj(t,e){var r={};return t&&(th(t)||tv(t)?r.external_id=t.toString():t_(t)&&(r=t)),e&&t_(e)&&Object.assign(r,e),r}var tF=t=>{for(var e,r=Array.prototype.slice.call(document.getElementsByTagName("script")),n=0;n-1){e=i;break}}return e},tH=t=>{var e=t.parentElement;return!!e&&("HEAD"===e.tagName||tH(e))},tB=(t,e)=>{for(var r=[document.body],n=0;n<=t&&r.length;){var i,o=r.pop();if(o===e)return!0;if((null==o?void 0:o.tagName.toLowerCase())==="script"&&(null==(i=o.src)?void 0:i.indexOf(SDK_HOSTNAME))>-1)continue;if(n++,"object"==typeof o&&!!o.children)for(var s=o.children.length-1;s>=0;s--)_pushInstanceProperty(r).call(r,o.children[s])}return!1},tG=t=>tB(10,t),tV=t=>function(){for(var e=arguments.length,r=Array(e),n=0;nt(...r))};/function WeakSet\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(WeakSet.toString()),/function WeakMap\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(WeakMap.toString());/function Date\(\) \{[\s\S]*\[native code\][\s\S]*\}/.test(Date.toString());var tK=function(t){return t.EXTERNAL="external",t.APP="app",t.TIKTOK="tiktok",t}({});Symbol.for("ID"),Symbol.for("type"),Symbol.for("partner"),Symbol.for("Options"),Symbol.for("Plugins"),Symbol.for("Rules"),Symbol.for("PixelRules"),Symbol.for("Info"),Symbol.for("extraParams"),Symbol.for("WebLibraryInfo"),Symbol.for("SignalType"),Symbol.for("IsOnsitePage");var tq=function(t){return t[t.OFFSITE=0]="OFFSITE",t[t.ONSITE=1]="ONSITE",t}({}),tW=()=>{var t;return(null==(t=D())||null==(t=t._env)?void 0:t.env)||tK.EXTERNAL},tJ=()=>{var t,e;return null!=(t=null==(e=D())?void 0:e._is_onsite)?t:tq.OFFSITE},tz=t=>(t||tW())!==tK.EXTERNAL,tX=t=>(t||tW())===tK.TIKTOK,tY=()=>{var t=k();return/windows phone/i.test(t)?g.WINDOWS_PHONE:/android/i.test(t)?g.ANDROID:/iPad|iPhone|iPod/.test(t)?g.IOS:g.PC},tZ=()=>{try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(t){return G().resolve({})}},tQ=()=>"android"===tY(),t$=()=>"ios"===tY(),t0=()=>window.top!==window;tR(()=>/open_news/i.test(k()));tR(()=>/ultralite/i.test(k()));var t1=()=>{try{return window&&window.top&&window.top.location.href,!1}catch(t){return!0}},t2=()=>{try{var t=new URL(decodeURIComponent(window.location.href)),e=/https?:\/\/[^\s/$.?#].[^\s]*/i;return e.test(t.search)||e.test(t.pathname)}catch(t){return!1}},t5=()=>{try{if(!t1())return K.NOT_CROSS_DOMAIN_IFRAME;if(t2())return K.URL_IN_QUERY_IFRAME;if(window.google_tag_manager)return K.GTM_IFRAME;if(window.name&&"web-pixel-sandbox"===window.name)return K.SANDBOX_IFRAME;return K.CROSS_DOMAIN_IFRAME}catch(t){return K.UNKNOWN_IFRAME}},t3=()=>w()?K.WEB_WORKER:t0()?t5():K.NORMAL,t6=()=>{var t=getUserAgent();if(!!t){for(var e of _Object$values(TT_APP_NAME))if(_includesInstanceProperty(t).call(t,e))return e}},t4=()=>{var t=getUserAgent();if(!!t){var e=t.match(/\bapp_version\/(\S*)/),r=e&&e[1]?e[1].match(/^\d+\.\d+\.\d+$/):void 0;if(r)return r[0];var n=_Object$values(TT_APP_NAME).join("|"),i=RegExp("\\b("+n+")_(\\d+\\.\\d+\\.\\d+)"),o=t.match(i);if(o)return o[2]}},t8=()=>{var t=getUserAgent();if(!!t)for(var e of Object.keys(TT_APP_NAME)){var r=RegExp("\\b"+TT_APP_NAME[e]+"_(\\S*)"),n=t.match(r),i=n&&n[1]?n[1].match(/^\d+\.\d+\.\d+$/):void 0;if(i)return i[0]}},t7=(t,e)=>{for(var r=t.split("."),n=e.split("."),i=0;is)return!1}return!0},t9=t=>{var e=t6();return void 0!==e&&t.has(e)},et=(t,e,r)=>{t.isBound(e)?t.rebind(e).toConstantValue(r):t.bind(e).toConstantValue(r)},ee=()=>{var t=D();return t&&t._i||{}},er=(t,e)=>{var{id:r,type:n=ReporterType.PIXEL_CODE,info:i,options:o={},plugins:s={},rules:a=[],pixel_rules:c=[]}=e,u=t.get(IDENTIFIER.TTQ),l=t.get(IDENTIFIER.TTQ_REPORTERS);if(!l.some(t=>t.getReporterId()===r)){et(t,DependencyTypes.ID,r),et(t,DependencyTypes.Type,n),et(t,DependencyTypes.Info,i||{[n]:r}),et(t,DependencyTypes.Options,o),et(t,DependencyTypes.Plugins,s),et(t,DependencyTypes.Rules,a),et(t,DependencyTypes.PixelRules,c),u.enableFirstPartyCookie((null==i?void 0:i.firstPartyCookieEnabled)||!1);var f=t.get(IDENTIFIER.REPORTER);if(s){var{AdvancedMatching:p,AutoAdvancedMatching:d}=s,h={};p&&Object.assign(h,p),d&&Object.assign(h,d),f.setAdvancedMatchingAvailableProperties(h)}return f.on(ORIGIN_EVENT_TYPES.BEFORE_REPORT,(t,e,r,n,i)=>{u.dispatch(JELLY_CYCLE.PIXEL_SEND,t,e,r,n,i)},{}),_pushInstanceProperty(l).call(l,f),t.rebind(IDENTIFIER.TTQ_REPORTERS).toConstantValue(l),u.dispatch(JELLY_CYCLE.PIXEL_DID_MOUNT,f),f}},en=(t,e)=>(["getReporter","usePlugin","getPlugin","resetCookieExpires"].forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),i=0;i{var{_partner:r,_ttp:n,_self_host_config:i,_usd_exchange_rate:o,_legacy:s,_cc:a,_variation_id:c,_vids:u,_server_unique_id:l,_currency_list:f,_plugins:p,_aam:d,_auto_config:h,_cde:v,_csid_config:_,_ttls_config:g}=t||{};return Object.assign(e,{partner:r,ttp:n,cc:a,self_host_config:i,usd_exchange_rate:o,legacy:s,variation_id:c,vids:u,server_unqiue_id:l,currency_list:f,plugins:p,aam:d,auto_config:h,cde:v,cookieBasedSessionConfig:_,localServiceConfig:g}),e},eo=t=>{try{var e=getGlobalTtq();[...CONSENT_API,...IDENTITY_API].forEach(r=>{e.find((n,i)=>{var[o,...s]=n;if(o===r)return t[r].apply(t,s),e.splice(i,1),!0})})}catch(t){error(MONITOR_EVENT.API_ERROR,t,{extJSON:{api:"handleP0APICache"}})}},es=t=>{var e=getGlobalTtq();if(e.length>0)for(;e.length;){var r=e.shift();if(!!r){var[n,...i]=r;switch(!containPartner("Tealium")&&setInstanceCache(n,i),n){case"identify":t.identify(i[0],i[1]);break;case"page":t.page(i[0]);break;case"track":t.track(i[0],i[1],i[2]||{});break;case"enableCookie":t.enableCookie();break;case"disableCookie":t.disableCookie();break;case"holdConsent":t.holdConsent();break;case"revokeConsent":t.revokeConsent();break;case"grantConsent":t.grantConsent()}}}},ea=function(t){void 0===t&&(t={});var e=Object.assign({},{path:"/"},t);"number"==typeof e.expires&&(e.expires=new Date(td()+864e5*e.expires)),e.expires instanceof Date&&(e.expires=e.expires.toUTCString());var r="";for(var n in e){if(!e[n])continue;if(r+="; "+n,!0!==e[n])r+="="+e[n].split(";")[0]}return r},ec=t=>{if(t&&t.cde){var e=t.cde;return Object.assign({},y,{expires:e})}return y},eu=0,el=0,ef=t=>{var e={};return document.cookie.split(";").forEach(t=>{var r,n=t.split("=");e[_trimInstanceProperty(r=n[0]).call(r)]=n.slice(1).join("=")}),e[t]||""},ep=t=>{if(0===document.cookie.length)return"";var e=ef(t);return e?unescape(e):""},ed=/^\d{13}$/,eh=(t,e)=>{if(!t)return"";var r=ed.test(String(e))?"."+e:"";return t.split(".")[0]+".tt."+(isShopifySite()?0:eg())+r},ev=t=>{var e=t.split(".");return e.length>=3&&c()(e).call(e,"tt")&&""!==e[2]&&!isNaN(Number(e[2]))&&Number(e[2])>=0},e_=t=>{if(!!ev(t)){var e=t.split(".")[3];return ed.test(e||"")?Number(e):void 0}},eg=()=>{if(eu)return eu;var t=ep(TTP_COOKIE_KEY);return t&&ev(t)?Number(t.split(".")[2]):0},eI=(t,e,r,n)=>(t===TTP_COOKIE_KEY&&!ev(e)&&(e=eh(e,n)),document.cookie=t+"="+e+transformCookieOption(r),e===ep(t));class ey{getCookie(t){var e=this;return z()(function*(){var{browser:r}=e.sandboxPixelAPI,n="";try{n=yield r.cookie.get(t)}catch(e){try{n=yield r.cookie.get(t)}catch(t){}}return n||""})()}parseCookies(){var t=this;return z()(function*(){var e=yield t.getCookie(""),r={},n=e.split("; ");if(!e)return r;for(var i of n){var[o,s]=i.split("=");r[o]=decodeURIComponent(s)}return r})()}setCookieHandler(t,e,r){var n=this;return z()(function*(){try{var{browser:i,getShopifyPageInfo:o}=n.sandboxPixelAPI,{location:s}=o(),a=s.hostname||"";return yield i.cookie.set(t+"="+e+ea(Object.assign({},r||n.cookieExpireOption,{domain:"."+a})))}catch(t){}return""})()}setCookie(t,e,r){var n=this;return z()(function*(){var{getShopifyPageInfo:i}=n.sandboxPixelAPI,o=yield n.parseCookies();if(0===Object.keys(o).length||!o[t])return yield n.setCookieHandler(t,e,r),e;var{referrer:s}=i();return!s||s.indexOf("www.tiktok.com")>0?o[t]:(yield n.setCookieHandler(t,e,r),e)})()}genCookieID(){return tA()}enableFirstPartyCookie(t){var e=this;return z()(function*(){if(!t)return"";var r=yield e.parseCookies(),n=r[p]||"",i=r[d]||"";e.initCookie=n||i;var o=n||i||e.genCookieID();return yield e.setAnonymousId(o)})()}setAnonymousId(t){var e=this;return z()(function*(){var r=yield e.parseCookies(),n=r[p]||r[d]||"",i=n||t;if(!i)return"";var o=e_(i)||(n?void 0:td());return(yield e.setCookie(p,e.convertToNewTtpCookieFormat(i,o),e.cookieExpireOption))||""})()}convertToNewTtpCookieFormat(t,e){var r=/^\d{13}$/.test(String(e))?"."+e:"";return t.split(".")[0]+".tt.0"+r}verifyCookieWhenReport(t){var e=this;return z()(function*(){var{context:r}=t,n=null==r||null==(s=r.user)?void 0:s.anonymous_id;if(!!n){var i=(yield e.parseCookies())[p]||"",o=i.split(".")[0];if(o&&n.split(".")[0]!==o){var s,a,c=e.convertToNewTtpCookieFormat(o,e_(i)),l=self[self[u]]||[];t.context.user.anonymous_id=c,null==l||null==(a=l.context)||a.setUserInfoWithoutIdentifyPlugin({anonymous_id:c}),setTimeout(()=>{R(S.CUSTOM_INFO,{custom_name:"sandbox_cookie_conflicts",extJSON:{event:t.event,event_id:t.event_id,message_id:t.message_id,message:o+":"+n+":"+e.initCookie}})})}}})()}constructor(t,e){this.sandboxPixelAPI=void 0,this.cookieExpireOption=void 0,this.initCookie=void 0,this.sandboxPixelAPI=t,this.cookieExpireOption=ec(e),this.initCookie=""}}class em{fetch(t,e,r,n,i,o){return z()(function*(){return self.fetch(t,{method:e,credentials:i||"omit",body:JSON.stringify(r||{}),headers:n}).then(()=>!0).catch(t=>(o&&x(S.CUSTOM_ERROR,t,{custom_name:o}),!1))})()}send(t,e){var r=this;return z()(function*(){return r.fetch(t,"POST",e)})()}}class eE{getAdInfo(){return G().resolve({})}getAppInfo(){return G().resolve({})}send(){return G().resolve({})}}class eS{pushPreposition(t){var e;O()(e=this.reportPreTasks).call(e,t)}report(t,e,r,n){return z()(function*(){return G().resolve()})()}constructor(t,e,r){this.httpService=void 0,this.bridgeService=void 0,this.reportPreTasks=void 0,this.httpService=t,this.bridgeService=e,this.reportPreTasks=r}}var eb=function(t){return t.LDU="limited_data_use",t.EVENTID="eventID",t.EVENT_ID="event_id",t}({}),eO=function(t){return t[t.defaultReport=0]="defaultReport",t[t.httpReport=1]="httpReport",t[t.htmlHttpReport=2]="htmlHttpReport",t}({}),eT=function(t){return t[t.P0=0]="P0",t[t.P1=1]="P1",t[t.P2=2]="P2",t}({}),eR="https://analytics.tiktok.com/api/v2",ex=eR+"/pixel",eP=eR+"/performance",eA=eR+"/interaction",eN=eR+"/performance_interaction",eC=eR+"/pixel/perf",eD=eR+"/pixel/inter",ew=eR+"/pixel/act",ek=eR+"/shopify_pixel",eL=eR+"/monitor",eM="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",eU="_toutiao_params",ej=r("5880"),eF=r.n(ej),eH=t=>{var e=Array(t.length),r=0;return new(G())((n,i)=>{for(var o=function(i){var o=t[i];o&&"function"==typeof o.then?o.then(o=>{e[i]={status:"fulfilled",value:o},++r===t.length&&n(e)}).catch(o=>{e[i]={status:"rejected",reason:o},++r===t.length&&n(e)}):(e[i]={status:"fulfilled",value:o},++r===t.length&&n(e))},s=0;s"function"==typeof eF()?eF()(t):eH(t),eG=function(t){return t[t.PENDING=0]="PENDING",t[t.FULFILLED=1]="FULFILLED",t}(eG||{});class eV{push(t){var e;this.status=eG.PENDING,O()(e=this.promiseQueue).call(e,t)}then(t){return this.status===eG.FULFILLED?G().resolve(t()):eB(this.promiseQueue).then(()=>(this.status=eG.FULFILLED,t()))}constructor(){this.promiseQueue=[],this.status=eG.FULFILLED}}class eK extends eS{report(t,e,r){var n=this;return z()(function*(){void 0===r&&(r=eO.defaultReport);var i=t===ek;return(t!==eL&&(yield n.cookieService.verifyCookieWhenReport(e)),i)?(!(yield n.httpService.fetch(t,"POST",e,{},"include","sandbox_req_err"))&&n.httpService.fetch(ex,"POST",e,{"Content-Type":"application/json"},"omit","sandbox_send_err"),G().resolve()):(n.httpService.send(t,e),G().resolve())})()}constructor(t,e,r){super(t,e,new eV),this.httpService=void 0,this.cookieService=void 0,this.httpService=t,this.cookieService=r}}var eq={cachedReferrer:"",cachedTitle:"",cachedHref:"",timer:null};function eW(t,e){try{var r=new URL(t),n=r.searchParams.getAll(e);if(0!==n.length)return n[n.length-1]||"";return new URLSearchParams(r.hash).get(e)||""}catch(t){return""}}var eJ=(t,e,r)=>{try{var n=eW(e,t);if(n)return n;return eW(r||"",t)}catch(t){}return""};function ez(){eq.cachedHref=window.location.href,eq.cachedReferrer=document.referrer,eq.cachedTitle=document.title,eq.timer&&clearTimeout(eq.timer),eq.timer=setTimeout(()=>{eq.cachedHref="",eq.cachedReferrer="",eq.cachedTitle="",eq.timer=null},3e3)}var eX=()=>{if(!t0())return(window.location.href!==eq.cachedHref||null===eq.timer)&&ez(),{url:eq.cachedHref,referrer:eq.cachedReferrer,title:eq.cachedTitle};if(!t1()){var t,e,r;return{url:(null==(t=window)||null==(t=t.top)?void 0:t.location.href)||"",referrer:(null==(e=window)||null==(e=e.top)?void 0:e.document.referrer)||"",title:(null==(r=window)||null==(r=r.top)?void 0:r.document.title)||""}}if((null===eq.timer||window.location.href!==eq.cachedHref)&&ez(),/doubleclick\.net/.test(window.location.hostname)){var n=window.location.pathname,i={};return n.split(";").forEach(t=>{var[e,r]=t.split("=");e&&r&&(i[e]=decodeURIComponent(r))}),{url:i["~oref"]||eq.cachedHref,referrer:eq.cachedReferrer,title:eq.cachedTitle}}return{url:eq.cachedHref,referrer:eq.cachedReferrer,title:eq.cachedTitle}},eY=t=>{var e;return(null==t||null==(e=t.localServiceConfig)?void 0:e.key)||m},eZ=/^\d{13}$/,eQ=t=>{var e=t.lastIndexOf("."),r=t.slice(e+1);return e<=0||!eZ.test(r)?{clickId:t}:{clickId:t.slice(0,e),observedAt:Number(r)}},e$=(t,e)=>t?e&&eQ(e).clickId===t?e:t+"."+td():"",e0=(t,e)=>{try{var r=eJ("ttclid",t,e),n=r?e$(r):void 0,i=eJ("ext_params",t,e)||void 0,o=eJ(eU,t,e)||void 0,s=parseInt(eJ("ttuts",t,e),10)||void 0,{log_extra:a,idc:c,cid:u}=o?JSON.parse(o):{};return{callback:n,ext_params:i,log_extra:a,creative_id:u,idc:c,ttuts:s,ad_info_from:(a||c||u)&&"url"}}catch(t){return{}}},e1=(t,e)=>{try{var{log_extra:r,ttuts:n}=t;if(!t$())return!0;if(!tX(e)){if(null!=n)return 1!==n;return!0}if(r){var i=JSON.parse(r);return 1!==i.user_tracking_status}if(null===t.ATTStatus||void 0===t.ATTStatus)return!0;return 3===t.ATTStatus}catch(t){return!1}},e2=(t,e)=>{var r={};try{var{creative_id:n,callback:i,idc:o,convert_id:s,ad_info_from:a,ad_info_status:c,log_extra:u,ext_params:l,ATTStatus:f}=t;if(n&&(r.creative_id=n),o&&(r.idc=o),s&&(r.convert_id=s),a&&(r.ad_info_from=a),c&&(r.ad_info_status=c),l&&(r.ext_params=l),f&&(r.ATTStatus=f),u){var{ad_user_agent:p,ad_id:d,rit:h,ocbs:v,vid:_,idc:g,country_id:I}=JSON.parse(u);d&&(r.ad_id=d),h&&(r.rit=h),p&&(r.ad_user_agent=p),v&&(r.ocbs=v),_&&(r.vid=_),g&&(r.idc=g),I&&(r.country_id=I)}return r}catch(t){return e&&e(t),r}};class e5{getAdInfoFromCache(){var t=this;return z()(function*(){var e={};if(!t.sandboxPixelAPI)return e;try{var{getSessionStorageInSandbox:r}=t.sandboxPixelAPI,n=JSON.parse((yield r(l))||"{}");t_(n)&&Object.keys(n).length>0&&(n.ad_info_from="cache",n.ad_info_status="fulfilled(cache)"),Object.assign(e,n)}catch(t){x(S.INIT_ERROR,t,{extJSON:{position:"initAdInfo"}})}return e})()}getAdInfo(t,e){var r=this;return z()(function*(){var n={};if(!r.sandboxPixelAPI&&!t)return n;try{var{getShopifyPageInfo:i,setSessionStorageInSandbox:o}=r.sandboxPixelAPI,{referrer:s,location:a}=i(),c=e0(t||a&&a.href||"",e||s||"");Object.assign(n,c),r.sandboxPixelAPI&&n&&(n.creative_id&&n.log_extra||n.callback)&&(yield o(l,JSON.stringify(n)))}catch(t){x(S.INIT_ERROR,t,{extJSON:{position:"initAdInfo"}})}return n})()}constructor(t){this.sandboxPixelAPI=void 0,this.sandboxPixelAPI=t}}class e3{getAppInfo(t,e){var r=this;return z()(function*(){var n={};if(!r.sandboxPixelAPI||!t&&!e)return n;Object.assign(n,r.getAppInfoFromURL(t,e));try{var{getSessionStorageInSandbox:i,setSessionStorageInSandbox:o}=r.sandboxPixelAPI,s=JSON.parse((yield i(f))||"{}");if(Object.keys(s).length>0)return s;if(n.platform=tY(),tQ()){var{model:a,platformVersion:c}=yield tZ();n.device_model=a,n.android_version=c}!tg(n)&&(yield o(f,JSON.stringify(n)))}catch(t){x(S.INIT_ERROR,t,{extJSON:{position:"initAppInfo"}})}return n})()}getAppInfoFromURL(t,e){try{var r=eJ(eU,t,e),{device_id:n,uid:i}=r&&JSON.parse(r);return{device_id:n,user_id:i}}catch(t){return{}}}constructor(t){this.sandboxPixelAPI=void 0,this.sandboxPixelAPI=t}}var e6=r("6762"),e4=r.n(e6),e8=function(t){return t.INIT_START="initStart",t.INIT_END="initEnd",t.PATCH_END="patchEnd",t.CONTEXT_INIT_START="contextInitStart",t.CONTEXT_INIT_END="contextInitEnd",t.PAGE_URL_WILL_CHANGE="pageUrlWillChange",t.PAGE_URL_DID_CHANGE="pageUrlDidChange",t.PAGE_DID_LOAD="pageDidLoad",t.PAGE_WILL_LEAVE="pageWillLeave",t.PAGE_LCP="pageLcp",t.AD_INFO_INIT_START="adInfoInitStart",t.AD_INFO_INIT_END="adInfoInitEnd",t.BEFORE_AD_INFO_INIT_START="beforeAdInfoInitStart",t.PIXEL_SEND="pixelSend",t.PIXEL_DID_MOUNT="pixelDidMount",t.SESSION_START="sessionStart",t}({}),e7=function(t){return t.UNKNOWN="-1",t.LOADING="0",t.INTERACTIVE="1",t.COMPLETE="2",t}({}),e9=function(t){return t.INTER_ID_TRIGGER="inter_id",t.ORIGIN_TRIGGER="origin_trigger",t}({}),rt=(t,e)=>{var r;return!!(null!=e&&null!=(r=e.cookieBasedSessionConfig)&&r.enable&&t.firstPartyCookieEnabled&&!1!==t.csidEnabled)},re=()=>{var t=new Date().getTime();return{sessionId:t.toString()+"::"+tx(20),sessionCount:1,lastEventTS:t,isSessionStart:!0,hasReportedES:0}},rr=t=>{var e={};return t.split("; ").forEach(t=>{var[r,n]=t.split("=");if(r.startsWith(_)){var i=r.replace(_,"").replace("_",""),o=n.split("::"),[s,a,c,u]=(o[0]+"::"+o[1]).split("."),l="";2!==o.length&&""===i&&(l=o.splice(2).join("::")),s&&tE(a)&&tE(c)&&(e[i]=W()({sessionId:s,sessionCount:Number(a),lastEventTS:Number(c),hasReportedES:Number("1"===u?1:0)},l&&{inter_id:l}))}}),e},rn=function(t,e){void 0===e&&(e=e9.ORIGIN_TRIGGER);var{sessionCount:r,lastEventTS:n}=t,i=td();return i-n>18e5?{sessionId:i.toString()+"::"+tx(20),sessionCount:r+1,lastEventTS:i,isSessionStart:!0}:W()({},t,{lastEventTS:e===e9.INTER_ID_TRIGGER?n:i,isSessionStart:!1})},ri=t=>{var{sessionId:e,sessionCount:r,lastEventTS:n,hasReportedES:i,inter_id:o}=t;return e+"."+r+"."+n+"."+(null!=i?i:0)+(o?"::"+o:"")},ro=(t,e,r)=>{var{sessionId:n="",sessionCount:i=1,isSessionStart:o=!1}=t||{};return Object.assign({csid:n,page_csid:e?e.sessionId:"",csct:i},o?{css:1}:{},r?{pixel_code:r}:{})};class rs{getParameterInfo(){return G().resolve({pixelCode:this.pixelCode,name:this.name,status:this.status,setupMode:this.setupMode,advertiserID:this.advertiserID,partner:this.partner,is_onsite:!1,advancedMatchingAvailableProperties:{}})}getReporterId(){return""}getReporterUniqueLoadId(){return""}getReporterPartner(){}getReporterInfo(){return{reporter:{}}}getReportResultSet(){return[]}isOnsite(){return!1}isPartnerReporter(){return!1}setAdvancedMatchingAvailableProperties(t){}clearHistory(){}page(t){}identify(t,e){}track(t,e,r){return G().resolve(null)}getUserInfo(t){return{}}getReporterMatchedUserFormatInfo(){return{}}getReporterMatchedUserFormatInfoV2(){return{}}assemblyData(){return{event:"",message_id:"",event_id:"",is_onsite:!1,properties:{},context:{ad:{},device:{},library:{name:"",version:""},page:{url:""},pageview_id:"",session_id:"",variation_id:"",user:{}},partner:"",timestamp:""}}assemblySelfHostData(){return this.assemblyData()}trackSync(){}getReportEventHistoryKey(t){return"tiktok"}hasReportEventHistory(t,e){return!1}getCookieBasedSession(){return re()}setCookieBasedSession(t){}constructor(t){this.pixelCode="",this.loaded=!1,this.status=1,this.name="",this.advertiserID="",this.setupMode=0,this.partner="",this.reporterInfo={},this.plugins={},this.options={},this.rules=[],this.pixelCode=t}}new rs("empty");class ra{init(t,e){this.initContextInfo(t,e),this.initialize=!0}initContextInfo(t,e){this.dispatch(e8.CONTEXT_INIT_START),this.initAdInfo(t,e),this.initAppInfo(t,e),this.initLocalServiceInfo(),this.reportService.pushPreposition(G().resolve().then(()=>this.initUserInfo())),this.initTestId(t,e),this.dispatch(e8.CONTEXT_INIT_END)}setPageIndex(t){}setPageInfo(t,e){var r=this.context.getPageInfo().url;if(r!==t){this.dispatch(e8.PAGE_URL_WILL_CHANGE,e||r,t);var n=this.context.setPageInfo(t,e||r);(null==n?void 0:n.pageIndex)&&this.setPageIndex(n.pageIndex),this.dispatch(e8.PAGE_URL_DID_CHANGE,t,r)}}initAdInfo(t,e){}initOffsiteAdInfo(t){}initAppInfo(t,e){}initUserInfo(){}initTestId(t,e){}usePlugin(t){try{if(!this.plugins.find(e=>e.name===t.name)){O()(e=this.plugins).call(e,t);var e,r=t.name;r&&(this[r[0].toLowerCase()+r.slice(1)+"Plugin"]=t)}}catch(t){}}useObserver(t){try{if(!this.observers.find(e=>e.name===t.name)){O()(e=this.observers).call(e,t);var e,r=t.name;r&&(this[""+(r[0].toLowerCase()+r.slice(1))]=t)}}catch(t){}}getPlugin(t){return this.plugins.find(e=>e.name===t)||null}getReporter(t){return this.reporters.find(e=>e.getReporterId()===t)}instance(t){var e=this.getReporter(t);return e?e:(x(S.PIXEL_EMPTY,Error(""),{pixelCode:t}),new rs(t))}instances(){return this.reporters}identify(t,e){var r=tj(t,e);this.context.setUserInfo(r,e)}page(t){t.url!==this.context.getPageInfo().url&&(this.setPageInfo(t.url,t.referrer),this.reporters.forEach(t=>{t.clearHistory()}));var e=Object.assign({},t);delete e.url,delete e.referrer,this.reporters.forEach(t=>{t.page(e)})}isOnsitePage(){return this.context.getSignalType()===tq.ONSITE||this.reporters.every(t=>t.isOnsite())}track(t,e,r){void 0===e&&(e={}),void 0===r&&(r={}),this.instances().forEach((n,i)=>{n.track(t,e,Object.assign({_i:i},r))})}dispatch(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n{if("function"==typeof e[t])try{e[t].apply(e,r)}catch(n){x(S.PLUGIN_ERROR,n,{extJSON:{plugin_name:e.name,cycle_name:t,data:r}})}})}getAllReportResultSet(){var t;return e4()(t=this.instances()).call(t,(t,e)=>t.concat(e.getReportResultSet()),[])}resetCookieExpires(){}enableCookie(){}disableCookie(){}enableFirstPartyCookie(t){}holdConsent(){}revokeConsent(){}grantConsent(){}initLocalServiceInfo(){}constructor(t,e,r,n){this.context=void 0,this.reportService=void 0,this.initialize=!1,this.plugins=[],this.observers=[],this.reporters=[],this.emitter=void 0,this.sensitiveRedactor=void 0,this.context=t,this.reportService=e,r&&(this.emitter=r),n&&(this.sensitiveRedactor=n)}}var rc=function(t){return t.BEFORE_REPORT="beforeReport",t.QUEUE="queue",t}({}),ru=function(t){return t.URL_CHANGE="url_change",t.COOKIE_TTCSID_CHANGE="cookie_ttcsid_change",t.HANDLE_CACHE="handle_cache",t.LCP="lcp",t}({}),rl=function(t){return t.UPDATE_CONFIG="observer:updateConfig",t}({});class rf{initStart(){}initEnd(){}adInfoInitStart(){}adInfoInitEnd(){}contextInitStart(){}contextInitEnd(){}pageUrlWillChange(t,e){}pageUrlDidChange(t,e){}pageDidLoad(){}pageWillLeave(t){}pageLcp(t){}pixelSend(t,e,r,n,i){}pixelDidMount(t){}sessionStart(t,e){}patchEnd(){}constructor(t){var{name:e,context:r,reporters:n}=t;this.context=void 0,this.reporters=[],this.name=void 0,this.context=r,this.reporters=n,this.name=e}}class rp extends rf{}var rd=String.fromCharCode.bind(String),rh=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),rv=t=>{for(var e,r,n,i,o="",s=t.length%3,a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw TypeError("invalid character found");e=r<<16|n<<8|i,o+=rh[e>>18&63]+rh[e>>12&63]+rh[e>>6&63]+rh[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o},r_=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?rd(192|e>>>6)+rd(128|63&e):rd(224|e>>>12&15)+rd(128|e>>>6&63)+rd(128|63&e)}var r=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return rd(240|r>>>18&7)+rd(128|r>>>12&63)+rd(128|r>>>6&63)+rd(128|63&r)},rg=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,rI=t=>t.replace(rg,r_),ry=t=>t.replace(/=/g,"").replace(/[+\/]/g,function(t){return"+"===t?"-":"_"}),rm=t=>ry(rv(rI(t))),rE=t=>rm(t),rS=t=>rE(JSON.stringify(t)),rb=function(t){return t[t.NOT_DETERMINED=0]="NOT_DETERMINED",t[t.RESTRICTED=1]="RESTRICTED",t[t.DENIED=2]="DENIED",t[t.AUTHORIZED=3]="AUTHORIZED",t}({}),rO=function(t){return t[t.OTHER=0]="OTHER",t[t.ANDROID=1]="ANDROID",t[t.IOS=2]="IOS",t}({}),rT=[S.LOAD_START,S.LOAD_END,S.INIT_START,S.INIT_END,S.JSB_INIT_START,S.JSB_INIT_END,S.AD_INFO_INIT_START,S.AD_INFO_INIT_END,S.IDENTIFY_INIT_START,S.IDENTIFY_INIT_END,S.PLUGIN_INIT_START,S.PLUGIN_INIT_END],rR=[S.BEFORE_INIT,S.INIT_START,S.INIT_END,S.HTTP_SEND,S.AD_INFO_INIT_END],rx=t=>rR.indexOf(t)>-1,rP="Monitor";class rA extends rp{reportSwitch(){return!this.reporters.some(t=>{var e;return(null==(e=t.options)?void 0:e.monitor)===!1})}recordReportLog(t){var e,r=t.pixel_code;!this.hasReportMap[r]&&(this.hasReportMap[r]=[]),O()(e=this.hasReportMap[r]).call(e,t)}send(t,e){var r=this;return z()(function*(){!(yield r.httpService.send(t,e))&&r.httpService.sendByImage&&r.httpService.sendByImage(t,{log_message:rS(e)})})()}sendByReportService(t){var e=rx(t.metric_name);this.reportService.report(eL,t,e?eO.defaultReport:eO.htmlHttpReport,e?eT.P0:eT.P1)}report(t,e){if(void 0===e&&(e=!1),this.recordReportLog(t),e){this.send(eL,t);return}if(!this.contextInitEndStatus){var r;O()(r=this.cachedData).call(r,t);return}this.sendByReportService(t)}contextInitEnd(){for(this.contextInitEndStatus=!0;this.cachedData.length;){var t=this.cachedData.shift();t&&null!=t.metric_name&&this.sendByReportService(t)}}info(t,e,r,n){if(void 0===e&&(e={}),void 0===r&&(r=!1),void 0===n&&(n=!1),!!this.reportSwitch()&&!!j("Monitor")||!!n)try{var i=this.assemblyBaseData(t,e);if(this.isRepeatLog(i))return;this.report(i,r)}catch(t){}}error(t,e,r,n){if(void 0===r&&(r={}),void 0===n&&(n=!1),!!this.reportSwitch()&&!!j("Monitor"))try{var i=this.assemblyBaseData(t,r);if(Object.assign(i.ext_json||{},{message:e.message,stack:e.stack}),this.isRepeatLog(i))return;this.report(i,n)}catch(t){}}isRepeatLog(t){var{pixel_code:e,metric_name:r}=t;if(!e||!r)return!1;var n=rT.some(t=>r.indexOf(t)>-1),i=this.hasReportMap[e],o=i&&i.some(t=>t.metric_name===r);return n&&o}getReportInfo(t){var e=this.reporters.find(e=>e.getReporterId()===t);if(e)return e.reporterInfo;var r=D()._i[t];if(r)return r.info}assemblyBaseData(t,e){var{pixelCode:r,extJSON:n,custom_name:i,custom_enum:o,app_name:s="",latency:a=0}=e||{},u=D(),{env:l="",platform:f,context:p,reporters:d}=this,{libraryInfo:h,pageInfo:v,adInfo:_,pageSign:g,enableAdTracking:I}=p.getAllData(),y=p.getVariationId(),m=p.getVids(),E=this.legacy||[],S=_&&_.log_extra&&function(t){try{return JSON.parse(t)}catch(t){return{}}}(_.log_extra)||{},b=d.map(t=>t.getReporterId()),O=r||function(){var t={lib:"ttq",pixelCode:"MOCK_SHOP_ID"};try{var e=document&&document.currentScript,r=e&&e.getAttribute("data-id")||"",n=C()||"ttq";t={pixelCode:r,lib:n}}catch(e){t={lib:"ttq",pixelCode:""}}return t}().pixelCode||this.pixelCode||this.reporters[0]&&this.reporters[0].getReporterId()||Object.keys(u._i)[0]||"",T=this.getReportInfo(O),R=E.length?c()(E).call(E,O)?"legacy-ttq":"ttq":this.lib,x=U(O)||this.partner||"non",A=I?rb.AUTHORIZED:rb.DENIED,N={metric_name:t,pixel_code:O,platform:f,app_name:s||l,net_type:function(){try{var t=navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection);return t?t.effectiveType:""}catch(t){}return""}(),placement:S.placement||"non",lib:{lib_version:h&&h.version||"",ttq_name:R},in_iframe:Number(t3()),time_to_last_start:-1,time_to_navigation_start:-1,latency:a,page_url:v&&v.url||eX().url,att_status:A,pageview_id:this.context.getPageViewId()||"",session_id:g&&g.sessionId||"",variation_id:y,vids:m,load_id:T&&T.loadId||"",ad_id:String(_.ad_id),creative_id:String(_.creative_id||S.creative_id),user_agent:k(),pixel_monitor_version:"v2",custom_name:i,custom_enum:o,partner:x,ext_json:{performance:[],pixel_list:b.toString(),ad_info_from:_.ad_info_from,pixel_api_conflict_flag:P()}};return n&&Object.assign(N.ext_json,n),N}initStart(t){this.info(S.INIT_START,t)}initEnd(t){this.info(S.INIT_END,t)}jsbInitStart(){this.info(S.JSB_INIT_START)}jsbInitEnd(){this.info(S.JSB_INIT_END)}beforeAdInfoInitStart(t){this.info(S.BEFORE_AD_INFO_INIT_START,t)}adInfoInitStart(t){this.info(S.AD_INFO_INIT_START,t)}adInfoInitEnd(t){this.info(S.AD_INFO_INIT_END,t)}pluginInitStart(t){this.info(t+S.PLUGIN_INIT_START)}pluginInitEnd(t){this.info(t+S.PLUGIN_INIT_END)}constructor(t){super({name:rP,reporters:t.reporters,context:t.context}),this.env=void 0,this.lib=void 0,this.pixelCode=void 0,this.platform=void 0,this.hasReportMap={},this.cachedData=[],this.contextInitEndStatus=!1,this.reportService=void 0,this.httpService=void 0,this.partner=void 0,this.legacy=[],this.ttqOptions=void 0;var{pixelDetails:e,reportService:r,httpService:n,env:i,ttqOptions:o}=t;this.env=i,this.lib=e.lib,this.pixelCode=e.pixelCode,this.reportService=r,this.httpService=n,this.contextInitEndStatus=!1,this.platform=tQ()?rO.ANDROID:t$()?rO.IOS:rO.OTHER,this.partner=o.partner||"",o.legacy&&(this.legacy=o.legacy),this.ttqOptions=o}}var rN=r("1189"),rC=r.n(rN);class rD{init(t){this.userInfo={},this.adInfo={},this.appInfo={},this.pageInfo={url:"",referrer:""},this.pageSign={sessionId:"",pageId:""},this.libraryInfo=t}getAllData(){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,transactionId:this.transactionId}}getLibraryInfo(){return this.libraryInfo}setSignalType(t){this.signalType=t}getSignalType(){return this.signalType}setTestID(t){this.tt_test_id=t}getTestID(){return this.tt_test_id}setTransactionId(t){this.transactionId=t}getTransactionId(){return this.transactionId}setEnableAdTracking(t){this.enableAdTracking=t}getEnableAdTracking(){return this.enableAdTracking}setOffsiteAdInfo(t){this.offsiteAdInfo=Object.assign({},this.offsiteAdInfo,t)}getOffsiteAdInfo(){return this.offsiteAdInfo}getUserFormatInfo(){return this.userFormatInfo}setUserFormatInfo(t){void 0===t&&(t={}),Object.assign(this.userFormatInfo,t)}getUserFormatInfoV2(){return this.userFormatInfoV2}setUserFormatInfoV2(t){void 0===t&&(t={}),Object.assign(this.userFormatInfoV2,t)}setUserInfo(t,e){void 0===t&&(t={}),Object.assign(this.userInfo,t)}setUserInfoWithoutIdentifyPlugin(t){if(!!t)Object.assign(this.userInfo,t)}getUserInfo(){return this.userInfo}getAdInfo(){return this.adInfo}setAdInfo(t){if(!!t)this.adInfo?this.adInfo=Object.assign({},this.adInfo,t):this.adInfo=t}getAppInfo(){return this.appInfo}setAppInfo(t){if(!!t)this.appInfo=Object.assign({},this.appInfo,t)}getPageInfo(){return this.pageInfo}getPageSign(){return this.pageSign}setPageInfo(t,e){var r=W()({},this.pageInfo),n=W()({},this.pageSign);if(r.url!==t){var i=r.url;if(void 0!==r.url&&(r.referrer=r.url),void 0!==e&&(r.referrer=e),void 0!==n.pageIndex){var{index:o,sub:s,main:a}=n.pageIndex;n.pageIndex={index:++o,sub:++s,main:a}}return r.url=t,this.pageInfo=r,this.pageSign=n,{from:i,pageIndex:n.pageIndex}}}setPageInfoData(t){this.pageInfo=Object.assign({},this.pageInfo,t)}getSessionIdFromCache(){return null}setSessionIdToCache(t){}setSignalDiagnosticLabels(t){Object.assign(this.signalDiagnosticLabels,t)}getSignalDiagnosticLabels(){return this.signalDiagnosticLabels}getPageId(t){return void 0===t&&(t=""+td()),t+"-"+tx(5)}getPageViewId(){var{pageId:t,pageIndex:e}=this.pageSign;return""+t+(e?"."+e.main+"."+e.sub:"")}getVariationId(){return""}getVids(){return""}isLegacyPixel(t){return!1}initPageSign(){var t=this.getSessionIdFromCache();null===t&&(t=tI("sessionId"),this.setSessionIdToCache(t));var e=tI("pageId"),r={sessionId:t,pageId:e};this.pageSign=r}getPageCookieBasedSession(){return this.pageCookieBasedSession}setPageCookieBasedSession(t,e){return void 0===e&&(e=e9.ORIGIN_TRIGGER),t&&(this.pageCookieBasedSession=t),this.eventEmitter&&this.eventEmitter.emit(ru.COOKIE_TTCSID_CHANGE,this.pageCookieBasedSession),this.pageCookieBasedSession}constructor(t,e){this.userInfo=void 0,this.adInfo=void 0,this.appInfo=void 0,this.libraryInfo=void 0,this.pageInfo=void 0,this.pageSign=void 0,this.signalType=void 0,this.userFormatInfo={},this.userFormatInfoV2={},this.enableAdTracking=!0,this.offsiteAdInfo={},this.tt_test_id="",this.transactionId="",this.signalDiagnosticLabels=W()({},tp),this.pageCookieBasedSession=re(),this.userInfoFieldAllowlist={},this.eventEmitter=void 0,this.init(t),this.eventEmitter=e}}var rw=()=>self[self[u]]||[],rk=(t,e)=>{if(t===e)return!0;if(null==t||null==e||typeof t!=typeof e)return!1;if("object"==typeof t){var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var i of r)if(!c()(n).call(n,i)||!rk(t[i],e[i]))return!1;return!0}return t===e},rL=function(){var t=z()(function*(t,e,r,n){var i=re();return e&&(i=rn(e)),yield n.setCookieHandler(t?_+"_"+t:_,ri(i),ec(r)),i});return function(e,r,n,i){return t.apply(this,arguments)}}(),rM=()=>rw()._sapi||self._sapi||{},rU=()=>{try{var{init:t}=rM();return t&&t.context?t.context:{}}catch(t){return x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"get_context"}),{}}},rj=()=>{try{var{document:t}=rU();return{location:t&&t.location?t.location:{},referrer:t&&t.referrer?t.referrer:""}}catch(t){return{location:{href:""},referrer:""}}},rF=()=>{var t=rw();try{var{settings:e}=rM();return{lib:"ttq",pixelCode:e.pixelCode||""}}catch(e){return{lib:"ttq",pixelCode:Object.keys(t._i||{})[0]||""}}},rH=function(){var t=z()(function*(t,e){var{browser:r}=rM();try{return yield r.cookie.set(t,e),!0}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"set_cookie"})}return!1});return function(e,r){return t.apply(this,arguments)}}(),rB=function(){var t=z()(function*(t){var{browser:e}=rM();try{return yield e.cookie.get(t)}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"get_cookie"})}return""});return function(e){return t.apply(this,arguments)}}(),rG=function(){var t=z()(function*(t,e){var{browser:r}=rM();try{return yield r.localStorage.setItem(t,e),!0}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"set_local_storage"})}return!1});return function(e,r){return t.apply(this,arguments)}}(),rV=function(){var t=z()(function*(t){var{browser:e}=rM();try{return(yield e.localStorage.getItem(t))||""}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"get_local_storage"})}return""});return function(e){return t.apply(this,arguments)}}(),rK=function(){var t=z()(function*(t,e){var{browser:r}=rM();try{return yield r.sessionStorage.setItem(t,e),!0}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"set_session_storage"})}return!1});return function(e,r){return t.apply(this,arguments)}}(),rq=function(){var t=z()(function*(t){var{browser:e}=rM();try{return(yield e.sessionStorage.getItem(t))||""}catch(t){x(S.API_ERROR,t,{custom_name:"sandbox_api_error",custom_enum:"get_session_storage"})}return""});return function(e){return t.apply(this,arguments)}}(),rW=function(){var t=z()(function*(){var t=rw();t._cookie_promise=rB("").then(e=>(t._cookies=e,e))});return function(){return t.apply(this,arguments)}}(),rJ=function(){var t=z()(function*(t){var e=rw(),r=e._cookies;if(!r&&(r=yield e._cookie_promise,e._cookies=r),!t)return r;var n={};for(var i of r.split("; ")){var[o,s]=i.split("=");n[o]=decodeURIComponent(s)}return n[t]||""});return function(e){return t.apply(this,arguments)}}(),rz=r("7674"),rX=r.n(rz),rY={EMAIL_IS_HASHED:"email_is_hashed",PHONE_IS_HASHED:"phone_is_hashed"};class rZ extends rp{handleUserProperties(t,e){if(!!t)return Y()(t).forEach(e=>{var r,[n,i=""]=e;if(!!i){var o=String(i);if(c()(r=["email","phone_number","sha256_email","sha256_phone_number","zip_code"]).call(r,n))switch(n){case"email":t.email=this.sha256(rC()(o).call(o));break;case"phone_number":t.phone_number=this.sha256(this.handlePhoneNumber(o));break;case"first_name":t.first_name=this.sha256(o);break;case"last_name":t.last_name=this.sha256(o);break;case"zip_code":t.zip_code=this.isZipFromUs(t)?this.sha256(rC()(o).call(o).slice(0,5)):this.sha256(rC()(o).call(o));break;default:return}}}),delete t.country,{userProperties:t,userDataFormatV2:this.identifyParamsFormattedInfoV2(t),identifierLabel:this.genIdentifierLabelByUserProperties(e)}}identifyParamsFormattedInfoV2(t){var e={};return Y()(t).forEach(t=>{var r,n,[i,o=""]=t;switch(String(o),i){case"email":e[rY.EMAIL_IS_HASHED]=[],O()(r=e[rY.EMAIL_IS_HASHED]).call(r,tu.PLAIN_EMAIL);break;case"phone_number":e[rY.PHONE_IS_HASHED]=[],O()(n=e[rY.PHONE_IS_HASHED]).call(n,tu.PLAIN_PHONE)}}),e}genIdentifierLabelByUserProperties(t){var e={};return t?(t&&t.email&&Object.assign(e,{raw_email:{label:tf.valid}}),t&&t.phone_number&&Object.assign(e,{raw_phone:{label:tf.valid}}),e):e}pixelDidMount(t){1===this.reporters.length&&t.trackEnrichAM()}handlePhoneNumber(t){if(t.startsWith("+86")){var e=t.slice(3);if(11===e.length)return e}return t}isZipFromUs(t){var e;return(null==(e=t.country)?void 0:e.toLowerCase())==="us"}constructor(t,e){super({name:"Identify",reporters:e,context:t}),this.initialize=!1,this.sha256=void 0,this.sha256=t=>rX()(t).toString(),this.initialize=!0}}var rQ={main:-1,sub:-1,index:-1};class r$ extends rD{getSessionIdFromCacheInSandbox(){var t=this;return z()(function*(){var{browser:e}=t.sandboxPixelAPI,r="";try{var n=yield e.sessionStorage.getItem(h);r=n?JSON.parse(n):""}catch(t){try{var i=yield e.sessionStorage.getItem(h);r=i?JSON.parse(i):""}catch(t){}}return r})()}setSessionIdFromCacheInSandbox(t){return z()(function*(){try{var e=JSON.stringify(t);yield rK(h,e)}catch(t){}})()}getSessionIndex(){return z()(function*(){try{var t=yield rq(v),e=JSON.parse(t||"{}");if(e)return Object.assign({},rQ,e)}catch(t){}return rQ})()}getVariationId(){return this.globalTtqConfig.variation_id||""}getVids(){return this.globalTtqConfig.vids||""}isLegacyPixel(t){return M(t,this.globalTtqConfig.legacy||[])}initPageSign(){var t=this;return z()(function*(){var e=yield t.getSessionIdFromCacheInSandbox();!e&&(e=tP(t.globalTtqConfig.server_unqiue_id||""),yield t.setSessionIdFromCacheInSandbox(e));var r=t.getPageId(tN(e)),n=t.getVariationId(),i=t.getVids(),o=yield t.getSessionIndex();o.main++,t.pageSign={sessionId:e,pageId:r,variationId:n,vids:i,pageIndex:o},t.isInitPageSignPending=!1})()}setUserInfo(t){if(void 0===t&&(t={}),0!==Object.keys(t).length){var e={};Y()(t).forEach(t=>{var r,[n,i]=t;if(!!i)e[n]=rC()(r=String(i)).call(r)});try{var r,n=this.identifyPlugin.handleUserProperties(e,t);if(!n)return;var{userProperties:i,userDataFormatV2:o,identifierLabel:s={}}=n,a=this.getUserInfo(),u=rk(a,i);if(super.setUserInfo(Object.assign({},this.getUserInfo(),i)),this.setUserFormatInfoV2(Object.assign({},this.getUserFormatInfoV2(),o)),this.setSignalDiagnosticLabels(Object.assign({},this.getSignalDiagnosticLabels(),s)),u||0===Object.keys(this.getUserInfo()).length||1===Object.keys(e).length&&c()(r=Object.keys(e)).call(r,"external_id"))return;this.reporters&&this.reporters[0]&&this.reporters[0].trackEnrichAM()}catch(t){x(S.API_ERROR,t,{extJSON:{api:"identify"}})}}}constructor(t,e,r,n,i,o){super({name:"pixel.js",version:"2.2.0"}),this.sandboxPixelAPI=void 0,this.reportService=void 0,this.globalTtqConfig=void 0,this.reporters=[],this.identifyPlugin=void 0,this.initPageSignPromise=void 0,this.isInitPageSignPending=!0,this.cookieService=void 0,this.sandboxPixelAPI=t,this.reportService=e,this.globalTtqConfig=n,this.reporters=i,this.identifyPlugin=new rZ(this,i),tX(o)&&t$()&&(this.enableAdTracking=!1),this.initPageSignPromise=this.initPageSign(),this.cookieService=r}}var r0=[],r1="EnrichAM",r2="LandingPageView",r5={ViewContent:{ea:{name:"on_web_detail"},aliases:["ViewForm","ViewConsultationPage","ViewDownloadPage"]},Lead:{ea:{name:"form"},aliases:["SubmitForm"]},ClickButton:{ea:{name:"button"},aliases:["ClickInDownloadPage","ClickInConsultationPage","ClickForm"]},Download:{ea:{name:"download_start"},aliases:["ClickToDownload"]},Purchase:{ea:{name:"shopping"},aliases:["CompletePayment"]},Contact:{ea:{name:"consult"},aliases:["Consult","ConsultByPhone"]},StartTrial:{ea:{name:"start_trial"},aliases:[]},CompleteRegistration:{ea:{name:"on_web_register"},aliases:["Registration"]},AddToCart:{ea:{name:"on_web_cart"},aliases:[]},PlaceAnOrder:{ea:{name:"on_web_order"},aliases:["Checkout"]},AddPaymentInfo:{ea:{name:"add_billing"},aliases:["AddBilling"]},InitiateCheckout:{ea:{name:"initiate_order"},aliases:["StartCheckout"]},Search:{ea:{name:"on_web_search"},aliases:[]},AddToWishlist:{ea:{name:"on_web_add_to_wishlist"},aliases:[]},Subscribe:{ea:{name:"on_web_subscribe"},aliases:[]},FindLocation:{ea:{name:"FindLocation"},aliases:[]},Schedule:{ea:{name:"Schedule"},aliases:[]},CustomizeProduct:{ea:{name:"CustomizeProduct"},aliases:[]},SubmitApplication:{ea:{name:"SubmitApplication"},aliases:[]},ApplicationApproval:{ea:{name:"ApplicationApproval"},aliases:[]},Pageview:{ea:{name:"pageview"},aliases:[],skipIAB:!0}},r3=e4()(t=Y()(r5)).call(t,(t,e)=>{var[r,n]=e;return n.aliases.forEach(e=>{t[e]=r}),t},{});e4()(e=Y()(r5)).call(e,(t,e)=>{var[r,n]=e;return n.ea&&(t[r]=n.ea.name),t},{});var r6=function(t){return t.TRACK="track",t.PERFORMANCE="performance",t.INTERACTION="interaction",t.PCM="PCM",t.PERFORMANCE_INTERACTION="performance_interaction",t.SELFHOST="selfhost",t.AUTO_CONFIG="auto_config",t.PAGE="Pf",t.PAGE_PERFORMANCE="page_performance",t.PAGE_INTERACTION="page_interaction",t}({}),r4=["EnrichAM"];class r8 extends rp{isLPVSwitchOn(t){return t.plugins&&!0===t.plugins.EnableLPV}sessionStart(t,e){if(!!this.isLPVSwitchOn(t))try{t.trackInternalEvent(r2,{trigger_source:"pixel_self"},e,r6.TRACK,eO.defaultReport).catch(t=>{x(S.CUSTOM_ERROR,t,{custom_name:"shopify_lpv_report"})})}catch(t){x(S.CUSTOM_ERROR,t,{custom_name:"shopify_lpv_report"})}}constructor(t,e){super({name:"LPV",reporters:e,context:t})}}var r7="tt_pixel_ei6_tracked";class r9 extends rp{isEnrichIpv6Enable(){var{plugins:t}=this.globalTtqConfig||{};return!!t&&!!t.EnrichIpv6&&!!this.reporters&&0!==this.reporters.length&&this.reporters.every(t=>t&&t.plugins&&t.plugins.EnrichIpv6)}assemblyDataEnrichIpv6Data(t){return W()({},t,{event:"EnrichIpv6",trigger_event:t.event||"",message_id:t.message_id+"#source=1"})}trackEnrichIpv6ByEnrichAM(t){var e=this;return z()(function*(){if(e.hasReportedByEnrichAM)return;var{getSessionStorageInSandbox:r,setSessionStorageInSandbox:n}=e.sandboxPixelAPI,i=yield r(r7);if("true"!==i)e.hasReportedByEnrichAM=!0,yield n(r7,"true"),e.reportService.report(eM,e.assemblyDataEnrichIpv6Data(t))})()}pixelSend(t,e,r,n,i){void 0===n&&(n={}),setTimeout(()=>{if(!tz(this.env)&&!!this.isEnrichIpv6Enable()&&!!(r&&r.message_id))if(e===r1)this.trackEnrichIpv6ByEnrichAM(r);else{if(this.hasReported)return;var t=this.context.getPageSign();if(!t||!t.pageIndex||t.pageIndex.index)return;this.hasReported=!0,this.reportService.report(eM,this.assemblyDataEnrichIpv6Data(r))}})}constructor(t,e,r,n,i,o){super({name:"EnrichIpv6",reporters:r,context:e}),this.env=void 0,this.hasReported=void 0,this.hasReportedByEnrichAM=void 0,this.reportService=void 0,this.sandboxPixelAPI=void 0,this.globalTtqConfig=void 0,this.env=t,this.hasReported=!1,this.hasReportedByEnrichAM=!1,this.reportService=n,this.sandboxPixelAPI=i,this.globalTtqConfig=o}}class nt extends rA{contextInitEnd(){this.contextInitEndStatus=!0,setTimeout(()=>{for(T.info.forEach(t=>{this.info(t.event,t.detail,t.withoutJSB)}),T.error.forEach(t=>{this.error(t.event,t.err,t.detail,t.withoutJSB)}),T.info=[],T.error=[];this.monitorCachedData.length;){var t=this.monitorCachedData.shift();t&&this.reportSync(t,t.withoutJSB)}},0)}reportSync(t,e){if(void 0===e&&(e=!1),!this.contextInitEndStatus){var r;O()(r=this.monitorCachedData).call(r,t);return}this.reportService.reportPreTasks.then(()=>{var{event:r,detail:n,error:i}=t,{pixelCode:o}=rF(),s=this.assemblyBaseData(r,n);if(Object.assign(s,{pixel_code:o}),!this.isRepeatLog(s)){if(i&&Object.assign(s.ext_json||{},{message:i.message,stack:i.stack}),this.recordReportLog(s),e){this.send(eL,s);return}this.sendByReportService(s)}})}info(t,e,r){void 0===e&&(e={}),void 0===r&&(r=!1),setTimeout(()=>{if(!!this.reportSwitch())this.reportSync({event:t,detail:e,withoutJSB:r},r)},0)}error(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n=!1),setTimeout(()=>{if(!!this.reportSwitch())this.reportSync({event:t,detail:r,error:e,withoutJSB:n},n)},0)}constructor(t,e,r,n,i,o){super({pixelDetails:rF(),context:t,reporters:e,reportService:r,httpService:n,env:i,ttqOptions:o}),this.monitorCachedData=[]}}var ne={page_viewed:"Pageview",checkout_completed:"CompletePayment",checkout_started:"InitiateCheckout",payment_info_submitted:"AddPaymentInfo",product_added_to_cart:"AddToCart",product_viewed:"ViewContent",search_submitted:"Search",collection_viewed:"collection_viewed"},nr=t=>{var e={};for(var r in t)t.hasOwnProperty(r)&&("boolean"==typeof t[r]||t[r])&&(e[r]=t[r]);return e},nn=t=>Number(t||0).toFixed(2),ni=t=>t||"USD",no=t=>{var{product:e,sku:r,id:n}=t;return(e&&e.id||n||r||"")+""},ns=t=>t&&t.id?"product_group":"product",na=t=>Number(t||1),nc=t=>{var e;return(null==t||null==(e=t.customer)?void 0:e.isFirstOrder)?"new":"returning"},nu=function(t,e){if(void 0===e&&(e=!1),!t)return{};var r=t&&t.product||{},n=t&&t.price||{},i=t&&t.product&&t.product.vendor||"",o=!e&&t&&t.title||"",s=r&&r.title?r.title:"";return nr({content_id:no(t||{}),content_type:ns(r),content_name:""+s+(o?" - "+o:""),price:nn(n.amount),currency:ni(n.currencyCode),content_category:r.type||"",brand:i})},nl=function(t,e){void 0===e&&(e=!1);var{merchandise:r,quantity:n}=t,i={};return Object.assign(i,nu(r,e),{quantity:na(n)}),nr(i)},nf=(t,e)=>{var{lineItems:r=[],currencyCode:n,order:i}=e,o="payment_info_submitted"!==t?e&&e.subtotalPrice||{}:e&&e.totalPrice||{},s=[],a=0;return r.forEach(t=>{var e=t||{};O()(s).call(s,Object.assign(nu(e.variant,!0),{quantity:na(e.quantity)})),a+=na(e.quantity)}),nr(Object.assign({},{contents:s,currency:ni(n),quantity:a,value:nn(o.amount),order_id:(null==i?void 0:i.id)||"",customer_type:nc(i)}))};class np extends ra{initPlugins(){this.initializeMonitorPlugin(),this.context.identifyPlugin&&this.usePlugin(this.context.identifyPlugin),this.usePlugin(new r8(this.context,this.reporters)),this.usePlugin(new r9(this.env,this.context,this.reporters,this.reportService,this.sandboxPixelAPI,this.globalTtqOption))}initializeMonitorPlugin(){if(!this.monitorInitialized&&j(rP)){var t=new nt(this.context,this.reporters,this.reportService,this.httpService,this.env,this.globalTtqOption);this.usePlugin(t),this.monitorInitialized=!0}}initAdInfo(t){var e=this;this.dispatch(e8.BEFORE_AD_INFO_INIT_START),this.reportService.pushPreposition(z()(function*(){e.dispatch(e8.AD_INFO_INIT_START);var r={},n=yield e.adService.getAdInfoFromCache();Object.assign(r,Object.keys(n).length>0?n:yield e.adService.getAdInfo(t)),e.context.setAdInfo(r);var i=e2(r,t=>{x(S.INIT_ERROR,t,{extJSON:{position:"handleAdInfoOfficial"}})});e.context.setOffsiteAdInfo(i);var o=e1(r,e.env);e.context.setEnableAdTracking(o),e.dispatch(e8.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:o}})})())}initAppInfo(t){var e=this;this.reportService.pushPreposition(z()(function*(){var{getShopifyPageInfo:r}=e.sandboxPixelAPI,{location:n,referrer:i}=r(),o=yield e.appService.getAppInfo(t||n.href,i);return e.context.setAppInfo(o),o})())}initContextInfo(){var{location:t,referrer:e}=rj();super.initContextInfo(t.href,e)}initTestId(t){var e=this;return z()(function*(){!e.context.getTestID()&&e.reportService.pushPreposition(z()(function*(){var{getShopifyPageInfo:r,getInitialStageCookie:n}=e.sandboxPixelAPI,{referrer:i}=r(),o=t?eW(t,"tt_test_id"):"",s=i?eW(i,"tt_test_id"):"",a=yield n("tt_test_id"),c=o||s||a;c&&(e.context.setTestID(c),yield e.cookieService.setCookieHandler("tt_test_id",c,{expires:"session"}))})())})()}initSandboxUserInfo(){try{var{init:{data:{customer:t}}}=this.sandboxPixelAPI;if(!t||0===Object.keys(t).length)return;var e={email:t.email||"",phone_number:t.phone||""};this.identify(nr(e))}catch(t){x(S.CUSTOM_ERROR,t,{custom_name:"sandbox_error",custom_enum:"init_pii_error"})}}setPageInfo(t,e){var r=()=>super.setPageInfo,n=this;this.context.isInitPageSignPending?this.reportService.pushPreposition(z()(function*(){yield n.context.initPageSignPromise.then(()=>{r().call(n,t,e)})})()):super.setPageInfo(t,e)}setPageIndex(t){t&&this.reportService.pushPreposition(z()(function*(){var{index:e,main:r}=t;yield rK(v,JSON.stringify({index:e,main:r}))})())}getReporter(t){return this.reporters.find(e=>e.getReporterId()===t)}addReporter(t){var e;t.on(rc.BEFORE_REPORT,(t,e,r,n,i)=>{this.dispatch(e8.PIXEL_SEND,t,e,r,n,i)},{}),O()(e=this.reporters).call(e,t),this.dispatch(e8.PIXEL_DID_MOUNT,t)}page(){}loadPixel(){}track(t,e){if(!!ne[t]){var r=e||{context:{document:{}}},n={},i=r.clientId;try{var{context:{document:{location:o,referrer:s}}}=r;switch(this.setPageInfo(o&&o.href||"",s),t){case"checkout_started":case"payment_info_submitted":case"checkout_completed":var a=ne[t],{data:{checkout:c}}=r,u=c.shippingAddress||{phone:""};if("zip"in u&&u.zip&&(n.zip_code=u.zip,u.countryCode&&(n.country=u.countryCode)),c.email||c.phone||u.phone){var l=c.phone||u.phone;c.email&&(n.email=c.email),l&&(n.phone_number=l),R(S.CUSTOM_INFO,{custom_name:"shopify_am",custom_enum:a+"-"+Object.keys(n).join(",")})}else R(S.CUSTOM_INFO,{custom_name:"shopify_non_am",custom_enum:a})}}catch(e){x(S.CUSTOM_ERROR,e,{custom_name:"parse_pii_error",custom_enum:t})}this.identify(i,nr(n)),super.track(t,e)}}setCookieInfo(t){if(!!t)this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:t})}enableFirstPartyCookie(t){var e=this;if(!!t)this.reportService.pushPreposition(z()(function*(){var r=yield e.cookieService.enableFirstPartyCookie(t);e.setCookieInfo(r)})())}initLocalServiceInfo(){var t=this;this.reportService.pushPreposition(z()(function*(){var{getSessionStorageInSandbox:e,setSessionStorageInSandbox:r,getShopifyPageInfo:n}=t.sandboxPixelAPI,i=yield e(m);if(i){t.context.setUserInfoWithoutIdentifyPlugin({[m]:i});return}var{location:o,referrer:s}=n(),a=eJ(eY(t.globalTtqOption),o.href,s);a&&(yield r(m,a),t.context.setUserInfoWithoutIdentifyPlugin({[m]:a}))})())}constructor(t){var e=[],{env:r,globalTtqOption:n,sandboxAPI:i,reportService:o,httpService:s,adService:a,appService:c,cookieService:u}=t,l=new r$(i,o,u,n,e,r);super(l,o),this.env=void 0,this.context=void 0,this.reportService=void 0,this.globalTtqOption=void 0,this.adService=void 0,this.appService=void 0,this.httpService=void 0,this.reporters=void 0,this.sandboxPixelAPI=void 0,this.cookieService=void 0,this.monitorInitialized=!1,this.env=r,this.adService=a,this.appService=c,this.cookieService=u,this.reportService=o,this.httpService=s,this.reporters=e,this.context=l,this.sandboxPixelAPI=i,this.globalTtqOption=n,this.initPlugins(),this.dispatch(e8.INIT_START);var{location:f,referrer:p}=rj();this.setPageInfo(f.href,p),this.initSandboxUserInfo(),this.init(f.href,p),this.dispatch(e8.INIT_END)}}var nd=function(t){return t.PIXEL_CODE="pixelCode",t.EVENT_SOURCE_ID="eventSourceId",t.SHOP_ID="shopId",t}({}),nh=r("4132"),nv=r.n(nh);class n_{on(t,e,r){try{var n=Object.assign({throttle:!1,debounce:!1,once:!1,interval:500},r),i=this.subscriberMap.get(t)||[];if(i.some(t=>t.originalCallback===e))return;O()(i).call(i,{originalCallback:e,wrappedCallback:this.wrapCallback(e,n),options:n}),nv()(i).call(i,(t,e)=>(e.options.priority||0)-(t.options.priority||0)),this.subscriberMap.set(t,i)}catch(e){x(S.CUSTOM_ERROR,e,{custom_name:"EventEmitter",custom_enum:t})}}emit(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n{try{e.wrappedCallback(...r)}catch(e){x(S.CUSTOM_ERROR,e,{custom_name:"EventEmitter",custom_enum:t,extJSON:{message:""+JSON.stringify(this.subscriberMap.get(t))}})}})}off(t,e){var r=this.subscriberMap.get(t)||[];this.subscriberMap.set(t,r.filter(t=>t.originalCallback!==e))}clear(){this.subscriberMap.clear()}wrapCallback(t,e){var r,n,i,o,s,a,c,u,l,f,p,d,h,v;if(e.async&&(t=tV(t)),e.throttle){;r=t,n=e.interval||500,i={trailing:e.trailing||!1},void 0===n&&(n=500),void 0===i&&(i={trailing:!1}),s=0,a=null,c=null,u=o?r.bind(o):r,l=i.trailing,t=function(){for(var t=td(),e=arguments.length,r=Array(e),i=0;i{a=null,s=td(),u(...c)},o))}}if(e.debounce){;f=t,p=e.interval||500,v=d?f.bind(d):f,t=function(){for(var t=arguments.length,e=Array(t),r=0;r{v(...e)},p)}}return e.once&&(t=tR(t)),t}setObserverConfig(t){this.emit(rl.UPDATE_CONFIG,t)}constructor(){this.subscriberMap=new Map}}var ng=(t,e)=>{if("selfhost"===t&&e&&L(e))return"https://"+L(e)+"/api/v2/pixel";var r={track:ex,performance:eP,interaction:eA,performance_interaction:eN,auto_config:ew,page_performance:eC,page_interaction:eD}[t];return r?r:null},nI=["ttuts","ad_info_from"];class ny extends n_{getParameterInfo(){return this.getInstance().then(()=>{var{name:t="",status:e=1,setupMode:r=0,advertiserID:n="",is_onsite:i=!1}=this.reporterInfo;return{pixelCode:this.getReporterId(),name:t,status:e,setupMode:r,advertiserID:n.toString(),partner:this.getReporterPartner()||"",is_onsite:i,advancedMatchingAvailableProperties:this.advancedMatchingAvailableProperties,rules:this.rules}})}getInstance(){return this.pixelPromise=G().resolve(this)}getReporterId(){return""}getReporterUniqueLoadId(){return""+this.getReporterId()}getReporterPartner(){}getReporterInfo(){return{pixel:{code:this.getReporterId()}}}setAdvancedMatchingAvailableProperties(t){this.advancedMatchingAvailableProperties=Object.assign({},this.advancedMatchingAvailableProperties,t)}isOnsite(){return!1}isPartnerReporter(){return!1}getReportResultSet(){return this.reportResultSet}getUserInfo(t){return{}}getReporterMatchedUserFormatInfo(){return{}}getReporterMatchedUserFormatInfoV2(){return{}}getReportEventHistoryKey(t){return"tiktok"}getCookieBasedSession(){return this.session}setCookieBasedSession(t){return t&&(this.session=t),this.session}convertCookieBasedSession(t,e,r){return{}}clearHistory(){this.reportEventHistory={}}pushReport(t,e){var r;void 0===e&&(e="tiktok"),!this.reportEventHistory[e]&&(this.reportEventHistory[e]=[]),O()(r=this.reportEventHistory[e]).call(r,t)}hasReportEventHistory(t,e){var r,n=this.getReportEventHistoryKey(e);return this.reportEventHistory[n]?!!(c()(r0).call(r0,t)&&c()(r=this.reportEventHistory[n]).call(r,t))||!1:(this.reportEventHistory[n]=[],!1)}page(t){void 0===t&&(t={})}identify(t,e){}track(t,e,r,n,i){var o=n||r6.TRACK,s=i||eO.defaultReport;return!this.reportService||this.hasReportEventHistory(t,s)?G().resolve(null):(this.pushReport(t,this.getReportEventHistoryKey(s)),this.reportService.reportPreTasks.then(()=>{var n=this.getReporterId(),i=this.trackSync(n,t,e,r,o,s);return this.trackPostTask({reporterId:n,eventType:t,properties:e,eventConfig:r,type:o,reportType:s,reportData:i}),G().resolve({reporterId:n,eventType:t,properties:e,eventConfig:r,type:o,reportType:s,reportData:i})}))}getEventType(t){return t}trackPostTask(t){}trackSync(t,e,r,n,i,o,s){void 0===i&&(i=r6.TRACK),void 0===o&&(o=eO.defaultReport);var a,c=i!==r6.SELFHOST?this.assemblyData(t,e,r,n,i):this.assemblySelfHostData(t,e,r,n,i),u=s||ng(i,t);if(null!==u&&!!this.reportService)return this.emit(rc.BEFORE_REPORT,t,e,c,n,i),O()(a=this.reportResultSet).call(a,this.reportService.report(u,c,o,eT.P0)),c}handlePropertiesToOptions(t,e){var r={};return e.forEach(e=>{r[e]=t[e],delete t[e]}),r}assemblyData(t,e,r,n,i){void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=r6.TRACK);var{adInfo:o,userInfo:s,appInfo:a,pageSign:c,libraryInfo:u,pageInfo:l,signalType:f}=this.context.getAllData(),{sessionId:p,variationId:d}=c,h=Object.assign({},r),v=h&&h.is_standard_mode;h&&h.pixelMethod&&delete h.pixelMethod;var _=Object.assign({},u,{version:this.context.isLegacyPixel(t)?"legacy-"+u.version:u.version}),g=tk(o,nI),I=Object.assign({},g,{device_id:a.device_id,uid:a.user_id}),y=this.handlePropertiesToOptions(h,[eb.LDU,eb.EVENTID,eb.EVENT_ID]),{limited_data_use:m}=this.options,E=null!==y.limited_data_use&&void 0!==y.limited_data_use?y.limited_data_use:m;null==E?delete y.limited_data_use:y.limited_data_use=!!E;var S=n&&(n.event_id||n.eventID)||"";y.event_id=S||y.event_id||y.eventID||"",delete y.eventID;var b=this.getReporterInfo();b.pixel&&(b.pixel.runtime=t3(),v&&(b.pixel.mode="standard"));var O=this.getUserInfo(tl.Manual)||{},T=this.getUserInfo(tl.ManualV2)||{},R=this.getReporterMatchedUserFormatInfoV2()||{},x=this.getUserInfo(tl.Auto)||{};x.auto_trigger_type&&(Object.assign(h,{auto_trigger_type:x.auto_trigger_type}),delete x.auto_trigger_type);var P=this.getUserInfo(tl.EBManual)||{};tQ()&&Object.assign(h,{android_version:a.android_version,device_model:a.device_model});var A={};s.anonymous_id&&(A.anonymous_id=s.anonymous_id);var N=this.getEventType(e),C=this.convertCookieBasedSession(i,n.pixelSession,n.pageSession),D={event:N,event_id:S,message_id:ty(tI("messageId"),t),is_onsite:!!f,timestamp:new Date().toJSON(),context:W()({ad:I,device:{platform:a.platform},user:Object.assign({},A,O,T,x,P)},b,{page:Object.assign({},l),library:Object.assign({},_),session_id:ty(p,t),pageview_id:ty(this.context.getPageViewId(),this.getReporterUniqueLoadId(),"::"),variation_id:d||""},C),_inspection:R,properties:h};return Object.assign(D,y)}assemblySelfHostData(t,e,r,n,i){return void 0===r&&(r={}),void 0===n&&(n={}),this.assemblyData(t,e,r,n,i)}constructor(t,e){super(),this.context=void 0,this.reportService=void 0,this.reporterInfo={},this.options={},this.plugins={},this.rules=[],this.reportEventHistory={},this.reportResultSet=[],this.selfHostConfig={},this.pixelPromise=void 0,this.currentHref="",this.advancedMatchingAvailableProperties={external_id:!0,partner_id:!0},this.session=re(),this.reportService=e,this.context=t}}function nm(){try{var t=function(){try{var t,e=getGlobalThis(),r=null==e||null==(t=e.__globalprops)?void 0:t.getGlobalProps();if(!r)return{};return JSON.parse(r)||{}}catch(t){return{}}}(),e=null==t?void 0:t.ea_config;if(!e)return{};return"string"==typeof e?JSON.parse(e):e}catch(t){return{}}}var nE=["AED","ALL","AMD","ARS","AUD","AZN","BDT","BGN","BHD","BIF","BOB","BRL","BYN","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DOP","DZD","EGP","EUR","GBP","GEL","GTQ","HKD","HNL","HUF","IDR","ILS","INR","IQD","ISK","JOD","JPY","KES","KHR","KRW","KWD","KZT","LBP","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","OMR","PAB","PEN","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","SAR","SEK","SGD","THB","TND","TRY","TWD","TZS","UAH","USD","UZS","VES","VND","ZAR"],nS=["event_experiment","dynamic_parameter_config","eb_version","eb_rule_id","tf","trigger_source","inter_id"],nb=(t,e,r)=>{try{var i=window.location.hostname.split(".");if(void 0!==n&&n=0;o--){var s="."+i.slice(o).join(".");if(document.cookie=t+"="+e+transformCookieOption(Object.assign({},r,{domain:s})),getCookieInCommonBrowser(t)===e){n=o;break}}}catch(t){}};!function(t){t.ID_SSN="ID_SSN",t.PASSPORT="PASSPORT",t.DRIVING_LICENSE="DRIVING_LICENSE",t.PHONE="PHONE",t.EMAIL="EMAIL",t.CREDIT_CARD="CREDIT_CARD",t.RACE_ETHNIC="RACE_ETHNIC",t.RELIGION="RELIGION",t.SEXUAL_ORIENTATION="SEXUAL_ORIENTATION",t.POLITICAL_AFFILIATION="POLITICAL_AFFILIATION",t.UNION_MEMBERSHIP="UNION_MEMBERSHIP",t.CRIMINAL_RECORD="CRIMINAL_RECORD",t.DEFAULT="***"}(i||(i={})),i.RACE_ETHNIC,i.RELIGION,i.SEXUAL_ORIENTATION,i.POLITICAL_AFFILIATION,i.UNION_MEMBERSHIP,i.CRIMINAL_RECORD;Object.values(i).reduce((t,e)=>(t[e]=`<#${e}#>`,t),{});let nO={prefix:"(?|[^>]*<))"};nR(["(?:\\+?\\d{1,3}[\\s-]?|\\(\\+?\\d{1,3}\\)[\\s-]?)?(?:\\d{2,4}[\\s-]?|\\(\\d{2,4}\\)[\\s-]?)?(?:\\d[\\s-]?){5,}"],nO,"g");let nT=nR(["([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9._-]+)"],nO,"gi");function nR(t,e={prefix:"",suffix:""},r=""){return t.map(t=>{try{let n=new RegExp(t,r),i=n.source;if(i.startsWith("^")&&i.endsWith("$"))return n;return function(t,e="",r=""){let n=t.source,i=t.flags,o=`${e}${n}${r}`;return new RegExp(o,i)}(n,e.prefix,e.suffix)}catch(t){return/[]/}})}nR(["(?:(?:4[0-9]{3}|5[1-5][0-9]{2}|6011|65[0-9]{2}|3[47][0-9]{2}|3(?:0[0-5]|[68][0-9])|2131|1800|35\\d{2})[-\\s]?(?:[0-9]{4}[-\\s]?){2}[0-9]{3,4}|62[0-9]{3}[-\\s]?(?:[0-9]{4}[-\\s]?){2,3}[0-9]{3,4})$(?![\\d])"],nO,"g"),nR(["\\d{3}-\\d{2}-\\d{4}|\\d{9}","\\d{17}(\\d|X|x)$","[A-CEGHJ-PR-TW-Z]{2}\\d{6}[A-D]?","(?:[A-Z]\\d{10}|\\d{10})","[A-Z0-9]{12}"],nO,"g"),nR(["[EDS]\\d{8}","[A-HJ-NP-Z][A-HJ-NP-Z0-9]{8}","[A-Z]{2}\\d{6}"],nO,"g"),nR(["\\d{17}[\\dXx]","[A-Z0-9]{16}","[A-Z0-9]{10,12}","[A-Z0-9]{12}"],nO,"g");class nx extends ny{identify(t,e){var r=tj(t,e);this.context.setUserInfo(r,W()({reporterId:this.id},(null==e?void 0:e.trigger_source)&&{trigger_source:e.trigger_source}))}getReporterId(){return this.id||""}getReporterUniqueLoadId(){return this.reporterInfo.loadId+"-"+this.getReporterId()}getReporterPartner(){var t;return(null==(t=this.reporterInfo)?void 0:t.partner)||""}setPixelInfo(t,e,r){var{type:n}=this;this.reporterInfo=Object.assign(this.reporterInfo,W()({},t),{[n]:this.getReporterId()}),e&&(this.rules=e),r&&(this.plugins=r)}getInstance(){return G().resolve(this)}getReporterInfo(){return this.reporterInfo.pixelCode?super.getReporterInfo():{shop_id:this.reporterInfo.shopId,eventSourceId:this.reporterInfo.eventSourceId}}getUserInfo(t){var e=this.context.getUserInfo(),r=tL(e,Object.assign({},this.advancedMatchingAvailableProperties));switch(t){case tl.Manual:return tL(this.isPartnerReporter()?r:e,{external_id:!0,email:!0,phone_number:!0,ttoclid:!0});case tl.ManualV2:return tL(this.isPartnerReporter()?r:e,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0,ttoclid:!0});case tl.EBManual:return tL(e,{eb_email:this.advancedMatchingAvailableProperties.auto_email,eb_phone_number:this.advancedMatchingAvailableProperties.auto_phone_number,acp:this.advancedMatchingAvailableProperties.auto_email||this.advancedMatchingAvailableProperties.auto_phone_number});case tl.Auto:var n=tL(r,{external_id:!0,auto_email:!0,auto_phone_number:!0,ttoclid:!0});return Object.assign(n,tL(e,{auto_zip_code:this.advancedMatchingAvailableProperties.auto_address})),Object.assign(n,(n.auto_email||n.auto_phone_number)&&e.auto_trigger_type?{auto_trigger_type:e.auto_trigger_type}:{});default:return r}}getReporterMatchedUserFormatInfo(){var t=this.context.getUserFormatInfo(),e=tw(t,this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),r=tL(t,{auto_email:!0,auto_phone_number:!0});return Object.keys(r).length>0&&(!e.identity_params&&(e.identity_params={}),Object.assign(e.identity_params,r)),e}getReporterMatchedUserFormatInfoV2(){var t=this.context.getUserFormatInfoV2(),e=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};return tD(t,e)}isOnsite(){var t;return!!(null!=(t=this.reporterInfo)&&t.is_onsite)}isPartnerReporter(){var t=this.getReporterPartner();return!!(t&&"None"!==t)}getSignalDiagnosticLabels(){var t=this.context.getSignalDiagnosticLabels();if(!t)return Object.assign({},tp);var{email:e,phone_number:r,auto_email:n,auto_phone_number:i}=this.advancedMatchingAvailableProperties;e=!this.isPartnerReporter()||e,r=!this.isPartnerReporter()||r;var o=tL(t,{raw_email:e,raw_phone:r,hashed_email:e,hashed_phone:r,raw_auto_email:n,raw_auto_phone:i,raw_eb_email:!0,raw_eb_phone:!0,hashed_eb_email:!0,hashed_eb_phone:!0}),s={};return(n||i)&&Object.keys(t).forEach(e=>{e.startsWith("aam_")&&(s[e]=t[e])}),Object.assign({},tp,o,s)}setCookieBasedSession(t){return t&&(this.session=t),this.session}convertCookieBasedSession(t,e,r){return rt(this.reporterInfo,this.ttqOptions)&&t!==r6.AUTO_CONFIG&&e&&r?ro(e,r):{}}assemblyData(t,e,r,n,i){void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=r6.TRACK);var o,s,a,c,u=super.assemblyData(t,e,r,n,i);u.is_onsite=this.isOnsitePage.value;var l=U(t)||this.ttqPartner;l&&(u.partner=l),u.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var f=D().getPlugin("SensitiveRedactor");if(f){f.registerEncryptRedactor({keywords:[],regexArray:nT},tb);var p=f.processSync(u.signal_diagnostic_labels,"encrypt");p.success?u.signal_diagnostic_labels=p.redactedOutput:x(S.CUSTOM_ERROR,p.error,{custom_name:"sensitive_redactor_error",extJSON:{message:"signal_diagnostic_labels"}})}var d=k();d&&(u.context.userAgent=d);var h=function(){try{var t=document.readyState;if("loading"==t)return e7.LOADING;if("interactive"==t)return e7.INTERACTIVE;else if("complete"==t)return e7.COMPLETE;return e7.UNKNOWN}catch(t){return e7.UNKNOWN}}();if(h&&(u.context.page.load_progress=h),!w()&&Object.keys(this.context.userInfoFieldAllowlist).length){var v=Y()(this.context.userInfoFieldAllowlist).filter(e=>{var[,r]=e;return -1===r.indexOf("all")&&-1==r.indexOf(t)}).map(t=>{var[e]=t;return e});u.context.user=tk(u.context.user,v)}if(null!=(c=u.context.user.acp)&&c.length){var _=!!u.context.user.eb_email,g=!!u.context.user.eb_phone_number,I=u.context.user.acp.filter(t=>{var{type:e}=t;return e===ta.Email?_:e===ta.Phone&&g});I.length>0?u.context.user.acp=I:delete u.context.user.acp}u._inspection=(o=nS,s=u.properties,a=u._inspection,void 0===a&&(a={}),o.forEach(t=>{s.hasOwnProperty(t)&&(a[t]=s[t],delete s[t])}),a),i!==r6.PAGE&&(u._inspection.ppf=F()),u._inspection.vids=this.context.getVids();var y=H();if(y&&rt(this.reporterInfo,this.ttqOptions)&&function(){try{var t,e=D(),r=null==e||null==(t=e._container)?void 0:t.get(E.TTQ_REPORTERS);if(!r)return!1;for(var n of r)if(n.plugins&&!0===n.plugins.AutoConfigV2)return!0;return!1}catch(t){return x(S.CUSTOM_ERROR,t,{custom_name:"jelly-core_config",custom_enum:"hasPixelEnableAutoConfigV2"}),!1}}()&&(u._inspection.inter_id=y),tT(e)&&this.plugins.AutoConfigV2){var m=this.context.getTransactionId();m&&(u._inspection.dynamic_parameter_config={value:m})}return u.context.ad.sdk_env=tW(),u.context.ad.jsb_status=function(){try{var t;return[V.INVOKE_METHOD_ENABLED,V.INVOKE_METHOD_NOT_ENABLED][[!!(null!=(t=window)&&null!=(t=t.ToutiaoJSBridge)&&t.invokeMethod),!0].findIndex(t=>t)]}catch(t){return V.NOT_SURE}}(),(i===r6.INTERACTION||i===r6.PERFORMANCE||i===r6.PERFORMANCE_INTERACTION)&&!1===this.context.getEnableAdTracking()&&!this.isOnsitePage.value&&(u.context.user={},u.context.ad=this.context.getOffsiteAdInfo(),u.context.ad=tk(u.context.ad,nI)),u.properties.reporterId&&delete u.properties.reporterId,u}page(t){void 0===t&&(t={});var{url:e}=eX();if(e!==this.currentHref)this.currentHref=e,this.track("Pageview",t,{})}track(t,e,r,n,i){void 0===e&&(e={}),void 0===r&&(r={}),void 0===n&&(n=r6.TRACK),void 0===i&&(i=eO.defaultReport);var o=()=>{var o=this.getReporterId();if(c()(r4).call(r4,t))return super.track(t,e,r,n,i);var s=W()({},r);return this.selfHostConfig[o]&&!r.eventID&&(s=Object.assign({},s,{eventID:ty(tI("default_eventId"),o)})),super.track(t,e,s,n,i)};return this.loaded?o():this.getInstance().then(o)}getEventType(t){return r3[t]||t}trackSync(t,e,r,n,i,o,s){if(void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=r6.TRACK),void 0===o&&(o=eO.defaultReport),"track"===i&&R(S.PIXEL_SEND,{pixelCode:t,extJSON:{event:e}}),i!==r6.TRACK){super.trackSync(t,e,r,n,i,o,s);return}r&&"string"==typeof r.currency&&(r.currency=r.currency.toUpperCase());var a=this.context.getTestID();if(a){var u,l=this.assemblyData(t,e,r,n);return l.tt_test_id=a,l.context.ad={},this==null||null==(u=this.reportService)||u.report(s||ex,l,eO.htmlHttpReport,eT.P0),l}if(r&&"object"==typeof r){var f,p,d,h,{value:v,currency:_}=r;if(void 0!==v&&(f=v,isNaN(f)||!(f>=0)))R(S.CUSTOM_ERROR,{pixelCode:t,custom_name:"invalid_value",extJSON:{event:e,value:v,currency:_}});if(void 0!==_&&(p=_,d=this.currency_list,void 0===d&&(d=null),h=d||nE,!c()(h).call(h,p)))R(S.CUSTOM_ERROR,{pixelCode:t,custom_name:"invalid_currency",extJSON:{event:e,value:v,currency:_}})}return super.trackSync(t,e,r,n,i,o,s)}trackPostTask(t){var{reporterId:e,eventType:r,properties:n,eventConfig:i}=t;if(!c()(r4).call(r4,r))this.selfHostConfig[e]&&!this.hasReportEventHistory(r,eO.htmlHttpReport)&&(this.pushReport(r,this.getReportEventHistoryKey(eO.htmlHttpReport)),this.trackSync(e,r,n,i,r6.SELFHOST,eO.htmlHttpReport))}getReportEventHistoryKey(t){return t===eO.htmlHttpReport?this.selfHostConfig[this.getReporterId()]:"tiktok"}assemblySelfHostData(t,e,r,n,i){void 0===r&&(r={}),void 0===n&&(n={});var o=this.assemblyData(t,e,r,n,i),{ttp:s}=this;return s&&(o.context.user.ttp=s),o}constructor(t){super(t.context,t.reportService),this.id=void 0,this.type=void 0,this.pixelCode=void 0,this.plugins=void 0,this.rules=void 0,this.pixel_rules=void 0,this.reporterInfo=void 0,this.options=void 0,this.selfHostConfig=void 0,this.ttp="",this.currency_list=void 0,this.ttqPartner=void 0,this.pixelPromise=void 0,this.isOnsitePage=void 0,this.ttqOptions=void 0,this.loaded=!1;var{id:e,type:r,isOnsitePage:n,reporterInfo:i,ttqOptions:o,plugins:s={},rules:a=[],pixel_rules:c=[],options:u={}}=t;this.id=e,this.pixelCode=e,this.type=r,this.isOnsitePage=n,this.options=u||{},this.plugins=s||{},this.rules=a||[],this.pixel_rules=c||[],this.reporterInfo=Object.assign(i||{},{[r]:e}),this.ttp=o.ttp||"",this.currency_list=o.currency_list||null,this.ttqPartner=o.partner||"",this.selfHostConfig=o.self_host_config||{},this.ttqOptions=o,this.pixelPromise=this.getInstance()}}class nP extends nx{setCookieBasedSessionInShopify(t){var e=()=>super.setCookieBasedSession,r=this;return z()(function*(){var n=yield rL(r.pixelCode,t,r.ttqOptions,r.cookieService);return e().call(r,n)})()}setPageCookieBasedSession(t){var e=this;return z()(function*(){var r=yield rL("",t,e.globalTtqConfig,e.cookieService);return e.context.setPageCookieBasedSession(r)})()}convertCookieBasedSession(t,e,r){return rt(this.reporterInfo,this.ttqOptions)&&t!==r6.AUTO_CONFIG?ro(this.getCookieBasedSession(),this.context.getPageCookieBasedSession()):{}}trackEnrichAM(){Object.keys(Object.assign({},this.getUserInfo(tl.Manual))).length>0&&this.track("EnrichAM",{},{})}prepareCookieBasedSession(t){var e=this,r=this.cookieSessionTask.catch(()=>void 0).then(z()(function*(){var r=yield e.cookieService.getCookie(""),n=rr(r),i=yield e.setCookieBasedSessionInShopify(n[e.getReporterId()]),o=yield e.setPageCookieBasedSession(n[""]);Object.assign(t,{pixelSession:i,pageSession:o}),null!=i&&i.isSessionStart&&(null==e.dispatch||e.dispatch(e8.SESSION_START,e,{pixelSession:i,pageSession:o}))}));return this.cookieSessionTask=r,r}track(t,e,r){var n,i,o={};if(rt(this.reporterInfo,this.ttqOptions)&&(null==(n=this.reportService)||n.pushPreposition(this.prepareCookieBasedSession(o))),t===r1)return this.trackInternalEvent(t,e,r);var s=ne[t];if(!s)return G().resolve(null);var a=e||{context:{document:{}}},c={};o.event_id=null!=(i=null==a?void 0:a.id)?i:"",void 0!==e.limited_data_use&&null!==e.limited_data_use&&Object.assign(c,{limited_data_use:e.limited_data_use});try{switch(t){case"page_viewed":break;case"product_viewed":var{data:{productVariant:u}}=a;Object.assign(c,nu(u,!1));break;case"collection_viewed":Object.assign(c,c.data||{});break;case"product_added_to_cart":var{data:{cartLine:l}}=a;l&&Object.assign(c,nl(l,!1));break;case"search_submitted":var{data:{searchResult:f}}=a;Object.assign(c,{query:f.query});break;case"checkout_started":case"payment_info_submitted":case"checkout_completed":var{data:{checkout:p}}=a;Object.assign(c,nf(t,p))}}catch(e){x(S.CUSTOM_ERROR,e,{custom_name:"transform_shopify_event_failed",custom_enum:t})}return super.track(s,c,o)}trackInternalEvent(t,e,r,n,i){return(void 0===e&&(e={}),void 0===r&&(r={}),void 0===n&&(n=r6.TRACK),void 0===i&&(i=eO.defaultReport),t!==r1&&t!==r2)?G().resolve(null):super.track(t,e,r,n,i)}trackSync(t,e,r,n,i,o){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=r6.TRACK),void 0===o&&(o=eO.defaultReport),super.trackSync(t,e,r,n,i,o,ek)}assemblyData(t,e,r,n,i){var o=super.assemblyData(t,e,r,n,i);return Object.assign(o.context,{report_endpoint:"/api/v2/shopify_pixel"}),o}constructor(t){var{id:e,reportType:r,isOnsitePage:n,reporterInfo:i,ttqOptions:o,context:s,reportService:a,cookieService:c,plugins:u,options:l,dispatch:f}=t;super({id:e,type:r,isOnsitePage:n,context:s,reporterInfo:i,ttqOptions:o,reportService:a}),this.id=void 0,this.reporterType=void 0,this.plugins=void 0,this.globalTtqConfig=void 0,this.loaded=!1,this.dispatch=void 0,this.cookieSessionTask=G().resolve(),this.isOnsitePage=void 0,this.cookieService=void 0,this.id=e,this.reporterType=r,this.globalTtqConfig=o,this.plugins=u||{},this.options=l||{},this.isOnsitePage=n,this.cookieService=c,this.dispatch=f}}var nA=t=>{var e=tJ(),r=ee();Y()(r).forEach(r=>{var n,i,[o,s]=r;if(!(s._init||t.reporters.some(t=>t.getReporterId()===o))){var a={value:e===tq.ONSITE||!!(t.reporters.every(t=>t.isOnsite())&&null!=(n=s.info)&&n.is_onsite)},c=new nP({context:t.context,reportService:t.reportService,cookieService:t.cookieService,dispatch:t.dispatch.bind(t),id:o,reportType:nd.PIXEL_CODE,isOnsitePage:a,reporterInfo:s.info,options:s.options,plugins:s.plugins,ttqOptions:t.globalTtqOption});if(s._init=!0,t.enableFirstPartyCookie((null==(i=s.info)?void 0:i.firstPartyCookieEnabled)||!1),s.plugins){var{AdvancedMatching:u}=s.plugins,l={};u&&Object.assign(l,u),c.setAdvancedMatchingAvailableProperties(l)}t.addReporter(c)}})},nN=()=>{var t=rw();return!t._global_config&&(t._global_config={}),t._global_config},nC=()=>{var t=rw();t._global_config=t._global_config?t._global_config:{},ei(t,t._global_config)},nD=()=>W()({},rM(),{getCookieInSandbox:rB,setCookieInSandbox:rH,getLocalStorageInSandbox:rV,setLocalStorageInSandbox:rG,setSessionStorageInSandbox:rK,getSessionStorageInSandbox:rq,getPixelDetailInSandbox:rF,getShopifyPageInfo:rj,getInitialStageCookie:rJ});try{rW(),(()=>{var t,e=N(),r=rM(),{document:n={},navigator:i}=(null==r||null==(t=r.init)?void 0:t.context)||{};w()&&Object.assign(e,{document:Object.assign(e.document||{},n),window:e.window||e}),e._userAgent=i&&i.userAgent||""})(),A=self[self.TiktokAnalyticsObject||"ttq"],(()=>{var{pixelCode:t=""}=rF(),e=rw(),r=tW();if(!e){R(S.CUSTOM_ERROR,{custom_name:"non_ttq_in_sandbox"});return}if(!t&&R(S.CUSTOM_ERROR,{custom_name:"non_pixel_code_in_sandbox"}),R(S.BEFORE_INIT),!e.initialize){nC();var n=nN(),i=nD(),o=new ey(i,n),s=new em,a=new eE,c=new eK(s,a,o),u=new e5(i),l=new e3(i),f=new np({env:r,sandboxAPI:i,globalTtqOption:n,httpService:s,reportService:c,adService:u,appService:l,cookieService:o});en(e,f);nA(f);var{analytics:p}=i||{};if(p&&p.subscribe)p.subscribe("all_standard_events",t=>{f.track(t.name,t)});else if(["track"].forEach(t=>{Object.defineProperty(e,t,{get:()=>function(){try{var e=Array.prototype.slice.call(arguments);return f[t].apply(f,e)}catch(t){return{}}},set(){}})}),e.length>0)for(;e.length;){var d=e.shift();if(!!d){var[h,...v]=d;if("track"===h)f.track(v[0]||"",v[1]||{})}}e.initialize=!0}})()}catch(t){x(S.INIT_ERROR,t)}})()})()}catch(t){}