5 lines
87 KiB
JavaScript
5 lines
87 KiB
JavaScript
/*!TikTok attaches importance to your privacy and safety. We use this script to control webapi usages and make sure they are within our privacy policy.*/
|
|
!function(){"use strict";var e="main_thread",t="out_app",r="cookie_set_by_document",n="cookie_blocked_on_start",a="general_fetch",o="request_log",i="webapi",l="storage_use",c="sw_incompat",s="ready_for_msg",u="force_update_sw",p="frequency",d="cost_time",f="main_thread_ctx",h="network_rule",m="__PNS_RUNTIME_SW_EVENT__",v="__PNS_RUNTIME_SE_ERROR__",y="__PNS_RUNTIME__";function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function w(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=function(e,t){if(e)try{return new URL(e,t)}catch(e){return}};function R(){var e,t=null===(e=document.currentScript)||void 0===e?void 0:e.src;try{var r=k(t);return(null==r?void 0:r.searchParams.get("globalName"))||y}catch(e){return y}}var x=function(e,t,r){e.splice(0,e.length-r+1),e.push(t)},O=100;function S(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R(),r=globalThis[t];return r||(r={pendingEvents:[],pendingConfig:{},pendingListeners:{},errors:[],pushEvent:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3?arguments[3]:void 0;x(r.pendingEvents,{eventName:t,eventDetail:n,source:a,options:o},O)},pushError:function(e){x(r.errors,e,20)},pageContextObservers:[]},globalThis[t]=r),r}function j(){return"undefined"==typeof globalThis}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R();return j()?null:S(e)}var $=function(e){return e&&"function"==typeof e.then},N=function(e){return function(t){return $(e)?e.then(t):t(e)}};function A(e,t,r){return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];try{var i=e.apply(void 0,w(a));return i}catch(e){return B.error(e),null==t||t(e),r}}}function E(e,t){switch(t.handler){case"block":e._blocked=!0,e._modified=!0;break;case"report":var r;e._sample_rate=null!==(r=t.value)&&void 0!==r?r:1;break;case"report_stack":var n;e._stack_rate=null!==(n=t.value)&&void 0!==n?n:0}return e}var C=function(e,t,r){var n=t;if(""!==e&&(n="".concat(e,".").concat(t)),r&&Object.keys(r).length>0){var a,o=(a=Math).max.apply(a,w(Object.keys(r).map(Number)))+1,i=Array.from(g(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}({},r),{length:o})),l=i.map((function(e){var t,r=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return"string"===r?"'".concat(e,"'"):"undefined"===r?"":"".concat(e)})).join(",");n="".concat(n,"(").concat(l,")")}return n};function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var L=["log","error","warn"];function D(e){var t={},r=!0,n=!1,a=void 0;try{for(var o,i=function(){var r=o.value;t[r]=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var o;e()&&(o=console)[r].apply(o,P(n))}},l=L[Symbol.iterator]();!(r=(o=l.next()).done);r=!0)i()}catch(e){n=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw a}}return t}var I,U,H,M,B=D((function(){return!1})),W=D((function(){return!1})),F=D((function(){return!0}));(U=I||(I={}))[U.runtime=0]="runtime",U[U.compilation=1]="compilation",(M=H||(H={}))[M.OFF=0]="OFF",M[M.SCHEMA=1]="SCHEMA",M[M.RAW=2]="RAW";var G=function(e){return"object"==typeof e&&null!==e&&"pattern"in e},J=function(e,t){if("object"!=typeof t||null===t)return!1;if("$eq"in t&&e!==t.$eq||"$ne"in t&&e===t.$ne||"$exists"in t&&void 0===e||void 0!==t.$in&&-1===t.$in.indexOf(e)||void 0!==t.$nin&&-1!==t.$nin.indexOf(e))return!1;var r;try{var n;r="string"==typeof e?e:null!==(n=JSON.stringify(e))&&void 0!==n?n:""}catch(e){return!1}return!(void 0!==t.$regex&&!new RegExp(t.$regex,t.$options).test(r)||void 0!==t.$text&&-1===r.indexOf(t.$text)||void 0!==t.$prefix&&!r.startsWith(t.$prefix)||void 0!==t.$sufnin&&t.$sufnin.some((function(e){return r.endsWith(e)}))||void 0!==t.$sufin&&t.$sufin.every((function(e){return!r.endsWith(e)})))},V=function(e,t){if(!G(e))throw new Error("invalid condition");var r,n=!1;return r=e,Object.keys(r.pattern).some((function(e){return-1!==["$eq","$ne","$exists","$in","$nin","$regex","$text","$prefix","$sufin","$sufnin"].indexOf(e)}))?n=J(t(e),e.pattern):"$or"in e.pattern&&Array.isArray(e.pattern.$or)?n=0===e.pattern.$or.length||e.pattern.$or.some((function(e){return V(e,t)})):"$not"in e.pattern&&G(e.pattern.$not)?n=!V(e.pattern.$not,t):"$and"in e.pattern&&Array.isArray(e.pattern.$and)&&(n=0===e.pattern.$and.length||e.pattern.$and.every((function(e){return V(e,t)}))),n},Y=function(e,t){try{return 0===e.length||e.every((function(e){return V(e,t)}))}catch(e){return!1}};function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}}(e,t)||te(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||te(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){if(e){if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function re(e,t){var r=e,n=Object.keys(t),a=!0,o=!1,i=void 0;try{for(var l,c=n[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var s=l.value;if(r.startsWith(s)){r=t[s]+e.substring(s.length);break}}}catch(e){o=!0,i=e}finally{try{a||null==c.return||c.return()}finally{if(o)throw i}}return r}function ne(e,t){var r=t.blocklist,n=t.allowlist,a=t.enableSameOriginBlock;if(r){var o=e.startsWith(location.origin),i=!0,l=!1,c=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var p=s.value;if(e.startsWith(p)&&(!o||a&&o))return!0}}catch(e){l=!0,c=e}finally{try{i||null==u.return||u.return()}finally{if(l)throw c}}}if(n&&n.length>0){var d=!1,f=!0,h=!1,m=void 0;try{for(var v,y=n[Symbol.iterator]();!(f=(v=y.next()).done);f=!0){var _=v.value;e.startsWith(_)&&(d=!0)}}catch(e){h=!0,m=e}finally{try{f||null==y.return||y.return()}finally{if(h)throw m}}if(!d)return!0}return!1}var ae=["127.0.0.1","localhost"],oe=["is_test_only=1","slardar_heatmap"];function ie(e,t){var r=k(t);if(r){var n=r.search;if(n)for(var a=0;a<oe.length;a++)if(-1!==n.indexOf(oe[a]))return!0}var o=k(e);return!(!o||-1===ae.indexOf(o.hostname))}var le,ce,se=function(){return new Response("request blocked",{status:410,statusText:"cross border request is not allowed",headers:{"x-pns-blocked":"1"}})},ue=function(){return new Response("the request is blocked by pumbaa",{status:410,statusText:"request is not allowed",headers:{"x-pns-blocked":"1"}})},pe="2",de="3",fe="4",he="5",me=function(e){var t={};return e.forEach((function(e,r){var n;K(e,File)?Reflect.set(t,r,"file"):K(e,Blob)?Reflect.set(t,r,"blob"):Reflect.set(t,r,void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)})),t},ve=function(e){var t=e.url,r=e.referrer,n=e.headers,a=e.method,o=e.destination,i={};n.forEach((function(e,t){i[t]=e}));var l=n.get("Content-Type")||"",c="",s="",u="";try{var p=new URL(t);c=p.search,s=p.host,u=p.pathname}catch(e){}var d,f={request_url:t,request_host:s,request_path:u,header_names:Array.from(n.keys()).join(","),header_map:i,referrer:r,search:c,method:a,contentType:l,destination:o,_request_time:Date.now(),_is_json_body:-1!==l.indexOf("application/json"),_sample_rate:0},h=e.clone();["POST","PUT","PATCH"].includes(a)&&(l.includes("application/json")?f.body=h.json():l.includes("application/x-www-form-urlencoded")?f.body=h.text().then((function(e){return t=new URLSearchParams(e),r={},t.forEach((function(e,t){Reflect.set(r,t,e)})),r;var t,r})):l.includes("multipart/form-data")&&(f.body=h.formData().then((function(e){return me(e)}))),f.body=null===(d=f.body)||void 0===d?void 0:d.catch((function(){return{}})));return f},ye=function(e){return"urlPattern"in e},_e=function(e){var t,r=e.reduce((function(e,t){return ye(t)?e.push("url"):t.conditions.forEach((function(t){"context"===t.type&&e.push(t.field)})),e}),[]);return t=r.reduce((function(e,t){return e[t]=null,e}),{}),Object.keys(t)};function be(e,t){var r=t.replace,n=t.allowlist,a=t.blocklist,o=t.enableSameOriginBlock,i=!1,l=e.request_url,c=!1;if(r&&(i=(l=re(l,r))!==e.request_url),(a||n)&&(c=ne(l,{allowlist:n,blocklist:a,enableSameOriginBlock:o})),c)e["x-pns-block"]="1",e._blocked=!0;else if(i){var s;e.request_url=l;var u,p,d,f,h=k(l);e.request_host=null!==(u=null==h?void 0:h.host)&&void 0!==u?u:"",e.request_path=null!==(p=null==h?void 0:h.pathname)&&void 0!==p?p:"",e.search=null!==(d=null==h?void 0:h.search)&&void 0!==d?d:"",null!==(f=(s=e)._replaced_fields)&&void 0!==f||(s._replaced_fields=[]),e._replaced_fields.push("url"),e["x-pns-replace"]="1"}return(c||i)&&(e.rule_name=t.ruleName?"".concat(e.rule_name?"".concat(e.rule_name,","):"").concat(t.ruleName):e.rule_name),e}function ge(e,t){var r=encodeURIComponent(t),n=("?"===e[0]?e.slice(1):e).split("&"),a=!0,o=!1,i=void 0;try{for(var l,c=n[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var s=Z(l.value.split("="),2),u=s[0],p=s[1];if(u===r)return decodeURIComponent(p)}}catch(e){o=!0,i=e}finally{try{a||null==c.return||c.return()}finally{if(o)throw i}}}function we(e,t){t.type;var r=t.pattern;switch(t.type){case"body":if(!e._is_json_body)return!1;var n,a=null!==(n=e._parsed_json_body)&&void 0!==n?n:e.body,o=t.field,i=function(e){try{var t=!0,n=!1,a=void 0;try{for(var i,l=o[Symbol.iterator]();!(t=(i=l.next()).done);t=!0){e=e[i.value]}}catch(e){n=!0,a=e}finally{try{t||null==l.return||l.return()}finally{if(n)throw a}}}catch(e){return!1}return!!J(e,r)};return $(a)?a.then(i,(function(){return!1})):i(a);case"url":if(J(e.request_url,r))return!0;break;case"host":if(J(e.request_host,r))return!0;break;case"path":if(J(e.request_path,r))return!0;break;case"search":if(!e.search)return!1;var l=ge(e.search,t.field);if(J(l,r))return!0;break;case"header":var c,s;if(J(null!==(s=null===(c=e.header_map)||void 0===c?void 0:c[t.field])&&void 0!==s?s:"",r))return!0;break;case"method":if(J(e.method,r))return!0;break;case"source":if(J(e.source,r))return!0;break;case"destination":if(J(e.destination,r))return!0}return!1}function ke(e,t,r,n,a){switch(t.handler){case"replace":return void 0===t.pattern?t.value:function(e,t,r){if(!J(e,t))return e;if(["$eq","$ne","$exists","$in","$nin"].some((function(e){return e in t})))return r;var n,a="string"==typeof e,o=a?e:null!==(n=JSON.stringify(e))&&void 0!==n?n:"";return void 0!==t.$regex?o=o.replace(new RegExp(t.$regex,t.$options),r):void 0!==t.$text?o=o.replace(t.$text,r):void 0!==t.$prefix&&(o=o.replace(t.$prefix,r)),A((function(){return a?o:JSON.parse(o)}),void 0,e)()}(r(),t.pattern,t.value);case"remove":return n;case"empty":return a}}function Re(e,t){var r=e;switch(t.type){case"body":if(!r._is_json_body)return r;var n=t.type,a=t.field,o=function(e){var r,o=void 0===e._parsed_json_body?"body":"_parsed_json_body",i=ke(0,t,(function(){return function(e,t){try{var r=e,n=!0,a=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)r=r[i.value]}catch(e){a=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(a)throw o}}return r}catch(e){}}(e,[o].concat(ee(a)))}),void 0,null);return function(e,t,r){var n=e;try{var a=t.pop(),o=!0,i=!1,l=void 0;try{for(var c,s=t[Symbol.iterator]();!(o=(c=s.next()).done);o=!0)n=n[c.value]}catch(e){i=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}n[a]=r}catch(e){}}(e,[o].concat(ee(a)),i),e._replaced_fields=ee(null!==(r=e._replaced_fields)&&void 0!==r?r:[]).concat([n]),e._modified=!0,e};return $(r.body)?r.body.then((function(e){return r.body=e,r})).then(o):o(r);case"url":var i,l=ke(0,t,(function(){return r.request_url})),c=k(l);r.request_url=l,r.request_host=c.host,r.request_path=c.pathname,r.search=c.search,r._replaced_fields=ee(null!==(i=r._replaced_fields)&&void 0!==i?i:[]).concat([t.type]);break;case"host":var s,u=ke(0,t,(function(){return r.request_host}),"",""),p=k(r.request_url);p.host=u,r.request_url=p.href,r.request_host=u,r._replaced_fields=ee(null!==(s=r._replaced_fields)&&void 0!==s?s:[]).concat(["url"]);break;case"path":var d,f=ke(0,t,(function(){return r.request_path}),"",""),h=k(r.request_url);h.pathname=f,r.request_url=h.href,r.request_path=f,r._replaced_fields=ee(null!==(d=r._replaced_fields)&&void 0!==d?d:[]).concat(["url"]);break;case"search":var m,v=ke(0,t,(function(){return ge(r.search,t.field)}),void 0,""),y=function(e,t,r){for(var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=encodeURIComponent(t),o="?"===e[0],i=(o?e.slice(1):e).split("&"),l=!1,c=0;c<i.length;c++){var s=Z(i[c].split("="),2),u=s[0];if(s[1],u===a){if(l=!0,void 0===r){i.splice(c,1);break}var p=encodeURIComponent(r);i[c]="".concat(a,"=").concat(p);break}}if(n&&!l&&void 0!==r){var d=encodeURIComponent(r);i.push("".concat(a,"=").concat(d))}return"".concat(o?"?":"").concat(i.join("&"))}(r.search,t.field,v),_=k(r.request_url);_.search=y,r.request_url=_.href,r.search=y,r._replaced_fields=ee(null!==(m=r._replaced_fields)&&void 0!==m?m:[]).concat(["url"]);break;case"header":var b,g,w,R,x=ke(0,t,(function(){var e;return null===(e=r.header_map)||void 0===e?void 0:e[t.field]}),void 0,"");if(void 0===x)null===(b=r.header_map)||void 0===b||delete b[t.field];else r.header_map=Q(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){X(e,t,r[t])}))}return e}({},null!==(g=r.header_map)&&void 0!==g?g:{}),X({},t.field,x));r.header_names=Object.keys(null!==(w=r.header_map)&&void 0!==w?w:{}).join(","),r._replaced_fields=ee(null!==(R=r._replaced_fields)&&void 0!==R?R:[]).concat([t.type]);break;case"method":var O,S=ke(0,t,(function(){return r.method}),"","");r.method=S,r._replaced_fields=ee(null!==(O=r._replaced_fields)&&void 0!==O?O:[]).concat([t.type]);break;default:return r}return r._modified=!0,r}function xe(e,t){if(t.some((function(e){return"block"===e.handler})))return e._blocked=!0,e._modified=!0,e;var r=e,n=!0,a=!1,o=void 0;try{for(var i,l=function(){var e,t=i.value;if("report"===t.handler)return r._sample_rate=null!==(e=t.value)&&void 0!==e?e:1,"continue";r=$(r)?r.then((function(e){return Re(e,t)})):Re(r,t)},c=t[Symbol.iterator]();!(n=(i=c.next()).done);n=!0)l()}catch(e){a=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw o}}return r}var Oe=function(e,t){var r=function(e){return e.rule_name=t.ruleName?"".concat(e.rule_name?"".concat(e.rule_name,","):"").concat(t.ruleName):e.rule_name,e};e._modified=!1;var n=function(e,t){var r=!0,n=!0,a=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var c=we(e,i.value);if(!c||!r)return!1;($(c)||$(r))&&(r=Promise.all([c,r]).then((function(e){var t=Z(e,2),r=t[0],n=t[1];return r&&n}),(function(){return!1})))}}catch(e){a=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(a)throw o}}return r}(e,t.conditions.filter((function(e){return"context"!==e.type})));return $(n)?n.then((function(n){if(!n)return e;var a=xe(e,t.handlers);return $(a)?a.then(r):r(a)})):n?N(xe(e,t.handlers))(r):e};function Se(e){var t,r;return(null!==(r=null===(t=e._replaced_fields)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0||e._blocked||!1}function je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location,t=e.href,r=e.host,n=e.pathname,a=e.search,o=e.hash;return{url:t,host:r,path:n,search:a,hash:o}}function qe(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
qe=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof p?t:p,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return O()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var l=g(i,r);if(l){if(l===u)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function p(){}function d(){}function f(){}var h={};l(h,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==t&&r.call(v,a)&&(h=v);var y=f.prototype=p.prototype=Object.create(h);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,l){var c=s(e[a],e,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(p).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function g(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function x(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=f,l(y,"constructor",f),l(f,"constructor",d),d.displayName=l(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},_(b.prototype),l(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new b(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(y),l(y,i,"Generator"),l(y,a,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ee(e,t,r){return t&&Ae(e.prototype,t),r&&Ae(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Te(e){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Te(e)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}function Le(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function De(e,t,r){return De=Le()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&Pe(a,r.prototype),a},De.apply(null,arguments)}function Ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ue(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ie(e)}function He(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Te(e)););return e}function Me(){return Me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=He(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},Me.apply(this,arguments)}function Be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,t)||Fe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e){return function(e){if(Array.isArray(e))return Ge(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){if(e){if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(e,t):void 0}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Je(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Fe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw o}}}}var Ve=function(e){return"function"==typeof e},Ye=function(){};var ze=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),Xe=function(e,t,r){ze(e,r)&&(t[r]=e[r])};function Ke(e,t){if(!e)return[void 0,e];for(var r,n,a=e;a&&!n;)n=Object.getOwnPropertyDescriptor(a,t),r=a,a=Object.getPrototypeOf(a);return[n,r]}function Qe(e,t,r){try{var n=Be(Ke(e,t),2),a=n[0],o=n[1];if(!(null==a?void 0:a.configurable))return!1;var i={},l=a.set,c=a.get,s=r.set,u=r.get;return l&&s&&(i.set=function(e){s(e)||l.call(this,e)}),c&&u&&(i.get=function(){if(!u())return c.call(this)}),Object.defineProperty(o,t,i),!0}catch(e){}return!1}function Ze(e,t,r,n){try{var a=Be(Ke(e,t),2)[1];if("object"===$e(a)&&a&&Ve(a[t])){var o=a[t];a[t]=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=r.call.apply(r,[this].concat(t));return i?(null==n?void 0:n())||void 0:o.call.apply(o,[this].concat(t))}}}catch(e){}}function et(e){return e>Math.random()}function tt(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(new Error).stack;return null!==(e=null==r?void 0:r.split("\n").slice(t).map((function(e){return e.trim()})).join("\n"))&&void 0!==e?e:""}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="";for(var n in t)r+="; ".concat(n),r+="=".concat(t[n].split(";")[0]);document.cookie="".concat(e,"=; expires=").concat(new Date(Date.now()-864e5).toUTCString()).concat(r)}function nt(e){var t=e.split("=").slice(1).join("=");try{'"'===t[0]&&(t=t.slice(1,-1)),t=t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(e){}return t}function at(e,t){return function(){if(Math.random()<t)return e.apply(void 0,arguments)}}function ot(e,t){var r=S();return A(e,(function(e){return r.pushError(e)}),t)}function it(e){try{return JSON.parse(e)}catch(e){return}}/iPhone|iPad/.test(navigator.userAgent);var lt="cookie-consent",ct=["/404","/help/","/static/"];function st(e){var t=document.head.querySelector(e);if(!t)return null;try{var r=t.content.split(",").reduce((function(e,t){var r=Be(t.split("="),2),n=r[0],a=r[1];return e[n]=a,e}),{});return r}catch(e){return null}}function ut(){var e={},t=st("meta[name=pumbaa-web-config]");if(t)for(var r=0,n=Object.keys(t);r<n.length;r++){var a=n[r],o=t[a];Object.assign(e,Ce({},a,["true","false"].includes(o)?"true"===o:o))}else if(document.currentScript){var i=document.currentScript.dataset;Object.assign(e,null!=i?i:{})}return function(e,t){var r,n={},a=Je(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(Array.isArray(o)){var i,l=Je(o);try{for(l.s();!(i=l.n()).done;){var c=i.value;Xe(e,n,c)}}catch(e){l.e(e)}finally{l.f()}}else Xe(e,n,o)}}catch(e){a.e(e)}finally{a.f()}return n}(e,["business","env","region","sw","theme","host","rule","sw_version"])}function pt(e){var t={};try{for(var r=JSON.parse(e),n=0,a=Object.keys(r);n<a.length;n++){var o=a[n];t["cookie_".concat(o)]=r[o]}}catch(e){}return t}function dt(){var e=function(e){if("undefined"!=typeof document)for(var t=document.cookie?document.cookie.split("; "):[],r=0;r<t.length;r++){var n=t[r].split("=");try{if(e===decodeURIComponent(n[0]))return nt(t[r])}catch(e){}}}(lt);return e?pt(e):{}}function ft(e,t){var r,n=S();null!==(r=n.pageContextObservers)&&void 0!==r||(n.pageContextObservers=[]),n.pageContextObservers.push({func:e,fields:t})}function ht(){var e,t,r=S();if(!r.pageContext){var n=null!==(t=st("meta[name=pumbaa-ctx]"))&&void 0!==t?t:{},a=ut(),o=a.region,i=a.business,l=a.env,c=dt(),s=je(),u=function(){if(window.dataLayer)return{gtm:"1"};var e;return ot((function(){Object.defineProperty(window,"dataLayer",{get:function(){return e},set:function(t){e=t,vt().updatePageContext({gtm:"1"})}})})),{}}(),p=function(e,t){return"goofy-deploy-app-967"!==e?{}:ct.some((function(e){return 0===t.indexOf(e)}))?{ftc:"0"}:{ftc:"1",login:"1"}}(i,s.path),d=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({region:o,business:i,env:l},c),s),n),u),p);e=function(){vt().updatePageContext(je())},window.addEventListener("popstate",e),["pushState","replaceState"].forEach((function(t){var r=History.prototype[t];History.prototype[t]=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];r.apply(this,n),e()}})),r.pageContext=d}return r.pageContext}var mt=function(){var e,t;return null!==(t=null===(e=S())||void 0===e?void 0:e.pageContextObservers)&&void 0!==t?t:[]},vt=ot((function(){var e,t,r=function(e,t){var r=e(),n=t();return function(e){var t=Object.keys(e),a={},o=!0,i=!1,l=void 0;try{for(var c,s=t[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var u=c.value;r[u]!==e[u]&&(a[u]=e[u])}}catch(e){i=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}if(0!==Object.keys(a).length){Object.assign(r,a);var p=!0,d=!1,f=void 0;try{for(var h,m=n[Symbol.iterator]();!(p=(h=m.next()).done);p=!0){var v=h.value;(void 0===v.fields||v.fields.some((function(e){return void 0!==a[e]})))&&v.func(r)}}catch(e){d=!0,f=e}finally{try{p||null==m.return||m.return()}finally{if(d)throw f}}}}}(ht,mt),n=ot(r);return null!==(e=(t=S()).updateContext)&&void 0!==e||(t.updateContext=function(e){if("object"!==$e(r=e)||null===r);else{var t=Object.keys(e).filter((function(e){return function(e){return"string"==typeof e}(e)})).reduce((function(t,r){return t[r]=e[r],t}),{});n(t)}var r}),{updatePageContext:n,pageContext:ht()}}),{updatePageContext:function(){},pageContext:je()});function yt(){var e,t=q();if(null===t)throw new Error("");if(!t.ruleset){var r=null===(e=document.getElementById("pumbaa-rule"))||void 0===e?void 0:e.textContent,n=r?it(r):void 0;t.ruleset=n||{cookie:{blockers:[{cookies:["MONITOR_WEB_ID","MONITOR_DEVICE_ID","ktlvDW7IG5ClOcxYTbmY"],domains:["tiktok.com","tiktokv.com"]}],enabled:!0,sampleRate:.07,stackCollectCookies:[""],stackSampleRate:.07},event:{listener:[{sampleRate:.003,type:"a_click"},{sampleRate:.03,type:"navigation_navigate"},{sampleRate:.03,type:"submit_click"}]},network:{fpBody:"0.1",freq:[{freqSampleRate:1,reportList:["https://www.google-analytics.com/collect","https://www.google-analytics.com/j/collect","https://www.google-analytics.com/g/collect"],ruleName:"ga",urlPattern:["www.tiktok.com/amp/tag/","getstarted.tiktok.com/","www.tiktok.com/business"]}],intercept:[{conditions:[{pattern:{$prefix:"http://"},type:"url"}],handlers:[{handler:"replace",pattern:{$prefix:"http://"},type:"url",value:"https://"}],priority:-1e3,ruleName:"plain_text"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/legal\\/page\\/global\\/right-to-object(?:\\/(en|el-GR|hr-HR))[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/tns-inapp\\/pages\\/account_status[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"inapp.tiktokv.com"},type:"context"},{field:"path",pattern:{$regex:"\\/tpp\\/associated-video\\/aggregation[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/creator-discover-list\\/foodies[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/community-guidelines\\/id-id\\/mental-behavioral-health[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"affiliate.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/plan\\/shop-based\\/manage-creator[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/tiktok-rewards\\/keara-wilsons-viral-tiktok-on-savage[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/browse\\/extreme-sports\\/all[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/setting\\/account-deletion\\/oauth[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"},{field:"path",pattern:{$regex:"\\/creator-discover-list\\/innovators[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"host",pattern:{$eq:"api.tiktokglobalshopv.com"},type:"context"},{field:"path",pattern:{$regex:"\\/m\\/fe_seller_main\\/product\\/index\\.html\\/create[\\/]?$"},type:"context"}],handlers:[{handler:"report",type:"self",value:1}],priority:-100,ruleName:"low_pv_report"},{conditions:[{field:"business",pattern:{$regex:"^serverless\\.tiktok\\.(desktop|mobile)$"},type:"context"}],handlers:[{handler:"report",type:"self",value:.01}],priority:-1,ruleName:""},{conditions:[{field:"cookie_hubspot",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$eq:"forms.hsforms.com"},type:"host"}],handlers:[{handler:"report",type:"self",value:1}],priority:0,ruleName:"hubspot_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"url",pattern:{$prefix:"https://music.tiktok.com"},type:"context"},{pattern:{$regex:"^(www.google-analytics.com|analytics.google.com|stats.g.doubleclick.net|region1.analytics.google.com)$"},type:"host"},{pattern:{$prefix:"/g/collect"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:1,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$regex:"^(www.google-analytics.com|analytics.google.com|stats.g.doubleclick.net|region1.analytics.google.com)$"},type:"host"},{pattern:{$prefix:"/g/collect"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:2,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"www.google-analytics.com/mp/collect"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:3,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$regex:"^www.google.[\\S+]$"},type:"host"},{pattern:{$prefix:"/pagead/1p-user-list/735939924"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:4,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$regex:"^(googleads.g.doubleclick.net|www.googleadservices.com)$"},type:"host"},{pattern:{$regex:"^/pagead/(viewthroughconversion|conversion)$"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:5,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_ga",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$regex:"^(www.google.com|googleads.g.doubleclick.net)$"},type:"host"},{pattern:{$prefix:"/pagead/landing"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:6,ruleName:"ga_cookie_consent_error"},{conditions:[{field:"cookie_fbp",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"www.facebook.com/tr"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:7,ruleName:"facebook_pixel_cookie_consent_error"},{conditions:[{field:"cookie_fbp",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"connect.facebook.net/signals/config"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:8,ruleName:"facebook_pixel_cookie_consent_error"},{conditions:[{field:"cookie_lip",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$eq:"px.ads.linkedin.com"},type:"host"},{pattern:{$regex:"^/(wa|collect)/?$"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priority:9,ruleName:"linkedin_cookie_consent_error"},{conditions:[{field:"cookie_bing",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"bat.bing.com/action/0"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:10,ruleName:"bing_cookie_consent_error"},{conditions:[{field:"cookie_bing",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"bat.bing.com/p/insights/c"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:11,ruleName:"bing_cookie_consent_error"},{conditions:[{field:"cookie_ttads",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"analytics.tiktok.com/api/v2/pixel"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:12,ruleName:"tiktok_pixel_cookie_consent_error"},{conditions:[{field:"cookie_reddit",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$text:"alb.reddit.com/rp.gif"},type:"url"}],handlers:[{handler:"report",type:"self",value:1}],priority:13,ruleName:"reddit_cookie_consent_error"},{conditions:[{field:"url",pattern:{$regex:"https://www.tiktok.com/business"},type:"context"},{pattern:{$regex:"^js.hsforms.net|forms.hsforms.com$"},type:"host"}],handlers:[{handler:"report",type:"self",value:1}],priority:14,ruleName:"hubspot_report_test"},{conditions:[{field:"url",pattern:{$prefix:"https://getstarted.tiktok.com/vn-brand"},type:"context"},{pattern:{$text:"reddit"},type:"host"}],handlers:[{handler:"report",type:"self",value:.5}],priority:15,ruleName:"reddit_report_test"},{conditions:[{field:"battery_info",pattern:{$exists:!0},type:"search"},{pattern:{$regex:"^(us|www)\\.tiktok\\.com$"},type:"host"}],handlers:[{field:"battery_info",handler:"remove",pattern:{$exists:!0},type:"search"}],priority:16,ruleName:"battery_info_query_block"},{conditions:[{field:["battery_info"],pattern:{$exists:!0},type:"body"},{pattern:{$regex:"^(us|www)\\.tiktok\\.com$"},type:"host"}],handlers:[{field:["battery_info"],handler:"remove",pattern:{$exists:!0},type:"body"}],priority:17,ruleName:"battery_info_body_block"},{conditions:[{pattern:{$regex:"www\\.google-analytics\\.com\\/analytics.js|stats\\.g\\.doubleclick\\.net\\/j\\/collect|www\\.google-analytics\\.com\\/j\\/collect|ssl\\.google-analytics\\.com\\/__utm\\.gif"},type:"url"}],handlers:[{handler:"block",type:"self"}],priority:18,ruleName:"ga3_block"},{conditions:[{pattern:{$prefix:"https://ssl.google-analytics.com/__utm.gif"},type:"url"}],handlers:[{handler:"block",type:"self"}],priority:19,ruleName:"ua_block"},{conditions:[{pattern:{$prefix:"https://stats.g.doubleclick.net/j/collect"},type:"url"}],handlers:[{handler:"block",type:"self"}],priority:20,ruleName:"ua_block"},{conditions:[{pattern:{$prefix:"https://www.google-analytics.com/analytics.js"},type:"url"}],handlers:[{handler:"block",type:"self"}],priority:21,ruleName:"ua_block"},{conditions:[{pattern:{$prefix:"https://www.youtube.com/iframe_api"},type:"url"},{field:"host",pattern:{$eq:"www.tiktok.com"},type:"context"}],handlers:[{handler:"block",type:"self"}],priority:22,ruleName:"youtube_cutoff"},{conditions:[{pattern:{$prefix:"https://www.google-analytics.com/j/collect"},type:"url"}],handlers:[{handler:"block",type:"self"}],priority:23,ruleName:"ua_block"},{conditions:[{field:"business",pattern:{$eq:"serverless.tiktok.ftc"},type:"context"},{pattern:{$eq:"https://mcs-va.tiktokv.com/v1/list"},type:"url"},{pattern:{$eq:"POST"},type:"method"}],handlers:[{handler:"block",type:"self"}],priority:24,ruleName:"km_logging_block"},{conditions:[{field:"cookie_optional",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$eq:"player.vimeo.com"},type:"host"},{pattern:{$prefix:"/video"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priorty:0,ruleName:"vimeo_cookie_consent_error"},{conditions:[{field:"cookie_optional",pattern:{$ne:!0},type:"context"},{field:"cb_enabled",pattern:{$eq:"1"},type:"context"},{pattern:{$regex:"^(www.youtube-nocookie.com|www.youtube.com)$"},type:"host"},{pattern:{$prefix:"/embed"},type:"path"}],handlers:[{handler:"report",type:"self",value:1}],priorty:0,ruleName:"youtube_cookie_consent_error"}],rawVal:[{endpoint:["https://maliva-mcs.byteoversea.com/list","https://maliva-mcs.byteoversea.com/v1/list","https://mcs-i18n.tiktok.com/v1/list","https://mcs-ie.tiktokw.eu/list","https://mcs-ie.tiktokw.eu/v1/list","https://mcs-sg.tiktok.com/list","https://mcs-sg.tiktok.com/v1/list","https://mcs-sg.tiktokv.com/list","https://mcs-sg.tiktokv.com/v1/list","https://mcs-ttp2.us.tiktok.com/v1/list","https://mcs-va-useast2a.tiktokv.com/list","https://mcs-va-useast2a.tiktokv.com/v1/list","https://mcs-va.tiktok.com/list","https://mcs-va.tiktok.com/v1/list","https://mcs-va.tiktokv.com/list","https://mcs-va.tiktokv.com/v1/list","https://mcs.snssdk.com/list","https://mcs.snssdk.com/v1/list","https://mcs.tiktokv.us/v1/list","https://mcs.tiktokw.us/list","https://mcs.tiktokw.us/v1/list","https://mcs.us.tiktok.com/list","https://mcs.us.tiktok.com/v1/list","https://mcs.us.tiktokv.com/v1/list","https://mcs.zijieapi.com/list","https://sgali-mcs.byteoversea.com/list","https://sgali-mcs.byteoversea.com/v1/list"],keyPath:["0.header.app_id","0.header.sdk_lib","0.header.sdk_version","0.events.0.event"]}],respHeaders:["content-type"],sampleRate:.03,withStack:[{endpoint:["cursors-4u.net","cursor.cc"],rate:.1,urlPattern:["www.tiktok.com"]}]},reporter:{freqInterval:3e4,freqSize:30,interval:3e3,size:15},storage:{enabled:!0,sampleRate:1e-4,stackCollectKeys:[],valueRate:0},webapi:{apis:[{apiName:"share",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:.03,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"open",apiObj:"",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:.03,stackRate:0,withRawArguments:[!0,!0],withStack:!1},{apiName:"RTCPeerConnection",apiObj:"",apiType:"constructor",freqSampleRate:0,paramCondition:{},sampleRate:.03,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"WebSocket",apiObj:"",apiType:"constructor",freqSampleRate:0,paramCondition:{},sampleRate:.03,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"execCommand",apiObj:"document",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{0:"paste"},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"execCommand",apiObj:"document",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{0:"copy"},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"readText",apiObj:"navigator.clipboard",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"writeText",apiObj:"navigator.clipboard",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"getUserMedia",apiObj:"navigator.mediaDevices",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:1,withRawArguments:[!0],withStack:!0},{apiName:"getUserMedia",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"webkitGetUserMedia",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"mozGetUserMedia",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"ondeviceorientation",apiObj:"",apiType:"attribute_set",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"ondeviceorientationabsolute",apiObj:"",apiType:"attribute_set",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"getCurrentPosition",apiObj:"navigator.geolocation",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:1,withRawArguments:[!1,!1,!0],withStack:!1},{apiName:"watchPosition",apiObj:"navigator.geolocation",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:1,withRawArguments:[!1,!1,!0],withStack:!1},{apiName:"clearWatch",apiObj:"navigator.geolocation",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:1,withRawArguments:[],withStack:!1},{apiName:"AbsoluteOrientationSensor",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"GravitySensor",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"Gyroscope",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"LinearAccelerationSensor",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"Magnetometer",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"RelativeOrientationSensor",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"Accelerometer",apiObj:"",apiType:"constructor",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:.5,withRawArguments:[!0],withStack:!1},{apiName:"vibrate",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:.1,withRawArguments:[],withStack:!0},{apiName:"webkitVibrate",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"mozVibrate",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"msVibrate",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"getDisplayMedia",apiObj:"navigator.mediaDevices",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"addEventListener",apiObj:"",apiType:"method",block:!1,freqSampleRate:.01,paramCondition:{0:"deviceorientation"},sampleRate:.01,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"addEventListener",apiObj:"",apiType:"method",block:!1,freqSampleRate:.01,paramCondition:{0:"devicemotion"},sampleRate:.01,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"addEventListener",apiObj:"",apiType:"method",block:!1,freqSampleRate:1,paramCondition:{0:"MozOrientation"},sampleRate:1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"addEventListener",apiObj:"",apiType:"method",block:!1,freqSampleRate:.1,paramCondition:{0:"deviceorientationabsolute"},sampleRate:.1,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"referrer",apiObj:"document",apiType:"attribute_get",block:!1,freqSampleRate:1e-4,paramCondition:{},sampleRate:1e-4,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"Notification",apiObj:"",apiType:"constructor",freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"mozNotification",apiObj:"navigator",apiType:"constructor",freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"webkitNotification",apiObj:"",apiType:"constructor",freqSampleRate:1,paramCondition:{},sampleRate:1,stackRate:0,withRawArguments:[],withStack:!1},{apiName:"getBattery",apiObj:"navigator",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:0,withStack:!1},{apiName:"read",apiObj:"navigator.clipboard",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:0,withStack:!1},{apiName:"addEventListener",apiObj:"document",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{0:"paste"},sampleRate:5e-5,stackRate:0,withRawArguments:[!0],withStack:!1},{apiName:"write",apiObj:"navigator.clipboard",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"execCommand",apiObj:"document",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{0:"cut"},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"addEventListener",apiObj:"document",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{0:"copy"},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"addEventListener",apiObj:"document",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{0:"cut"},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"ondevicemotion",apiObj:"",apiType:"attribute_set",freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"OrientationSensor",apiObj:"",apiType:"constructor",freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"create",apiObj:"navigator.credentials",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"get",apiObj:"navigator.credentials",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"get",apiObj:"CookieStore",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"getAll",apiObj:"CookieStore",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"set",apiObj:"CookieStore",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"delete",apiObj:"CookieStore",apiType:"method",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0],withStack:!0},{apiName:"cookie",apiObj:"document",apiType:"attribute_get",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"PaymentRequest",apiObj:"",apiType:"constructor",freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[!0,!0,!0],withStack:!0},{apiName:"userAgent",apiObj:"navigator",apiType:"attribute_get",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0},{apiName:"screen",apiObj:"",apiType:"attribute_get",block:!1,freqSampleRate:0,paramCondition:{},sampleRate:5e-5,stackRate:.001,withRawArguments:[],withStack:!0}],enabled:!0}}}return t.ruleset}var _t="".trimStart||function(){return this.replace(/^[\s\uFEFF\xA0]+/,"")};function bt(e){var t,r=e.blockers,n=Je(void 0===r?[]:r);try{for(n.s();!(t=n.n()).done;){var a=t.value,o=a.domains,i=void 0===o?[]:o,l=a.cookies,c=void 0===l?[]:l;if(i.some((function(e){return location.hostname.endsWith(e)})))return c}}catch(e){n.e(e)}finally{n.f()}return[]}function gt(e){var t=e.split("=")[0];return t?_t.call(t):void 0}var wt,kt,Rt=function(e){return function(t){if("name"===t.type)return e.name}},xt=function(e,t){try{var r,n=Object.assign({},e),a=Je(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;if("self"===o.type)E(n,o)}}catch(e){a.e(e)}finally{a.f()}return n}catch(t){return e}},Ot=function(e,t){var r=bt(t),n=t.stackCollectCookies.map((function(e){return new RegExp(e)}));Qe(document,"cookie",{set:function(a){var o,i,l={rawValue:a,name:gt(a),_time:Date.now(),_blocked:!1,_sample_rate:t.sampleRate,_stack_rate:0,_rule_names:[]};if("string"==typeof a){l._blocked=r.includes(l.name),l._blocked||function(e,t){var r,n=Je(t);try{for(n.s();!(r=n.n()).done;){var a=r.value,o=a.conditions,i=a.ruleName,l=a.handlers;Y(o,Rt(e))&&(i&&e._rule_names.push(i),Object.assign(e,xt(e,l)))}}catch(e){n.e(e)}finally{n.f()}}(l,null!==(i=t.intercept)&&void 0!==i?i:[]);var c=(l._stack_rate||t.stackSampleRate||0)/l._sample_rate;at((function(){var r=l._stack_rate>0||t.stackSampleRate&&n.some((function(e){return e.test(l.name)}));l.stack=r?at(tt,c)():void 0,e(l)}),l._sample_rate)()}return l.name===lt&&vt().updatePageContext(pt(null!==(o=function(e){var t,r=e.split(";"),n=!1,a=r.shift(),o=a?decodeURIComponent(a.split("=")[1]):void 0,i=Je(r);try{for(i.s();!(t=i.n()).done;){var l=t.value,c=Be(_t.apply(l).split("=")[0],2),s=c[0],u=c[1];if("max-age"===s&&Number(u)<0)return;"expires"===s&&(n=Date.parse(u)<Date.now())}}catch(e){i.e(e)}finally{i.f()}return n?void 0:o}(a))&&void 0!==o?o:"{}")),l._blocked}}),Ze(window.cookieStore,"set",(function(){for(var e=!1,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return 1===n.length&&"object"===$e(n[0])&&n[0]?e=r.includes(n[0].name):2===n.length&&"string"==typeof n[0]&&(e=r.includes(n[0])),e}),Promise.reject)},St=(wt=[],function(){if(0===wt.length)for(var e=location.hostname.split(".").filter(Boolean),t=e.length,r=0;r<t-1;r++){var n=e.slice(r).join(".");wt.push(n,".".concat(n)),wt.push(n,n)}return wt}),jt=(kt=[],function(){if(0===kt.length){kt.push("/");for(var e=location.pathname.split("/").filter(Boolean),t=e.length,r=0;r<t;r++)kt.push("/".concat(e.slice(0,t-r).join("/")))}return kt});var qt=function(e,t){!function(e,t){var r,n=Je(document.cookie.split(";").filter(Boolean));try{for(n.s();!(r=n.n()).done;){var a=gt(r.value);if(-1!==e.indexOf(a)){var o,i=St(),l=jt(),c=Je(i);try{for(c.s();!(o=c.n()).done;){var s,u=o.value,p=Je(l);try{for(p.s();!(s=p.n()).done;)rt(a,{domain:u,path:s.value})}catch(e){p.e(e)}finally{p.f()}}}catch(e){c.e(e)}finally{c.f()}t(a)}}}catch(e){n.e(e)}finally{n.f()}}(bt(t),(function(t){e.pushEvent(n,{cookie:t})})),Ot(ot((function(t){e.pushEvent(r,t)})),t)};function $t(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function l(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}c((n=n.apply(e,t||[])).next())}))}var Nt="setItem",At="getItem",Et="removeItem",Ct=function(){try{return!!window.localStorage}catch(e){return!1}}(),Tt=function(e,t){var r;Ct&&(r=ot((function(t){e.pushEvent(l,t)})),Ze(localStorage,At,(function(e){return r({storageType:this===localStorage?"localStorage":"sessionStorage",operateType:At,key:e}),!1})),Ze(localStorage,Et,(function(e){return r({storageType:this===localStorage?"localStorage":"sessionStorage",operateType:Et,key:e}),!1})),Ze(localStorage,Nt,(function(e,t){return r({storageType:this===localStorage?"localStorage":"sessionStorage",operateType:Nt,key:e,value:t}),!1})))},Pt="webapi",Lt="network",Dt="onvisibilitychange"in document&&Ct&&"function"==typeof navigator.sendBeacon,It="PUMBAA_FREQ",Ut=function(e){if(null===e)return{};var t=function(e){if("string"!=typeof e)return null;try{return JSON.parse(e)}catch(e){return null}}(e);return null===t||"object"!==$e(t)?{}:Object.keys(t).filter((function(e){return"number"==typeof t[e]})).reduce((function(e,r){return e[r]=t[r],e}),{})},Ht=function(e,t){switch(t){case Pt:var r=e.apiObj,n=e.apiName,a=e.paramCondition;return C(r,n,a);case Lt:return"".concat(t,"_").concat(e.ruleName);default:return""}},Mt=function(e){var t,r;if(!Dt)return[];for(var n,a,o=Ut(localStorage.getItem(It)),i=null!=o?o:{},l=0,c=Object.keys(e);l<c.length;l++){var s,u=c[l],p=Je(null!==(t=e[u])&&void 0!==t?t:[]);try{for(p.s();!(s=p.n()).done;){var d=s.value,f=Ht(d,u),h=null!==(r=d.freqSampleRate)&&void 0!==r?r:0,m=f in o&&(n=h,a=o[f]%1,Math.abs(n-a)<Number.EPSILON);i[f]=m?o[f]:Math.max(0,Math.min(1,h))+(Math.random()<h?1:0)}}catch(e){p.e(e)}finally{p.f()}localStorage.setItem(It,JSON.stringify(i))}var v=Object.keys(i).filter((function(e){return i[e]>1&&i[e]<=2}));return v};function Bt(e,t){for(var r in t){var n=t[r];if(e[r]!==n)return!1}return!0}var Wt,Ft=Ye,Gt=function(e,t){var r,n=t.apis,a=e.webapiHook,o=e.webapiFreqHook,i=Mt({webapi:n}),l=Je(n);try{var c=function(){var e=r.value,t=e.sampleRate,n=e.apiType,l=e.apiObj,c=e.block,s=e.blockUrls,u=void 0===s?[]:s,p=e.blockWithCallbackParams,d=e.blockWithCallbackIdx,f=e.apiName,h=e.paramCondition,m=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=Je(e.split(".").filter(Boolean));try{for(n.s();!(t=n.n()).done;){if(!(r=r[t.value]))return null}}catch(e){n.e(e)}finally{n.f()}return r}(l);if(!m)return"continue";var v=A((function(){for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];if(!Bt(n,h))return!1;var m=c||u.some((function(e){return new RegExp(e).test(document.location.href)}));if(et(t)&&a({apiRule:e,args:n,_blocked:m}),m&&(Ft(C(l,f)),"number"==typeof d)){var v=n[d];"function"==typeof v&&v.apply(null,[].concat(p))}return o&&!m&&i.includes(C(l,f,h))&&o({type:Pt,eventDetail:e,time:Date.now()}),Boolean(m)}),void 0,!1);switch(n){case"method":Ze(m,f,v);break;case"attribute_set":Qe(m,f,{set:v});break;case"attribute_get":Qe(m,f,{get:v});break;case"constructor":!function(e,t,r){try{return Ve(null==e?void 0:e[t])&&void 0!==window.Proxy&&(e[t]=new Proxy(e[t],{construct:function(e,t){return r.apply(void 0,We(t))?null:De(e,We(t))}})),!0}catch(e){}}(m,f,v)}};for(l.s();!(r=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}},Jt=["x-tt-logid","x-tt-traceflag"],Vt=function(e,t){return ot(Oe,e)(e,t)},Yt=function(e,t){var r=k(e);return!!r&&t.some((function(e){return"".concat(r.host).concat(r.pathname).startsWith(e)}))},zt=function(e){return Yt(location.href,e)},Xt=function(e,t){return Yt(t,e)},Kt=function(e,t,r,n){var a,o,i=null!==(a=yt().network.respHeaders)&&void 0!==a?a:[],l={},c=Je(Jt);try{for(c.s();!(o=c.n()).done;){var s=o.value;n[s]&&!i.includes(s)&&i.push(s)}}catch(e){c.e(e)}finally{c.f()}var u,p=Je(i);try{for(p.s();!(u=p.n()).done;){var d=u.value,f=n[d];f&&"string"==typeof f&&(l[d]=f)}}catch(e){p.e(e)}finally{p.f()}N(r)((function(r){t(Object.assign(Object.assign({},r),{resp_status:e,resp_header:l}))}))},Qt=function(e,t){if(t)return t.filter((function(e){return zt(e.urlPattern)})).find((function(t){return Xt(t.endpoint,e)}))},Zt=function(e){return"1"===e["x-pns-block"]||e._blocked||!1};function er(e){var t=e.switcher,r=e.request,n=e.eventDetail,a=t.callback,o=t.callbackEnabled,i=t.activeInterceptRules;if(ie(n.request_url,document.URL))return r;return e.callstack&&(n.stack=e.callstack),n=i.reduce((function(e,t){return N(e)((function(e){return ye(t)?be(e,t):Vt(e,t)}))}),n),N(n)((function(t){var n,i,l,c,s,u,p,d,f;if("1"===t["x-pns-block"]?f=se():t._blocked&&(f=ue()),$(t.body)?(null!==(i=null===(n=yt().network.respHeaders)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0?e.reportRequestEventDetail=t.body.then((function(e){return Object.assign(Object.assign({},t),{body:e})})):t.body.then((function(e){var r=Object.assign(Object.assign({},t),{body:e});a.report(r)})):(null!==(c=null===(l=yt().network.respHeaders)||void 0===l?void 0:l.length)&&void 0!==c?c:0)>0?e.reportRequestEventDetail=t:a.report(t),(null!==(u=null===(s=yt().network.freq)||void 0===s?void 0:s.length)&&void 0!==u?u:0)>0&&o.freq&&(null===(p=a.freq)||void 0===p||p.call(a,t)),f)return f;t._remove_body=-1!==(null!==(d=t._replaced_fields)&&void 0!==d?d:[]).indexOf("method")&&-1!==["GET","HEAD"].indexOf(t.method);var h=function(e,t){if(!t._replaced_fields||0===t._replaced_fields.length)return e;var r=-1!==t._replaced_fields.indexOf("body"),n=function(){var n=Promise.resolve(void 0);return t._remove_body?Promise.resolve(void 0):(r?(t.body=JSON.stringify(t.body),n=Promise.resolve(t.body)):e.headers.get("Content-Type")&&-1===["GET","HEAD"].indexOf(e.method.toUpperCase())&&(n=e.blob()),n)},a=e;if(-1!==t._replaced_fields.indexOf("url")||t._remove_body)a=n().then((function(r){var n,a={method:t.method,headers:new Headers(null!==(n=t.header_map)&&void 0!==n?n:{}),referrer:e.referrer,referrerPolicy:e.referrerPolicy,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal,body:r};return new Request(t.request_url,a)}));else{var o,i={};-1!==t._replaced_fields.indexOf("method")&&(i.method=t.method),-1!==t._replaced_fields.indexOf("header")&&(i.headers=new Headers(null!==(o=t.header_map)&&void 0!==o?o:{})),a=r?n().then((function(t){return i.body=t,new Request(e,i)})):new Request(e,i)}return a}(r,t);return h}))}!function(e){e[e.SW_READY=0]="SW_READY"}(Wt||(Wt={}));var tr={request_url:"",request_host:"",request_path:"",search:"",method:"",source:de,_request_time:0,_sample_rate:0,_is_json_body:!1,_replaced_fields:[]};function rr(e,t,r){var n=!1,a=function(){n=!0;var a=(r.getAllResponseHeaders()||"").trim().split(/[\r\n]+/).reduce((function(e,t){var r=t.indexOf(":");if(r>-1){var n=t.slice(0,r).trim().toLowerCase(),a=t.slice(r+1).trim();e[n]=a}return e}),{});Kt(r.status,t,e,a)};r.addEventListener("load",a),setTimeout((function(){n||(t(e),r.removeEventListener("load",a))}),5e3)}var nr={};function ar(e){var t=e.OriginalXHR,r=e.rule,n=e.switcher;if(0===Object.keys(nr).length)for(var a in t.prototype)nr[a]={enumerable:!0};return function(){var e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pe(e,t)}(i,e);var t,a,o=(t=i,a=Le(),function(){var e,r=Te(t);if(a){var n=Te(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return Ue(this,e)});function i(){var e;return Ne(this,i),(e=o.call(this)).__pumbaa_status=null,e.__pumbaa_readyState=null,e.__pumbaa_statusText=null,e.__pumbaa_detail=tr,Ie(e)instanceof i||Object.setPrototypeOf(Ie(e),(this instanceof i?this.constructor:void 0).prototype),e.__pumbaa_callbackEnabled=Object.assign({},n.callbackEnabled),e}return Ee(i,[{key:"status",get:function(){return null===this.__pumbaa_status?Me(Te(i.prototype),"status",this):this.__pumbaa_status},set:function(e){this.__pumbaa_status=e}},{key:"statusText",get:function(){return null===this.__pumbaa_statusText?Me(Te(i.prototype),"statusText",this):this.__pumbaa_statusText},set:function(e){this.__pumbaa_statusText=e}},{key:"readyState",get:function(){return null===this.__pumbaa_readyState?Me(Te(i.prototype),"readyState",this):this.__pumbaa_readyState},set:function(e){this.__pumbaa_readyState=e}},{key:"__pumbaa_hookFunc",value:function(e){var t=this;return function(){for(var r,n,a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];if(t["__pumbaa_".concat(e)]){var c=ot(null===(n=t["__pumbaa_".concat(e)])||void 0===n?void 0:n.bind(t)).apply(void 0,o);if(!0===c)return;if(c&&("getResponseHeader"===e||"getAllResponseHeaders"===e))return c}return(r=Me(Te(i.prototype),e,t)).call.apply(r,[t].concat(o))}}},{key:"getResponseHeader",value:function(){return this.__pumbaa_hookFunc("getResponseHeader").apply(void 0,arguments)}},{key:"getAllResponseHeaders",value:function(){return this.__pumbaa_hookFunc("getAllResponseHeaders").apply(void 0,arguments)}},{key:"setRequestHeader",value:function(){return this.__pumbaa_hookFunc("setRequestHeader").apply(void 0,arguments)}},{key:"open",value:function(){return this.__pumbaa_hookFunc("open").apply(void 0,arguments)}},{key:"send",value:function(){return this.__pumbaa_hookFunc("send").apply(void 0,arguments)}},{key:"abort",value:function(){return this.__pumbaa_hookFunc("abort").apply(void 0,arguments)}},{key:"__pumbaa_getResponseHeader",value:function(){var e;if(void 0!==(null===(e=this.__pumbaa_res)||void 0===e?void 0:e.headers)){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=(null==r?void 0:r[0])?r[0].trim():"";if((a=a.toLowerCase())&&a in this.__pumbaa_res.headers)return this.__pumbaa_res.headers[a]}}},{key:"__pumbaa_getAllResponseHeaders",value:function(){var e;if(void 0!==(null===(e=this.__pumbaa_res)||void 0===e?void 0:e.headers)){var t="";return Object.keys(this.__pumbaa_res.headers).forEach((function(e){t="".concat(t+e,": ").concat(this._res.headers[e],"\r\n")})),t+Me(Te(i.prototype),"getAllResponseHeaders",this).call(this)}}},{key:"__pumbaa_setRequestHeader",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.__pumbaa_detail.header_map=Object.assign(Object.assign({},this.__pumbaa_detail.header_map),Ce({},r[0].toLowerCase(),r[1])),(e=Me(Te(i.prototype),"setRequestHeader",this)).call.apply(e,[this].concat(r)),!0}},{key:"__pumbaa_open",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0].toUpperCase(),o=new URL(r[1],location.href);this.__pumbaa_detail=Object.assign(Object.assign({},tr),{method:a,request_url:o.href,request_host:o.host,request_path:o.pathname,search:o.search});var l=[this.__pumbaa_detail.method,this.__pumbaa_detail.request_url].concat(We(r.slice(2)));return(e=Me(Te(i.prototype),"open",this)).call.apply(e,[this].concat(We(l))),!0}},{key:"__pumbaa_send",value:function(){var e,t,a,o,l,c,s,u,p,d,f,h,m=this;this.__pumbaa_detail._request_time=Date.now(),this.__pumbaa_detail.header_names=Object.keys(null!==(e=this.__pumbaa_detail.header_map)&&void 0!==e?e:{}).join(",");var v=arguments.length<=0?void 0:arguments[0];-1!==["GET","HEAD"].indexOf(this.__pumbaa_detail.method)&&(v=void 0);var y=void 0!==v&&"string"==typeof(null===(t=this.__pumbaa_detail.header_map)||void 0===t?void 0:t["content-type"])&&-1!==this.__pumbaa_detail.header_map["content-type"].indexOf("application/json")&&"string"==typeof v;this.__pumbaa_detail._is_json_body=y,this.__pumbaa_detail.body=y?JSON.parse(v):v;var _,b=Je(n.activeInterceptRules);try{for(b.s();!(_=b.n()).done;){var g=_.value;if(ye(g)){var w=g.ruleName,R=g.replace,x=g.allowlist,O=g.blocklist,S=g.enableSameOriginBlock,j=this.__pumbaa_detail.request_url;if(R){var q=(j=re(j,R))!==this.__pumbaa_detail.request_url;q&&(this.__pumbaa_detail.request_url=j,this.__pumbaa_detail["x-pns-replace"]="1",this.__pumbaa_detail._replaced_fields=[].concat(We(null!==(a=this.__pumbaa_detail._replaced_fields)&&void 0!==a?a:[]),["url"]),this.__pumbaa_detail.rule_name="".concat(this.__pumbaa_detail.rule_name?"".concat(this.__pumbaa_detail.rule_name,","):"").concat(w))}if(O||x){var $=ne(j,{allowlist:x,blocklist:O,enableSameOriginBlock:S});$&&(this.__pumbaa_detail["x-pns-block"]="1",this.__pumbaa_detail.rule_name="".concat(this.__pumbaa_detail.rule_name?"".concat(this.__pumbaa_detail.rule_name,","):"").concat(w))}}else this.__pumbaa_detail=Vt(this.__pumbaa_detail,g)}}catch(e){b.e(e)}finally{b.f()}if(Array.isArray(this.__pumbaa_detail._replaced_fields)&&(-1!==this.__pumbaa_detail._replaced_fields.indexOf("method")||-1!==this.__pumbaa_detail._replaced_fields.indexOf("url")||-1!==this.__pumbaa_detail._replaced_fields.indexOf("header"))){Me(Te(i.prototype),"open",this).call(this,this.__pumbaa_detail.method,this.__pumbaa_detail.request_url);for(var N=0,A=Object.keys(null!==(o=this.__pumbaa_detail.header_map)&&void 0!==o?o:{});N<A.length;N++){var E=A[N];Me(Te(i.prototype),"setRequestHeader",this).call(this,E,this.__pumbaa_detail.header_map[E])}}var C=k(this.__pumbaa_detail.request_url);if(C){var T=(null!==(l=r.withStack)&&void 0!==l?l:[]).filter((function(e){return zt(e.urlPattern)})),P=T.find((function(e){return Xt(e.endpoint,m.__pumbaa_detail.request_url)}));P&&at((function(){return m.__pumbaa_detail.stack=tt(9)}),P.rate)(),rr(this.__pumbaa_detail,n.callback.reportLogid,this),(null!==(s=null===(c=yt().network.respHeaders)||void 0===c?void 0:c.length)&&void 0!==s?s:0)>0?rr(this.__pumbaa_detail,n.callback.report,this):n.callback.report(this.__pumbaa_detail),(null!==(p=null===(u=yt().network.freq)||void 0===u?void 0:u.length)&&void 0!==p?p:0)>0&&this.__pumbaa_callbackEnabled.freq&&(null===(f=(d=n.callback).freq)||void 0===f||f.call(d,this.__pumbaa_detail))}if(Zt(this.__pumbaa_detail)){var L="1"===this.__pumbaa_detail["x-pns-block"]?se():ue();return this.__pumbaa_is_aborted||(this.status=L.status,this.readyState=4,this.statusText=L.statusText,this.__pumbaa_res={headers:We(L.headers).reduce((function(e,t){var r=Be(t,2),n=r[0],a=r[1];return e[n]=a,e}),{})},F.error("".concat(this.__pumbaa_detail.method," ").concat(this.__pumbaa_detail.request_url," ").concat(this.status," (").concat(this.statusText,")"))),!0}return void 0!==this.__pumbaa_detail._replaced_fields&&-1!==(null===(h=this.__pumbaa_detail._replaced_fields)||void 0===h?void 0:h.indexOf("body"))?(Me(Te(i.prototype),"send",this).call(this,y?JSON.stringify(this.__pumbaa_detail.body):this.__pumbaa_detail.body),!0):(Me(Te(i.prototype),"send",this).call(this,v),!0)}},{key:"__pumbaa_abort",value:function(){this.__pumbaa_is_aborted=!0}}]),i}(t);for(var a in e.prototype)delete nr[a];return Object.defineProperties(e.prototype,nr),e}()}var or="PerformanceObserver"in window,ir=["xmlhttprequest","fetch","beacon"];function lr(e,t){var r=e.switcher.activeInterceptRules.map((function(e){return ye(e)?e:Object.assign(Object.assign({},e),{handlers:e.handlers.filter((function(e){return"report"===e.handler}))})}));t.getEntries().forEach((function(t){if(e.isBufferedEntry||!ir.includes(t.initiatorType)){var n=function(e){var t=k(e.name);if(void 0!==t)return{request_url:t.href,request_host:t.host,request_path:t.pathname,method:"UNKNOWN",source:pe,search:t.search,_request_time:Math.trunc(e.startTime+performance.timeOrigin),initiator_type:e.initiatorType,resp_status:e.responseStatus,_is_json_body:!1,_sample_rate:0}}(t);if(n){n.perf_buf=e.isBufferedEntry;var a=e.switcher.getState(Wt.SW_READY);void 0!==a&&(n.sw_ready="".concat(a));var o,i=Object.assign({},n),l=Je(r);try{for(l.s();!(o=l.n()).done;){var c=o.value;i=ye(c)?be(i,c):Vt(i,c)}}catch(e){l.e(e)}finally{l.f()}i=Object.assign(Object.assign(Object.assign({},i),n),{_sample_rate:i._sample_rate}),setTimeout((function(){var r,n,a,o;-1===e.securityPolicyViolationURLs.indexOf(t.name)&&(e.switcher.callback.report(i),(null!==(n=null===(r=yt().network.freq)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0&&e.switcher.callbackEnabled.freq&&(null===(o=(a=e.switcher.callback).freq)||void 0===o||o.call(a,i)))}),100)}}})),e.isBufferedEntry=!1}var cr,sr,ur,pr=ot((function(e){var t={isBufferedEntry:!0,securityPolicyViolationURLs:function(){var e=[];return document.addEventListener("securitypolicyviolation",(function(t){var r=k(t.blockedURI);r&&"report"!==t.disposition&&-1===e.indexOf(r.href)&&(100===e.length&&e.shift(),e.push(r.href))})),e}(),switcher:e},r=or?new PerformanceObserver((function(e){return lr(t,e)})):null;try{null==r||r.observe({type:"resource",buffered:!0})}catch(e){lr(t,{getEntries:function(){return performance.getEntriesByType("resource")}}),null==r||r.observe({entryTypes:["resource"]})}})),dr=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,a,o,i,l,c,s,u=t[0],p=t[1],d=Date.now(),f=k(u,location.origin);p instanceof Blob?l=p.type?p.type:void 0:p instanceof FormData?l="multipart/form-data":window.URLSearchParams&&p instanceof URLSearchParams?l="application/x-www-form-urlencoded":"string"==typeof p&&(l="text/plain");var h=function(){"string"==typeof p&&(s=it(p)),c=void 0!==s},m={request_url:null!==(n=null==f?void 0:f.href)&&void 0!==n?n:"",request_host:null!==(a=null==f?void 0:f.host)&&void 0!==a?a:"",request_path:null!==(o=null==f?void 0:f.pathname)&&void 0!==o?o:"",search:null!==(i=null==f?void 0:f.search)&&void 0!==i?i:"",contentType:l,header_names:l?"content-type":void 0,header_map:l?{"content-type":l}:void 0,body:p,method:"POST",source:he,_request_time:d,_sample_rate:0,get _is_json_body(){return delete this._is_json_body,void 0===c&&h(),this._is_json_body=c,this._is_json_body},get _parsed_json_body(){return delete this._parsed_json_body,void 0===c&&h(),this._parsed_json_body=s,this._parsed_json_body}};return m},fr=function(e){var t=e.eventDetail,r=e.switcher.activeInterceptRules;if(ie(t.request_url,document.URL))return e.params;var n,a,o,i=Je(r);try{for(i.s();!(n=i.n()).done;){var l=n.value;if(ye(l))t=be(t,l);else{var c=Object.assign(Object.assign({},l),{handlers:l.handlers.filter((function(e){return"method"!==e.type&&"header"!==e.type}))});t=Vt(t,c)}}}catch(e){i.e(e)}finally{i.f()}return Zt(t)||(e.params=(a=e.params,(o=t)._replaced_fields&&0!==o._replaced_fields.length?(o.body=-1!==o._replaced_fields.indexOf("body")?JSON.stringify(o._parsed_json_body):o.body,[o.request_url,o.body]):a)),e.params},hr=function(e){var t,r=e.switcher,n=r.callback,a=r.callbackEnabled,o=e.eventDetail;n.report(o),a.freq&&(null===(t=n.freq)||void 0===t||t.call(n,o))},mr=function(){function e(t,r,n,a){if(Ne(this,e),null!==e._instance)return e._instance;this.initRule(r,a),this.states=Ce({},Wt.SW_READY,0),this.callback=t,this.callbackEnabled=n,this.initPerformance(),this.hookBeacon(),this.hookFetch(),this.hookXHR(),e._instance=this}return Ee(e,[{key:"initRule",value:function(e,t){this.rule=e,this.matchRulesByPageContext(t),ft(this.matchRulesByPageContext.bind(this),_e(this.rule.intercept))}},{key:"setState",value:function(e,t){this.states[e]=t}},{key:"getState",value:function(e){return this.states[e]}},{key:"matchRulesByPageContext",value:function(e){this.activeInterceptRules=function(e,t){return e.filter((function(e){return ye(e)?e.urlPattern.some((function(e){return"*"===e||-1!==t.url.indexOf(e)})):e.conditions.every((function(e){return"context"!==e.type||J(t[e.field],e.pattern)}))}))}(this.rule.intercept,e)}},{key:"hookBeacon",value:function(){if(navigator.sendBeacon){null!=ur||(ur=navigator.sendBeacon);var e=this;navigator.sendBeacon=function(){for(var t,r,n,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];var l=dr.apply(void 0,o);if((null!==(n=null===(r=yt().network.withStack)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0){var c=Qt(l.request_url,e.rule.withStack);c&&at((function(){return l.stack=tt(5)}),c.rate)()}var s={params:o,switcher:e,eventDetail:l},u=fr(s),p=Zt(s.eventDetail),d=!p&&(t=ur).call.apply(t,[this].concat(We(u)));return s.eventDetail.beacon_ret=d,(d||Se(s.eventDetail))&&hr(s),d}}}},{key:"hookFetch",value:function(){var e=this;if(window.fetch){var t=this.callback;null!=cr||(cr=window.fetch),window.fetch=function(){for(var r,n,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];var l=De(Request,o),c=Object.assign(Object.assign({},ve(l)),{source:fe}),s={request:l,switcher:e,eventDetail:Object.assign(Object.assign({},c),{source:fe})};if((null!==(n=null===(r=yt().network.withStack)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0){var u=Qt(s.request.url,e.rule.withStack);u&&at((function(){return s.callstack=tt(5)}),u.rate)()}var p=er(s);function d(e){var r,n=ot((function(e){var r,n,a=e.status,o=s.reportRequestEventDetail,i={};return e.headers.forEach((function(e,t){i[t.toLowerCase()]=e})),Kt(a,t.reportLogid,o,i),(null!==(n=null===(r=yt().network.respHeaders)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0&&Kt(a,t.report,o,i),e}));return(r=e instanceof Request?cr(e):Promise.resolve(e)).then(n).catch((function(){return r}))}return $(p)?p.then(d):d(p)}}}},{key:"hookXHR",value:function(){null!=sr||(sr=window.XMLHttpRequest);var e=ar({OriginalXHR:sr,rule:this.rule,reporter:this.callback,switcher:this});window.XMLHttpRequest=e}},{key:"initPerformance",value:function(){pr(this)}}],[{key:"getInstance",value:function(){if(null===e._instance){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(0===r.length)throw new Error("HookSwitcher should be initialized with reporter and rules");De(e,r)}return e._instance}}]),e}();mr._instance=null;var vr,yr,_r,br=[a,s],gr=-1e4,wr=(vr=function(){return $t(void 0,void 0,void 0,qe().mark((function t(){var r,n;return qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,navigator.serviceWorker.getRegistration();case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return");case 5:n={eventName:u,source:e},r.waiting?r.waiting.postMessage(n):r.addEventListener("updatefound",(function(){var e;null===(e=r.installing)||void 0===e||e.addEventListener("statechange",(function(){var e;null===(e=r.waiting)||void 0===e||e.postMessage(n)}))}));case 7:case"end":return t.stop()}}),t)})))},_r=!1,function(){if(!_r){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];yr=vr.apply(this,t),_r=!0}return yr}),kr=function(t,r){var n=Mt(Ce({},Lt,t)),a=t.filter((function(e){return-1!==n.indexOf("".concat(Lt,"_").concat(e.ruleName))})),o=function(e,t,r){var n="string"==typeof e?k(e):e;if(!n)return r;var a="".concat(n.origin).concat(n.pathname),o=!0,i=!1,l=void 0;try{for(var c,s=t[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var u=c.value;if(u.urlPattern.some((function(e){return"*"===e||-1!==a.indexOf(e)})))return u}}catch(e){i=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}}(document.URL,a);if(W.log("network freq rule:",JSON.stringify(o,null,2)),void 0===o)return Ye;var i=o.freqSampleRate,l=o.reportList;return function(t){if(l.some((function(e){return"*"===e||t.request_url.startsWith(e)}))){var n={type:Lt,eventDetail:{method:t.method,url:t.request_url,freqSampleRate:i},time:t._request_time};r.pushEvent(p,n,e)}}},Rr=function(t,r){var n=r.freq,i=void 0===n?[]:n,l=r.sampleRate;r.intercept=[{ruleName:"",conditions:[],global:!0,priority:gr,handlers:[{type:"self",handler:"report",value:l}]}].concat(We(r.intercept)).sort((function(e,t){return(null!==(le=e.priority)&&void 0!==le?le:100)-(null!==(ce=t.priority)&&void 0!==ce?ce:100)}));var u=function(){var e,t=q();if(!t)return{};null!==(e=t.swReportedURLs)&&void 0!==e||(t.swReportedURLs=[]);var r=t.swReportedURLs;return{check:function(e){var t=r.indexOf(e);return-1!==t&&(r.splice(t,1),!0)},push:function(e){r.length>=100&&r.shift(),r.push(e)}}}(),p=u.check,d=u.push,y={report:ot((function(r){if(r.source!==pe||!(null==p?void 0:p(r.request_url))){var n=r._sample_rate;at((function(){return t.pushEvent(a,{eventName:a,eventMetrics:{count:1},eventDetail:r},e,{sample_rate:n})}),n)()}})),reportLogid:ot((function(r){var n,a;if(r.source!==pe||!(null==p?void 0:p(r.request_url))){var i=null===(n=r.resp_header)||void 0===n?void 0:n["x-tt-traceflag"],l=null===(a=r.resp_header)||void 0===a?void 0:a["x-tt-logid"];i&&"02"==="".concat(i)&&l&&t.pushEvent(o,{eventName:o,eventMetrics:{count:1},eventDetail:r},e)}})),freq:i.length>0&&Dt?ot(kr(i,t)):void 0},_=new mr(y,r,{freq:i.length>0},vt().pageContext);if(navigator&&"serviceWorker"in navigator){var b=ut(),g=b.sw,w=b.sw_version,k=!1;navigator.serviceWorker.addEventListener("message",ot((function(r){var n,o,i,c;if(r.data.event===m){var s=r.data.data;if(br.indexOf(s.eventName),a===s.eventName){if((null!==(n=s.eventDetail)&&void 0!==n?n:{}).rule_name){null==d||d(null!==(i=null===(o=s.eventDetail)||void 0===o?void 0:o._old_url)&&void 0!==i?i:s.eventDetail.request_url);var u=null!==(c=s.eventDetail._sample_rate)&&void 0!==c?c:l;at((function(){t.pushEvent(s.eventName,s,e,{sample_rate:u})}),u)()}s.sw_version||wr()}k||(k=!0,"string"==typeof g&&"string"==typeof w&&-1===w.split(",").indexOf(s.sw_version)&&setTimeout((function(){var e;navigator.serviceWorker.register((e=g).startsWith("http")?e:"".concat(location.origin).concat(e),{updateViaCache:"none"}),wr()}),0))}else r.data.event===v&&r.data.error&&t.pushError(r.data.error)}))),navigator.serviceWorker.ready.then((function(t){var n;_.setState(Wt.SW_READY,1);var a=null!==(n=null==t?void 0:t.active)&&void 0!==n?n:navigator.serviceWorker.controller;(null==a?void 0:a.postMessage)&&([{eventName:s,source:e},{eventName:f,source:e,data:vt().pageContext},{eventName:h,source:e,data:r.intercept}].forEach((function(e){return a.postMessage(e)})),ft((function(t){a.postMessage({eventName:f,source:e,data:t})})))}))}else t.pushEvent(c)},xr=function(e,t){!function(e,t){var r,n=t.listener,a=e.eventHook,o=Je(n);try{var i=function(){var e=r.value,t=e.type,n=e.sampleRate;switch(t){case"navigation_navigate":"undefined"!=typeof window&&"navigation"in window&&ot(at((function(){window.navigation.addEventListener("navigate",(function(t){var r=new URL(t.destination.url,location.href);r.hostname!==location.hostname&&a({eventRule:e,url:r.href})}))}),n),void 0)();break;case"a_click":ot(at((function(){document.addEventListener("DOMContentLoaded",(function(){document.body.addEventListener("click",(function(t){var r=t.target.closest("a");if(r&&"_self"!==r.target){var n=new URL(r.href,location.href);n.hostname!==location.hostname&&a({eventRule:e,url:n.href})}}),!0)}))}),n),void 0)();break;case"submit_click":ot(at((function(){document.addEventListener("DOMContentLoaded",(function(){document.body.addEventListener("click",(function(t){var r=t.target;if(("BUTTON"===r.tagName&&"submit"===r.type||"INPUT"===r.tagName&&"submit"===r.type)&&r.form&&"_self"!==r.form.target){var n=new URL(r.formAction||r.form.action,location.href);n.hostname!==location.hostname&&a({eventRule:e,url:n.href})}}),!0)}))}),n),void 0)()}};for(o.s();!(r=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}}({eventHook:ot((function(t){e.pushEvent("event",t)}))},t)};function Or(e){var t=yt(),r=t.cookie;t.storage;var n=t.webapi,a=t.network,o=t.event,l=void 0===o?{listener:[]}:o;qt(e,r),Tt(e),function(e,t){Gt({webapiHook:ot((function(t){e.pushEvent(i,t)})),webapiFreqHook:Dt?ot((function(t){e.pushEvent(p,t)})):void 0},t)}(e,n),Rr(e,a),xr(e,l)}var Sr="__PUMBAA_RUN_FLAG__";try{(function(){if(/ByteLocale/g.test(navigator.userAgent))return!1;var e=!0;return window.Garfish&&(e=window.Garfish.getGlobalObject()===window),!(!e||window[Sr]||(window[Sr]=1,0))})()&&function(e,r){return function(){var n=Date.now(),a=e.apply(void 0,arguments);return S().pushEvent(d,{metrics:{time:Date.now()-n},categories:{version:"1.0.0.885",runtime_env:t,module:r}}),a}}((function(){if(window.Symbol){var e=S();ot(Or)(e);var t=R(),r=document.createElement("script"),n=document.currentScript,a=n.src,o=n.dataset,i=a.substring(0,a.lastIndexOf("/")),l="".concat(i,"/core.js","?globalName=").concat(t);r.src=l,r.crossOrigin="anonymous",r.async=!0,Object.assign(r.dataset,o),document.head.appendChild(r),document.head.removeChild(r)}}),"loader")()}catch(e){}}();
|